column is dedicated to the use, creation, distribution, and discussion of
computer graphics tools for Linux systems.
This month I'll finally get around to the article on HF-Lab, John
Beale's wonderful tool for creating 3D Heightfields. I've been meaning
to do this for the past few months. I made sure I made time for it this
The other article from me this month is a quick update on the 3D modellers that are available for Linux. I didn't really do a comparative review, it's more of a ``this is what's available, and this is where to find them''. A full comparative review is beyond the scope of this column. Perhaps I'll do one for the Linux Journal sometime in the future.
I had planned to do a preview of the Gimp 1.0 release which is coming out very soon. However, I'll be doing a full article on the Gimp for the November graphics issue of Linux Journal and decided to postpone the introduction I had planned for the Muse. At the same time I had decided to postpone my preview, Larry Ayers contacted me to see if I was still doing my Gimp article for the Muse. He had planned on doing one on the latest version but didn't want to clash with my article. I told him to feel free and do his since I wasn't doing one too. He has graciously offered to place the preview here in the Muse and it appears under the ``More Musings...'' section.
Disclaimer: Before I get too far into this I should note that any of the news items I post in this section are just that - news. Either I happened to run across them via some mailing list I was on, via some Usenet newsgroup, or via email from someone. I'm not necessarily endorsing these products (some of which may be commercial), I'm just letting you know I'd heard about them in the past month.
Zgv v2.8Zgv is a graphic file viewer for VGA and SVGA displays which supports most popular formats. (It uses svgalib.) It provides a graphic-mode file selector to select file(s) to view, and allows panning and fit-to-screen methods of viewing, slideshows, scaling, etc.
Nothing massively special about this release, really, but some of the new features are useful, and there is an important bugfix.
The files of interest are zgv2.8-src.tar.gz and zgv2.8-bin.tar.gz.
Editor's Note: I don't normally include packages that aren't X-based, but the number of announcements for this month were relatively small so I thought I'd go ahead and include this one. I don't plan on making it a practice, however.
Attention: OpenGL and Direct3D programmersMark Kilgard, author of OpenGL Programming for the X Window System, posted the following announcement on the comp.graphics.api.opengl newsgroup. I thought it might be of interest to at least a few of my readers.
The URL below explains a fast and effective technique for applying texture mapped text onto 3D surfaces. The full source code for a tool to generate texture font files (.txf files) and an API for easy rendering of the .txf files using OpenGL is provided.
For a full explanation of the technique including sample images
showing how the technique works, please see:
Direct3D programmers are invited to see how easy and powerful OpenGL programming is. In fact, the technique demonstrated is not immediately usable on Direct3D because it uses intensity textures (I believe not in Direct3D), polygon offset, and requires alpha testing, alpha blending, and texture modulation (not required to be implemented by Direct3D). I mean this to be a constructive demonstration of the technical inadequacies of Direct3D.
ImageMagick V3.8.5Alexander Zimmerman has released a new version of ImageMagick. The announcment, posted to comp.os.linux.announce, reads as follows:
I just uploaded to sunsite.unc.edu
VARKON Version 1.15AVARKON is a high level development tool for parametric CAD and engineering applications developed by Microform, Sweden. 1.15A includes new parametric functions for creation and editing of sculptured surfaces and rendering based on OpenGL.
Version 1.15A of the free version for Linux
is now available for download at:
Shared library version of xv 3.10axv-3.10a-shared is the familiar image viewer program with all current patches modified to use the shared libraries provided by libgr.
t1lib-0.2-beta - A Library for generating Bitmaps from Adobe Type 1 Fontst1lib is a library for generating character- and string-glyphs from Adobe Type 1 fonts under UNIX. t1lib uses most of the code of the X11 rasterizer donated by IBM to the X11-project. But some disadvantages of the rasterizer being included in X11 have been eliminated. Here are the main features:
You can get t1lib by anonymous ftp at:
An overview of t1lib including some screenshots of xglyph can be
Freetype Project - The Free TrueType Font Engine
The FreeType library is a free and portable TrueType font rendering
engine. This package, known as `Alpha Release 4' or `AR4', contains the
engine's source code and documentation.
| Werner Lemberg
The latest revision of xanim is 188.8.131.52.
I got the following message from a reader. Feel free to contact him with your comments. I have no association with this project.
I'm currently working on an application to do image processing and Computer Vision tasks. In the stage of development, I would like to know what the community expects from such a product, so if you would like the status of the work, please come and visit:
Expecially the "sample" section, where you can see some of the application's functionality at work, and leave me a feedback. Thanks for your help. Cristiano Verondini firstname.lastname@example.org|
Q and A
Q: Can someone point me to a good spot to download some software to make a good height map?
I'd suggest you try either John Beale's hflab available at:
Look under sources. You will find executables for Unix and
source code for other systems. It is pretty good at manipulating
and creating heightfields and is great at making heightfields
made in a paint program more realistic.
For the ultimate in realism use dem2pov by Bill Kirby, also available at John Beale's web site to convert DEM files to TGA heightfields. You can get DEM files trough my DEM mapping project at http://www.sn.no/~svalstad/hf/dem.html or directly from ftp://edcftp.cr.usgs.gov/pub/data/DEM/250/
As for your next question about what the pixel values of heightfields mean, there are three different situations:
Q: Sorry to pester you but I've read your minihowto on graphics in Linux and I still haven't found what I'm looking for. Is there a tool that will convert a collection of TGA files to one MPEG file in Linux?
I don't know of any offhand, but check the following pages. They might
have pointers to tools that could help.
Q: Where can I find some MPEG play/encode tools?
Q: Where can I find free textures on the net in BMP, GIF, JPEG, and PNG formats?
Try looking at:
These are the textures I've started using in my OpenGL demos. They are very professional. There are excellent brick and stone wall textures. If you are doing a lot of modeling of walls and floors and roads, the web site offers a CD-ROM with many more textures.
Generally, I load them into "xv" (an X image viewer utility) and resample them with highest-quality filtering to be on even powers of two and then save them as a TIFF file. I just wish they were already at powers of two so I didn't have to resample.
Then, I use Sam Leffler's very nice libtiff library to read
them into my demo. I've got some example code of loading TIFF
images as textures at:
Q: Why can't I feed the RIB files exported by AMAPI directly into BMRT?
A: According to email@example.com:
Thomas Burge from Apple who has both the NT and Apple versions of AMAPI explained to me what the situation is - AMAPI only exports RIB entity files; you need to add a fair chunk of data before a RIB WorldBegin statement to get the camera in the right place and facing the right way. As it were, no lights were enabled and my camera was positioned underneath the object, facing down! There is also a Z-axis negation problem in AMAPI, which this gentleman pointed out to me and gave me to the RIB instructions to compensate for it.
Q: Is there an OpenGL tutorial on-line? The sample code at the OpenGl WWW center seems pretty advanced to me.
There are many OpenGL tutorials on the net. Try looking at:
Some other good ones are:
Q: So, like, is anyone really reading this column?
A: I have no idea. Is anyone out there?
3D Modellers UpdateRecently there has been a minor explosion of 3D modellers. Most of the modellers I found the first time out are still around, although some are either no longer being developed or the developers have not released a new version in awhile. Since I haven't really covered the range of modellers in this column since I started back in November 1996, I decided it was time I provided a brief overview of what's available and where to get them.
The first thing to do is give a listing of what tools are available. The following is the list of modellers I currently know about, in no particular order:
There are also a couple of others I'm not sure how to classify, but the modelling capabilities are not as obvious so I'll deal with them in a future update (especially if they contact me with details on their products).
All of these use graphical, point-and-click style interfaces. Other modellers use programming languages but no graphical interface, such as POV-Ray, Megahedron and BMRT (via its RenderMan support). Those tools are not covered by this discussion.
The list of modellers can be broken into three categories: stable, under development, and commercial. The stable category includes AC3D, SCED/SCEDA, and Midnight Modeller. Commercial modellers are the AMAPI and Megahedron packages, and Bentley Microstation. The latter is actually free for non-commercial unsupported use, or $500 with support. Below are short descriptions of the packages, their current or best known status and contact information. The packages in the table are listed alphabetically.
HF-LabHeight fields are convenient tools for representing terrain data that are supported directly by POV-Ray and through the use of displacement maps or patch meshes in BMRT. With POV-Ray and displacement maps in BMRT, a 2D image is used to specify the height of a point based on the color and/or intensity level for the point in the 2D image. The renderer uses this image, mapped over a 3D surface, to create mountains, valleys, plateaus and other geographic features. Creating a representative 2D image is the trick to realistic landscapes. HF-Lab, an X-based interactive tool written by John Beale, is an easy to use and extremely useful tool for creating these 2D images.
Once you have retrieved the source, built (instructions are included and the build process is fairly straightforward, although it could probably benefit from the use of imake or autoconf) and installed it, you're ready to go. HF-Lab is a command line oriented tool that provides its own shell from which commands can be entered. To start HF-Lab using BASH type
% export HFLHELP=$HOME/hf/hf-lab.hlp
and in csh type
% setenv HFLHELP $HOME/hf/hf-lab.hlp
Note that the path you use for the HFHELP environment variable
depends on where you installed the hf-lab.hlp file from the distribution.
The build process does not provide a method for installing this file
for you so you'll need to be sure to move the file to the appropriate
directory by hand. You definitely want to make sure this file is
properly installed since the online help features in HF-Lab are
HF-Lab commands fall into several categories: those for generating heightfields (HFs), combining or transforming them, and viewing them are the three most important. Then there are other 'housekeeping' commands to move HFs around on the internal stack, load and save them on the disk, and set various internal variables.Generating HFs are done with one of gforge, random, constant, and zero. The first of these, gforge, is the most interesting as it will create fractal-based fields. Random creates a field based on noise patterns (lots of spikes, perhaps usable as grass blades up close in a rendered scene) while constant and zero create level planes. Zero is a just a special case of constant where the height value is 0.
Each HF that is generated gets placed on the stack. The stack is empty to start. Running one of the HF generation commands will add a HF to top of the stack. By default there are 4 slots in the stack that can be filled, but this number can be changed using the set stacksize command. The HFs on the stack can be popped, swapped, duplicated, and named and the whole stack can be rotated. Also, rotation can be between the first 3 HFs on the stack.
The normal proces for creating a HF usually includes the following steps:
Linux Graphics mini-Howto
Unix Graphics Utilities
Linux Multimedia Page
Some of the mailing lists and newsgroups I keep an eye on, where I get alot of the information for this column:
The Gimp User and Gimp Developer Mailing Lists.
The IRTC-L discussion list
Graphics Muse #1, November 1996
Graphics Muse #2, December 1996
Graphics Muse #3, January 1997
Graphics Muse #4, February 1997
Graphics Muse #5, March 1997
Graphics Muse #6, April 1997
Graphics Muse #7, May 1997