858 lines
29 KiB
HTML
858 lines
29 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HEAD>
|
|
<TITLE>
|
|
Graphics Muse Issue #15
|
|
</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY text="#000000" bgcolor="#ffffff"
|
|
vlink="#fa3333" alink="#33CC33" link="#0000FA">
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!-- =============================================================
|
|
These pages are designed by Michael J. Hammel. Permission to
|
|
use all graphics and other content is granted provided you give
|
|
me (or the original authors/artists) credit for the work and this
|
|
copyright notice is not removed.
|
|
|
|
(c)1997, 1998 Michael J. Hammel (mjhammel@graphics-muse.org)
|
|
============================================================= !-->
|
|
|
|
<!-- The Button box as a client side imagemap -->
|
|
<MAP NAME="nav-main">
|
|
<AREA SHAPE="rect" HREF="#mews" coords="3,10 158,56">
|
|
<AREA SHAPE="rect" HREF="#musings" coords="5,85 142,116">
|
|
<AREA SHAPE="rect" HREF="#resources" coords="5,152 177,182">
|
|
</MAP>
|
|
|
|
|
|
<TABLE width=560>
|
|
<tr>
|
|
<td width=441 valign="top" align=left cellpadding=0 cellspacing=0>
|
|
|
|
<!-- The title graphics -->
|
|
<IMG SRC="../gx/hammel/gm3.gif" ALT="Welcom to the Graphics Muse"
|
|
ALIGN="left" WIDTH="441" HEIGHT="216" border="0"></td>
|
|
|
|
<td width=119 align=right valign="bottom">
|
|
<table>
|
|
<tr>
|
|
<td align=center>
|
|
<FONT size=2>
|
|
Set your browser to the width of the line below for best viewing.
|
|
</FONT>
|
|
<!-- The Copyright -->
|
|
<BR><FONT size=1>
|
|
© 1996 by
|
|
<A HREF="mailto:mjhammel@csn.net">mjh</A>
|
|
</FONT></td>
|
|
</tr>
|
|
</table></td>
|
|
|
|
<tr>
|
|
<!-- Provide a measure for readers to adjust their browsers to.
|
|
-- These pages should fit on a 640 pixel wide window, so laptop
|
|
-- users should be able to read them too.
|
|
-->
|
|
<td width=100% cellspacing=0 cellpadding=0
|
|
valign=bottom align=center colspan=2>
|
|
<HR>
|
|
</td>
|
|
</table>
|
|
|
|
<TABLE width=560>
|
|
<tr>
|
|
<!-- td width=177 align=left valign=top>
|
|
-->
|
|
<td width=17% align=left valign=top>
|
|
<IMG SRC="../gx/hammel/buttons3.gif" ALT="Button Bar"
|
|
ALIGN="left" WIDTH="177" HEIGHT="185"
|
|
USEMAP="#nav-main" border="0"></td>
|
|
|
|
|
|
<!-- td width=463 align=left valign=top>
|
|
-->
|
|
<td width=83% align=left valign=top>
|
|
<!-- What is a Graphics Muse? -->
|
|
<FONT size=4><B>muse:</B></FONT>
|
|
<OL>
|
|
<LI><I>v;</I> to become absorbed in thought
|
|
<LI><I>n;</I> [ fr. Any of the nine sister goddesses of learning and the
|
|
arts in Greek Mythology ]: a source of inspiration
|
|
</OL>
|
|
<IMG SRC="../gx/hammel/w.gif" ALT="W" ALIGN="left"
|
|
HSPACE="0" VSPACE="0" WIDTH="36" HEIGHT="28">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.
|
|
|
|
<!-- Text based navigation -->
|
|
<P>
|
|
<CENTER>
|
|
<FONT size=2>
|
|
[<A HREF="#mews">Graphics Mews</A>]
|
|
[<A HREF="#musings">Musings</A>]
|
|
[<A HREF="#resources">Resources</A>]
|
|
</FONT>
|
|
<CENTER></td>
|
|
|
|
</table>
|
|
|
|
<TABLE width=560>
|
|
<tr>
|
|
<td>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="8" WIDTH="1" HEIGHT="1">
|
|
<IMG SRC="../gx/hammel/t.gif" ALT="T" ALIGN="left"
|
|
HSPACE="0" VSPACE="0" WIDTH="26" HEIGHT="28">his
|
|
column is dedicated to the use, creation, distribution, and discussion of
|
|
computer graphics tools for Linux systems.
|
|
|
|
<BR clear=both>
|
|
|
|
|
|
<BR clear=both>
|
|
|
|
After much delay, I've finally started learning about the Blue Moon
|
|
Rendering Tools (BMRT). It seemed only natural that I take what I
|
|
learned and pass it on to my readers. So, starting this month, I'm
|
|
going to do a three-part series on BMRT and RenderMan®
|
|
shaders. I've gotten help, of course. My thanks go out
|
|
to Paul Sargent for providing example code and a place to bounce
|
|
ideas off and to Larry Gritz, author of BMRT, for general support
|
|
and technical assistance.
|
|
The first in this three-part series is an
|
|
introduction to the tools and some relatively simple
|
|
examples on how to use them.
|
|
|
|
<BR clear=both>
|
|
|
|
Although the BMRT articles are a big project in themselves, I don't
|
|
want to devote 3 entire issues of the Muse to just BMRT.
|
|
In this months column I'll also be covering a few other topics.
|
|
<UL>
|
|
<LI> A review of Mark Kilgard's <I>OpenGL Programming for
|
|
the X Window System</I>.
|
|
<LI> Information on scanner support for Linux.
|
|
</UL>
|
|
Both of these go into some detail. Along with the usual set of
|
|
Mews offerings, this should be enough to hold you until next month.
|
|
<BR clear=both>
|
|
|
|
I was going to do a bit on John Beale's wonderful tool, HF-Lab,
|
|
this month but
|
|
decided to wait until next month. I happened to run across a few other
|
|
POV-Ray tips recently and thought that the set of tips along with
|
|
the HF-Lab review would fit well together. Look for them next month.
|
|
<BR clear=both>
|
|
|
|
An update on my crashed system woes: my little network at home uses a
|
|
386 16Mhz Dell computer as a server for doing backups. I had set it up
|
|
but had not implemented the backups when my main system bit the bucket.
|
|
After getting my main system running again, I ended up with some extra
|
|
drives that I wanted to put in my server. I first tried to make backups of
|
|
my main system, across the network, using a version of taper that I had
|
|
installed on my main system and just copied over to the server. That sort
|
|
of worked, but for some reason taper wouldn't see some of my target
|
|
directories. I figured it was incompatible with the installation I had on
|
|
the 386, so I upgraded to Linux Pro (which is what I installed on my main
|
|
system). Mistake. The server stopped working. The problem is a secondary
|
|
IDE that I added to make use of the extra hard disks. I mucked with it for
|
|
a week, got fed up and now have a new Cyrix 166, motherboard, and mini
|
|
tower on order. The motherboard and 166 are going in the main box, and the
|
|
old 486 and motherboard are going in the mini tower. I'm retiring the 386.
|
|
It will take its rightful place next to my retired Wyse286 PC with its
|
|
20M hard drive.
|
|
<BR clear=both>
|
|
|
|
I never wanted to be a system administrator. I just want to <B>use</B>
|
|
my systems. <I>sigh</I> At least with Linux I have more control over
|
|
what I use.
|
|
<BR clear=both>
|
|
|
|
So, one month after disaster hit, I still don't have reliable backups
|
|
running. There is money to be made in making backups easy for Linux
|
|
users. I guarantee it.
|
|
<P>
|
|
</td>
|
|
</table>
|
|
|
|
|
|
<!-- Netscape has a bug when applying a Name tag to an image, so we have to
|
|
stick the image in a table so the image will be the top item on the
|
|
page.
|
|
-->
|
|
<A NAME="mews">
|
|
<table width=560>
|
|
<tr>
|
|
<td align=left>
|
|
<IMG SRC="../gx/hammel/mews.gif" ALT="Graphics Mews" ALIGN="left"
|
|
HSPACE="0" VSPACE="0" WIDTH="242" HEIGHT="53">
|
|
</td>
|
|
</table>
|
|
</A>
|
|
|
|
<BR clear=both>
|
|
<TABLE width=560 border=0>
|
|
<tr>
|
|
<td colspan=4>
|
|
<BR clear=both>
|
|
|
|
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.
|
|
<P>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<tr>
|
|
<td width="50%">
|
|
<H4>
|
|
GIFWizard
|
|
</H4>
|
|
|
|
If you'd like to reduce the size of your GIF images but don't
|
|
really know how to do it on your own, there is a free online service
|
|
you can try.
|
|
The
|
|
<A HREF="http://www.raspberryhill.com/gifwizard.html">
|
|
GIF Wizard
|
|
(http://www.raspberryhill.com/gifwizard.html)</A>
|
|
will work with images already on the Net (you provide a URL for the
|
|
image) or on images on your hard drive.
|
|
|
|
Note: Definitely don't ask me about this service - I haven't used
|
|
it and only offer the info here because it looked like it might
|
|
be of interest to some of my readers.
|
|
</td>
|
|
|
|
|
|
<td bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
<td bgcolor="#ffffff" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<td width="49%" valign=top>
|
|
<H4>
|
|
Tnpic - GIF/JPEG indexer
|
|
</H4>
|
|
|
|
Tnpic,
|
|
from Russell Marks (who doesn't have email access anymore),
|
|
is a GIF/JPEG indexer that used to be bundled with
|
|
zgv up until version 2.3. The index is output as a JPEG.
|
|
Tnpic is available from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/tnpic-2.4.tar.gz">
|
|
sunsite.unc.edu /pub/Linux/apps/graphics/tnpic-2.4.tar.gz</A>
|
|
<P>
|
|
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<tr>
|
|
<td colspan=4>
|
|
<H4>
|
|
Ra-vec
|
|
</H4>
|
|
|
|
Ra-vec is a new free application for Linux, SGi and Suns
|
|
from
|
|
<A HREF="mailto:aspinr@comp.lancs.ac.uk">
|
|
Rob Aspin
|
|
</A>
|
|
that converts X Bitmaps, such as 2D plan drawings
|
|
(architect's drawings), into
|
|
a vector format which can be read by the 3D modeling package
|
|
AC3D (see the
|
|
<A HREF="../issue13/gm.html">January 1997</A>
|
|
issue).
|
|
Using Ra-vec, complex 3D models and environments may be rapidly
|
|
prototyped, reducing overall development time.
|
|
<P>
|
|
To download a free copy of the software, go to:
|
|
<A HREF="http://www.comp.lancs.ac.uk/computing/users/aspinr/ra-vec.html">
|
|
http://www.comp.lancs.ac.uk/computing/users/aspinr/ra-vec.html</A>.
|
|
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<tr>
|
|
<td colspan=4 width="100%">
|
|
<H4>
|
|
VARKON for Linux
|
|
</H4>
|
|
|
|
VARKON is a high level development tool for CAD and Product
|
|
Modelling applications
|
|
from <A HREF="mailto:info@microform.se">
|
|
Microform AB, SWEDEN</A>.
|
|
The system includes a very powerful
|
|
modelling language called MBS and an interactive environment
|
|
for traditional modelling and developing MBS-applications.
|
|
|
|
<P>
|
|
Keywords are:
|
|
<BR>
|
|
2D, 3D, Wireframe models, Surface models, Parametric, Structured
|
|
Object Oriented Database. Easy to integrate with other systems.
|
|
Commercially available on most platforms at a very low price.
|
|
|
|
At the
|
|
<A HREF="http://www.microform.se">Web site</A>
|
|
- http://www.microform.se - you will find
|
|
<UL>
|
|
<LI>A lot of technical information about VARKON
|
|
<LI>Links to download the latest version of
|
|
Linux-VARKON (version 1.14E)
|
|
<LI>Links to download the full documentation in
|
|
text or MS-Word-format
|
|
<LI>Links to download demo-applications with
|
|
source MBS-code, documentation, etc.
|
|
</UL>
|
|
|
|
<P>
|
|
You can also download a restricted but free demo-version of the system
|
|
for Windows95.
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<tr>
|
|
<td colspan=4>
|
|
<H4>
|
|
QuickCam Resources
|
|
</H4>
|
|
|
|
Interested in doing some work with the Connectix QuickCam? That's
|
|
the little round camera that has become very popular with Windows
|
|
and Mac users.
|
|
Russ Nelson (of the old Packet Drivers fame, for those of you who
|
|
remember that software) maintains a very good resource page for the
|
|
QuickCam at
|
|
<A HREF="http://www.crynwr.com/qcpc">
|
|
www.crynwr.com/qcpc</A>. It contains links to drivers and
|
|
applications for many operating systems, including Linux and other PC
|
|
based Unices.
|
|
<BR clear=both>
|
|
|
|
Connectix also maintains a page for developers. They offer lots
|
|
of information and require only that you register for their
|
|
developers program, which costs nothing. You can find them at
|
|
<A HREF="http://www.connectix.com/connect/developer.html">
|
|
www.connectix.com/connect/developer.html</A>
|
|
<BR clear=both>
|
|
|
|
If you're looking for a Linux driver for the Color QuickCam,
|
|
check
|
|
<A HREF="http://www.azstarnet.com/~axplinux/sane/">
|
|
The SANE Project</A>, a project to develop a generic interface
|
|
to various types of media devices, such as scanners and the QuickCam.
|
|
This package also contains a frontend to the Color QuickCam driver.
|
|
|
|
<P>
|
|
For those of you in the US wondering what these little gadgets cost,
|
|
CompUSA sells the Color QuickCams for about $249.
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=0 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#ffffff" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
VSPACE="5" HSPACE="10" WIDTH="1" HEIGHT="1"></td>
|
|
|
|
<tr>
|
|
<td colspan=4>
|
|
<!--
|
|
-- Did You Know Section
|
|
-->
|
|
<H4>Did You Know?</H4>
|
|
There are many places to find information about OpenGL on the
|
|
Internet. The following is only a small list:
|
|
|
|
<UL TYPE=square>
|
|
<LI>
|
|
<A HREF="http://reality.sgi.com/mjk_asd/spec3/spec3.html">
|
|
The OpenGL Utility Toolkit (GLUT)
|
|
<BR>Programming Interface API Version 3</A>
|
|
<BR>http://reality.sgi.com/mjk_asd/spec3/spec3.html
|
|
<BR>Mark J. Kilgard
|
|
<BR>Silicon Graphics, Inc.
|
|
<LI>
|
|
<A HREF="http://reality.sgi.com/mjk_asd/glut3/glut-faq.html">
|
|
Frequently Asked GLUT Questions</A>
|
|
<BR>http://reality.sgi.com/mjk_asd/glut3/glut-faq.html
|
|
<LI>
|
|
<A HREF="http://www.dgp.toronto.edu/people/van/courses/csc418/opengl1.html">
|
|
An Introduction to OpenGL</A>
|
|
<BR>http://www.dgp.toronto.edu/people/van/courses/csc418/opengl1.html
|
|
<LI>
|
|
<A HREF="http://www.digital.com/pub/doc/opengl/">
|
|
The OpenGL WWW Pages</A>
|
|
<BR>http://www.digital.com/pub/doc/opengl/
|
|
<LI>
|
|
<A HREF="http://www.ssec.wisc.edu/~brianp/sig96/portable.htm">
|
|
Course 22: OpenGL and Window System Integration
|
|
<BR>OpenGL Portability Notes</A>
|
|
<BR>SIGGRAPH '96
|
|
<BR>http://www.ssec.wisc.edu/~brianp/sig96/portable.htm
|
|
<LI>
|
|
<A HREF="http://www.sgi.com/Technology/openGL/">
|
|
OpenGL WWW Center from Silicon Graphics</A>
|
|
<BR>http://www.sgi.com/Technology/openGL/
|
|
</UL>
|
|
|
|
There are also a few sites with RenderMan information:
|
|
<UL TYPE=square>
|
|
<LI>
|
|
<A HREF="http://pete.cs.caltech.edu/RMR/index.html">
|
|
The RenderMan Repository</A> -
|
|
(http://pete.cs.caltech.edu/RMR/index.html)
|
|
<BR>A storehouse for all things related to RenderMan.
|
|
|
|
<LI>
|
|
<A HREF="http://www.cgrg.ohio-state.edu/~smay/RManNotes/index.html">
|
|
RManNotes</A> -
|
|
(http://www.cgrg.ohio-state.edu/~smay/RManNotes/index.html)
|
|
<BR>General information about writing shaders in the RenderMan
|
|
Shading Language and using the two most commonly available
|
|
RenderMan renderers
|
|
|
|
</UL>
|
|
|
|
|
|
<!--
|
|
-- Q and A Section
|
|
-->
|
|
<P><FONT size=3><B>Q and A</B></FONT>
|
|
<P>
|
|
<I>Q: Is displacment mapping the same thing as reaction-diffusion?
|
|
</I>
|
|
<P>
|
|
A:
|
|
No. Reaction-diffusion simulates the mixing of chemicals, which
|
|
is theorized to have something to do with certain organic texture
|
|
patterns, like leopard skin.
|
|
<P>
|
|
Bump mapping is perturbing the normal of an object to simulate
|
|
bumps, but without actually moving points on the surface.
|
|
<P>
|
|
Displacement mapping does what bump mapping merely simulates -
|
|
it actually distorts the surface points of the
|
|
object which is being mapped. This avoids
|
|
artifacts you get from the bump mapping approximation (like actually
|
|
making the silhouettes rough).
|
|
You can think of it as a height field over an arbitrary surface.
|
|
|
|
<P>
|
|
<I>Q:
|
|
What is a stochastic raytracer and are there any freely
|
|
available?
|
|
</I>
|
|
|
|
<P>A:
|
|
"Stochastic sampling" or "distribution ray tracing" (it's not called
|
|
distributed these days) refers to placing samples at irregular
|
|
intervals, rather than regularly spacing them. It doesn't have
|
|
anything to do with the number of rays per pixel -- 1 sample per pixel
|
|
can easily be jittered, and 100 samples per pixel can be regularly
|
|
spaced. Also, it's not dependent on ray tracing -- PRMan uses
|
|
stochastic sampling and it uses a scanline method.
|
|
<P>
|
|
Technically, stochastic sampling transfers high frequency signal
|
|
energy above the Nyquist limit into noise, rather than having that
|
|
energy alias as lower frequencies. It's just trading one artifact for
|
|
another, but by coincidence the human visual system appears to find
|
|
noise less objectionable than aliasing.
|
|
<P>
|
|
BMRT is a stochastic raytracers. POV-Ray is reported to be
|
|
(but no official word if it is or not).
|
|
Others include (not all are raytracers):
|
|
PRMan, Mental Ray, and Alias.
|
|
|
|
<P>
|
|
Thanks to Larry Gritz for these definitions.
|
|
|
|
<P>
|
|
<I>Q:
|
|
What is tessellation?
|
|
</I>
|
|
|
|
<P>A:
|
|
Mark Kilgard writes the following in his
|
|
<I>OpenGL Programming for the X Window System</I>:
|
|
<BLOCKQUOTE>
|
|
In computer graphics, tessellation is the process of breaking a
|
|
complex geometric surface into simple convex polygons.
|
|
</BLOCKQUOTE>
|
|
The use of convex polygons allow for better performance in OpenGL.
|
|
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan=4 bgcolor="#ffffff" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
VSPACE="5" HSPACE="10" WIDTH="1" HEIGHT="1"></td>
|
|
<tr>
|
|
<td colspan=4 bgcolor="#000000" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
<tr>
|
|
<td colspan=4 bgcolor="#ffffff" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
VSPACE="5" HSPACE="10" WIDTH="1" HEIGHT="1"></td>
|
|
</table>
|
|
|
|
|
|
|
|
<P>
|
|
<A NAME="musings">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<IMG SRC="../gx/hammel/musings.gif" ALT="Musings" ALIGN="left"
|
|
HSPACE="0" VSPACE="0" WIDTH="247" HEIGHT="52">
|
|
</td>
|
|
</table>
|
|
</A>
|
|
<BR clear=both>
|
|
|
|
<TABLE width=560>
|
|
<tr>
|
|
<td valign=top>
|
|
<H4>
|
|
</H4>
|
|
|
|
</td>
|
|
<tr>
|
|
<td bgcolor="#000000" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
WIDTH="1" HEIGHT="1"></td>
|
|
|
|
</table>
|
|
|
|
|
|
<TABLE width=560>
|
|
<tr>
|
|
<td valign=top width="44%">
|
|
<!-- Book Review -->
|
|
<FONT size=3><B><I>
|
|
OpenGL Programming for the X Windows System</I></B></FONT>
|
|
<BR>Mark Kilgard
|
|
<BR>Addison-Wesley Developers Press
|
|
<P>
|
|
|
|
There are a growing number of Application Programming
|
|
Interfaces (API's) available for Linux that enable software
|
|
developers to create programs that render 3D graphics.
|
|
Some of these are designed to allow programs to output
|
|
data files that can be used by rendering engines to create
|
|
a 3D image either to a display or to a file. The libribout.a
|
|
static library in the BMRT package is an example of this
|
|
kind of interface. It allows the software developer to
|
|
write a program to output a RIB formatted file which can
|
|
then be used by a RenderMan® compliant renderer.
|
|
Other tools are designed for interactive 3D display.
|
|
One such developer tool is OpenGL.
|
|
OpenGL is, if not the grandfather, the God Father
|
|
of all interactive 3D development tools.
|
|
|
|
<BR clear=both>
|
|
|
|
OpenGL is an API designed by Silicon Graphics and now
|
|
managed by the OpenGL Architecture Review Board.
|
|
It is defined by the <I>OpenGL Programming Guide</I>
|
|
as follows:
|
|
<BLOCKQUOTE>
|
|
<FONT size=2>
|
|
The OpenGL graphics system is a software interface to graphics
|
|
hardware. (The GL stands for Graphics Library.) It allows
|
|
you to create interactive programs that produce color images
|
|
of moving three-dimensional objects.
|
|
</FONT>
|
|
</BLOCKQUOTE>
|
|
The interface is a window system independent interface
|
|
to graphics hardware. In order to use OpenGL with a particular
|
|
windowing system, it must be used with a supplemental API.
|
|
This supplemental API allows OpenGL to create its graphics contexts
|
|
and windows in which OpenGL will do its rendering.
|
|
|
|
<BR clear=both>
|
|
|
|
Linux uses as its windowing system the X Window System, as do
|
|
most, if not all, other Unices. To use OpenGL with X Windows, the
|
|
software developer must become familiar with GLX, the X Extension
|
|
for OpenGL, along with one or more toolkits such as the X Toolkit
|
|
(Xt) and a widget set like Motif (Xm). This is not a simple task.
|
|
Just learning Xm can be a full time occupation (I know, it's what
|
|
I do now). Fortunately, Mark Kilgard has provided a very thorough
|
|
text on integrating OpenGL with the X environment:
|
|
<I>OpenGL Programming for the X Windows System</I>.
|
|
|
|
<BR clear=both>
|
|
|
|
This text contains 6 detailed chapters, 1 chapter devoted to
|
|
an example application, and a number of very useful appendices.
|
|
The first two chapters introduce the reader to OpenGL and the
|
|
two libraries that generally accompany it: GLU, the GL Utility
|
|
library that is used for certain operations that are hardware
|
|
inspecific such as polygon tesselation, and GLX. The introduction
|
|
is quite good except for explaining the use of GLU. All OpenGL
|
|
functions are prefixed with "gl" except for the GLU functions which
|
|
are prefixed with "glu". I can understand why they did this, but
|
|
it is confusing to remember that OpenGL is actually two sets of
|
|
functions with different prefixes (as if the X Windows system
|
|
didn't provide enough of these already).
|
|
|
|
|
|
<P clear=both>
|
|
<CENTER>
|
|
<A HREF="#next-column">-Top of next column-</A>
|
|
</CENTER>
|
|
</td>
|
|
|
|
<td bgcolor="#ffffff" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
WIDTH="0" HEIGHT="0"></td>
|
|
<td bgcolor="#000000" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="0" WIDTH="0" HEIGHT="0"></td>
|
|
<td bgcolor="#ffffff" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
WIDTH="0" HEIGHT="0"></td>
|
|
|
|
|
|
<td valign=top width="53%" cellpadding=0 cellspacing=0>
|
|
<table>
|
|
<tr>
|
|
<td valign=top cellpadding=0 cellspacing=0>
|
|
<UL>
|
|
<LH>
|
|
<A NAME="next-column">
|
|
<B>More Musings...</B>
|
|
</A>
|
|
</LH>
|
|
<LI>
|
|
<A HREF="more-musings.html#1">
|
|
Scanner Report
|
|
</A> - what's supported and where to get the software.
|
|
<LI>
|
|
<A HREF="bmrt-part1.html">
|
|
BMRT Part 1: Getting Started
|
|
</A> -
|
|
Creating, Previewing, and Final Rendering of Simple Images
|
|
(>45K text + numerous images)
|
|
|
|
</UL>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
VSPACE="5" WIDTH="1" HEIGHT="1">
|
|
</td>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000" cellpadding=1 cellspacing=0 valign=top>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
WIDTH="1" HEIGHT="1"></td>
|
|
|
|
<tr>
|
|
<td valign=top cellpadding=0 cellspacing=0>
|
|
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN="left"
|
|
HSPACE="8" WIDTH="1" HEIGHT="1">
|
|
<BR clear=both>
|
|
|
|
Chapter 3 is a detailed explanation of how to use OpenGL
|
|
with Motif. The basic premise is that you need to combine OpenGL
|
|
(gl and glu routines) with the X Extension for OpenGL (GLX) and
|
|
the widget set of choice (Xm along with Xt to manage the widget
|
|
set). That seems like a lot of work. Not to mention that writing
|
|
an OpenGL application this way, with the X calls embedded in the source,
|
|
removes the portability that a developer originally had with just
|
|
OpenGL. It would be nice if there were a way to remove the X
|
|
calls and have a truly portable OpenGL application.
|
|
|
|
<BR clear=both>
|
|
|
|
There is. Mark introduces the GLUT library in Chapter 4
|
|
which hides most (not all) of the window system specific API calls
|
|
from the developer. This toolkit, although not necessarily
|
|
appropriate for full-featured OpenGL applications, provides an
|
|
example of a toolkit which can handle window system API's for
|
|
the developer and allow the developer to write a single source code
|
|
base portable to any platform. The toolkit itself can be implemented
|
|
in X, Windows NT or any other windowing system. The application
|
|
developer only needs access to the toolkit.
|
|
|
|
<BR clear=both>
|
|
|
|
Chapter 4 is an introduction to the more basic features of GLUT.
|
|
It covers such topics as window management, callbacks, and font rendering.
|
|
Chapter 5 goes into significantly more depth. Its 90+ pages cover
|
|
topics ranging from lighting and texture mapping to using images
|
|
and bitmaps to curves and surfaces. This chapter will be the one
|
|
most readers will refer to repeatedly when they've gotten past
|
|
their first sample OpenGL programs using GLUT. Chapter 6 covers
|
|
advanced topics such as the X Input Extension, Overlays, and
|
|
peformance issues.
|
|
|
|
<BR clear=both>
|
|
|
|
There are 3 appendices, the most interesting of which is the
|
|
"Functional Description of the GLUT API". This is a reference
|
|
section for the most part although it is not formatted with one page
|
|
per function. This makes it a little hard to find what you're
|
|
looking for since more than one function can be on a page. Other than
|
|
that it's a fairly complete description of the GLUT API. There is
|
|
also a glossary that follows the appendices.
|
|
|
|
<BR clear=both>
|
|
|
|
Mark includes extensive sample code right from the start of the text.
|
|
All the code is available for download from the Internet.
|
|
The code is easy to follow and the accompanying text is well
|
|
written. Although Mark does not spend time explaining how to program
|
|
with the X Windows System (knowledge of which is a prerequisite
|
|
for this text)
|
|
he does thoroughly cover how to integrate OpenGL with the X
|
|
environment. After explaining how this would work he then provides
|
|
detailed information about how to remove the windowing system
|
|
specific calls by using GLUT.
|
|
|
|
<BR clear=both>
|
|
|
|
I find <I>OpenGL Programming for the X Windows System</I>
|
|
a very well-written, thoroughly descriptive explanation on how
|
|
software developers can integrate OpenGL with their X Windows
|
|
applications.
|
|
|
|
</td>
|
|
</table>
|
|
</td>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<P>
|
|
<A NAME="resources">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<IMG SRC="../gx/hammel/resources.gif" ALT="Resources" ALIGN="left"
|
|
HSPACE="0" VSPACE="0" WIDTH="246" HEIGHT="57">
|
|
</td>
|
|
</table>
|
|
</A>
|
|
|
|
<BR clear=both>
|
|
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 not listed here.
|
|
|
|
<BR clear=both>
|
|
<P>
|
|
|
|
<A HREF="http://www.csn.net/~mjhammel/linux-graphics-howto.html">
|
|
Linux Graphics mini-Howto
|
|
</A>
|
|
|
|
<BR>
|
|
<A HREF="http://www.csn.net/~mjhammel/povray/povray.html">
|
|
Unix Graphics Utilities
|
|
</A>
|
|
|
|
<BR>
|
|
<A HREF="http://www.digiserve.com/ar/linux-snd/">
|
|
Linux Multimedia Page
|
|
</A>
|
|
|
|
<P>
|
|
Some of the mailing lists and newsgroups I keep an eye on, where I get
|
|
much of the information for this column:
|
|
|
|
<P> <A HREF="http://www.XCF.Berkeley.EDU/~gimp/">
|
|
The Gimp User and Gimp Developer Mailing Lists</A>.
|
|
<BR> <A HREF="http://www.povvray.org/irtc">
|
|
The IRTC-L discussion list</A>
|
|
<BR> <A HREF="news:comp.graphics.rendering.raytracing">
|
|
comp.graphics.rendering.raytracing</A>
|
|
<BR> <A HREF="news:comp.graphics.rendering.renderman">
|
|
comp.graphics.rendering.renderman</A>
|
|
<BR> <A HREF="news:comp.os.linux.announce">
|
|
comp.os.linux.announce</A>
|
|
|
|
<br>
|
|
|
|
|
|
<P>
|
|
<A NAME="future">
|
|
<H2>Future Directions</H2>
|
|
</A>
|
|
Next month:
|
|
<UL>
|
|
<LI>Height Fields with HF-Lab
|
|
<LI>POV-Ray Tips
|
|
<LI>BMRT Part 2: Shaders
|
|
</UL>
|
|
<BR>
|
|
<A HREF="mailto:mjhammel@csn.net">
|
|
Let me know what you'd like to hear about!</A>
|
|
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H4>Previous ``Graphics Muse'' Columns</H4></center>
|
|
<p>
|
|
<A HREF="../issue11/gm.html">Graphics Muse #1, November 1996</A><br>
|
|
<A HREF="../issue12/gm.html">Graphics Muse #2, December 1996</A><br>
|
|
<A HREF="../issue13/gm.html">Graphics Muse #3, January 1997</A><br>
|
|
<A HREF="../issue14/gm.html">Graphics Muse #4, February 1997</A>
|
|
<P><HR><P>
|
|
<center><H5>Copyright © 1997, Michael J. Hammel <BR>
|
|
Published in Issue 15 of the Linux Gazette, March 1997</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./debian.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./security.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
</BODY>
|
|
</HTML>
|