elcome to the Graphics Muse! Why a « muse »? Well, except for the sisters aspect, the above definitions are pretty much the way I’d describe my own interest in computer graphics: it keeps me deep in thought and it is a daily source of inspiration.
|his 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 month. 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 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.
Zgv can be found either in
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.
| Mark 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.
| Alexander Zimmerman has released a new version of ImageMagick. The announcment, posted to comp.os.linux.announce, reads as follows:
| VARKON 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:
| xv-3.10a-shared is the familiar image viewer program with all current patches modified to use the shared libraries provided by libgr.
xv-3.10a-shared is available from ftp://ftp.ctd.comsat.com/pub/. libgr-2.0.12.tar.gz is available from ftp://ftp.ctd.comsat.com/pub/linux/ELF/.
| t1lib 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:
Author: Rainer Menzner ( email@example.com)
You can get t1lib by anonymous ftp at:
An overview of t1lib including some screenshots of xglyph can be found at:
| 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.
What you’ll find in this release are:
Also, some design changes have been made to allow the support of the following features, though they’re not completely implemented yet:
Source is provided in two programming languages: C and Pascal, with some common documentation and several test programs. The Pascal source code has been successfully compiled and run with Borland Pascal 7 and fPrint’s Virtual Pascal on DOS and OS/2, respectively. The C source code has been successfully compiled and run on various platforms including DOS, OS/2, Amiga, Linux and several other variants of UNIX. It is written in ANSI C and should be very easily ported to any platform. Though development of the library is mainly performed on OS/2 and Linux, the library does not contain system-specific code. However, this package contains some graphics drivers used by the test programs for display purposes on DOS, OS/2, Amiga and X11.
Finally, the FreeType Alpha Release 4 is released for informative and demonstration purpose only. The authors provide it `as is’, with no warranty.
The file freetype-AR4.tar.gz (about 290K) is available now at ftp://sunsite.unc.edu/pub/Linux/X11/fonts or at the FTP site in: ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype
There is also a mailing list:
Send the usual subscription commands to:
|…the Portal web site for xanim has closed down. The new primary sites are:
I got the following message from a reader. Feel free to contact him with your comments. I have no association with this project.
Q and A
Q: Can someone point me to a good spot to download some software to make a good height map?
A: I’d suggest you try either John Beale’s hflab available at: http://shell3.ba.best.com/~beale/ 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.
From Stig M. Valstad via the IRTC-L mailing list
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?
A: I don’t know of any offhand, but check the following pages. They might have pointers to tools that could help.
You probably have to convert your TGA’s to another format first, then encode them with mpeg_encode (which can be found at the first site listed above).
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?
A: 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:
From: Mark Kilgard , author of OpenGL Programming for the X Window System, via the comp.graphics.api.opengl newsgroup.
Q: Why can’t I feed the RIB files exported by AMAPI directly into BMRT?
A: According to firstname.lastname@example.org:
Q: Is there an OpenGL tutorial on-line? The sample code at the OpenGl WWW center seems pretty advanced to me.
A: There are many OpenGL tutorials on the net. Try looking at:
Some other good ones are: From Mark Kilgard
Q: So, like, is anyone really reading this column?
A: I have no idea. Is anyone out there?
| Recently 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 is also the possibility that bCAD is available for Linux as a commercial port, but I don’t have proof of this yet. Their web site is very limited as to contact information, so I wasn’t able to send them email to find out for certain. The web pages at 3DSite for bCAD do not list any Unix ports for bCAD, although they appear to have a command line renderer for Unix. 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.
| Height 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 quite nice.
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.
Manipulating a HF can be done in several ways. First, there are a set of commands to operate on a single HF, the One HF-Operators. A few of the more interesting of these are the pow, zedge, crater, fillbasin, and flow commands. Zedge flattens the edges of the HF (remember that a HF is really just a 3D representation of a 2D image, and those images are rectangular). Crater adds circular craters to the HF of various radii and depths. Fillbasin and
The following links are just starting points for finding more information about computer graphics and multimedia in general for Linux systems. If you have some application-specific information for me, I’ll add them to my other pages or you can contact the maintainer of some other web site. I’ll consider adding other general references here, but application or site-specific information needs to go into one of the following general references and will not be listed here.
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
- BMRT Part 3: Advanced Topics or a short tutorial on writing an OpenGL application. I’m currently working on a little Motif/OpenGL application which I plan on using to create models for use with BMRT. I’d like to finish it before I return to BMRT, but I have promised the third part on BMRT for July. I’m not sure which I’ll get to, especially since I also have an article for Linux Journal due July 1st.
- ..and who knows what else
Let me know what you’d like to hear about!
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