BMRT2.4 Win32 notes (Dec 1, 1998)


QuickStart

If you already had BMRT installed on your machine, please remove the old directory and all its contents before installing.

After unpacking the distribution onto your machine (let's say you put it in C:\BMRT2.4 for this discussion), open up a Windows shell (a.k.a. "Command Prompt" under "Programs" in the Start Menu).

change directories to the examples directory (you type the part in bold):

C:\> cd BMRT2.4\examples
C:\BMRT2.4\examples\> 

test rgl

try the OpenGL-based RIB previewer on some rib files (you type the part in bold):

C:\BMRT2.4\examples\> c:\BMRT2.4\bin\rgl teapots.rib

hit the esc key or q to close the window after it finishes rendering.

C:\BMRT2.4\examples\> c:\BMRT2.4\bin\rgl limbo.rib

test slc

try to compile some shaders (you type the part in bold):

C:\BMRT2.4\examples\> c:\BMRT2.4\bin\slc funkyglass.sl
C:\BMRT2.4\examples\> c:\BMRT2.4\bin\slc screen_aa.sl
C:\BMRT2.4\examples\> c:\BMRT2.4\bin\slc screen.sl

test rendrib

try to render a scene using the hybrid raytracer/radiosity renderer (you type the part in bold):

C:\BMRT2.4\examples\> c:\BMRT2.4\bin\rendrib -d 16 shadtest.rib

After the renderer finishes rendering, click the title bar of the window with the image, hit the w key to write out a TIFF file of the window, and then hit the esc key or q to close the window.


If everything worked okay, you're all set!

setting environment variables


If you use WinNT: edit your environment

Right click over the "My Computer" icon and select "Properties". Go to the "Environment" tab. You'll want to add the bin directory of where you installed BMRT to your PATH variable, set the HOME variable to where you installed your .rendribrc file (there's an example in the BMRT2.4 directory), and your SHADERS variable to the shaders directory of BMRT2.4.


Variable: PATH
Value:.....;C:\BMRT2.4\bin

Variable: HOME
Value: C:\BMRT2.4\

Variable: SHADERS
Value: C:\BMRT2.4\shaders


If you use Win95: edit autoexec.bat

You will want to add a few items to your autoexec.bat file. You should add BMRT2.4\bin to your PATH, set SHADERS to BMRT2.4\shaders, and set your HOME to wherever you want to put your .rendribrc file (see BMRT2.4\.rendribrc for an example of such a file).

More specifically, if you installed BMRT on your C: disk at the top level, you could add the following to the bottom of your your autoexec.bat file:

set PATH=%PATH%;C:\BMRT2.4\bin
set HOME=C:\BMRT2.4\
set SHADERS=C:\BMRT2.4\shaders

HOME

Other programs (notably GNU Emacs, which I use), also look at the HOME environment variable, so you might be better off to leave it wherever you already have it set to (assuming you do), and copy the .rendribrc file there.

using slc

In order to use the shader compiler (a.k.a. slc), you'll need to have a working version of the C PreProcessor (a.k.a. cpp) in your path. I've included one in BMRT2.4\bin, from the fine folks at www.cygnus.com.

One caveat: if you have a C development environment installed, such as Borland's, it might find the cpp.exe that comes with that environment. Unfortunately, the output of Borland's cpp.exe seems non-standard, so BMRT can't use it. If you run slc and you get:

slc Error: (line 1) parse error
No Code generated

That probably means slc is picking up the other cpp. You might want to zap your path right before you compile shaders to just point to bmrt's bin directory. The other problem (if you're running under Win95) is that Norton Antivirus might be interfering.


using rendrib and rgl

In order to use the OpenGL-based RenderMan preview renderer (a.k.a. rgl) or see preview renders by the radiosity/raytracing hybrid RenderMan renderer (a.k.a. rendrib), you'll need to have OpenGL installed on your system. It's obvious why rgl needs OpenGL, but rendrib needs it also because it uses OpenGL to display the output of the renderer if you choose "framebuffer" as your output type, or if you use the "-d n" flags on the command line.

Originally, we bundled Microsoft's and SGI's OpenGL DLLs with BMRT, but that seemed to cause more problems than it solved. So... we've decided that it's up to you to make sure you have OpenGL installed (which seems to be the majority of folks out there, hence our change).

If you're running WinNT 3.51 or greater, it should already be there (it's OpenGL32.DLL and GLU32.DLL in your WindowsNT\System32 directory). If you have a recent version of Win95 (OSR2 or greater) it should also be there (the DLLs will probably be in Windows\System). If you don't have it installed, Microsoft makes it available at ftp://ftp.microsoft.com/softlib/mslfiles/OPENGL95.EXE.

Finally, if you have a 3D accellerator; check your board and chip manufacturers (they're probably not the same company) for the latest OpenGL drivers - most have them these days, and they're getting pretty good. Don't worry - the MS OpenGL DLLs will pass through to the hardware if it's there.

Finally, don't forget the -d options to rendrib; it will display the results directly to the screen. I like to use -d 16, to see things as quickly as possible:

c:> rendrib -d 16 foo.rib

And then you can press w over the window after the renderer finishes to write out a TIFF file (esc key or q will quit and close the window).

Please note that Windows (NT, at least) built-in TIFF viewer can't seem to read TIFF files that have an alpha channel, so any RIB files that have their last argument to Display as "rgba" (as opposed to "rgb") won't be able to be displayed by this lame-o piece of software. Never fear, though - BMRT is writing a valid TIFF file, and a real application (say, Adobe PhotoShop), has no problem reading it.


using the client library, libribout

Currently, we're only making a VisualC++ version of the client library available. Also note that this library has C++ linkage, meaning your code should be C++. See examples/colorSpheres for an example.

I had hoped to change this before the final release, but real work schedules got in the way. If this is really killing you, let me know and I'll try and get to it sooner. As it is, no one has complained that it's stopping them from using it.

I also plan on having a gcc compiled version of this library at some point, but again, it's a question of priorities. If you feel strongly that you need a gcc compiled version of this library, send me mail.



Issues specific to the Win32 port


Known Incompatibilities/Limitations

Due to a lack of experience with dealing with dynamic linking and loading on Win32, the various new capabilities w/respect to those capabilities are currently disabled in the Win32 version of BMRT 2.4. If some able programmer is willing to serve as an info resource to me with regard to how to map UNIX style dynamic linking and loading, I'd be happy to entertain the notion of bringing this up to spec with the UNIX side. No guarantees, though...

Other Issues

We've also got two reports of people having trouble compiling shaders; one was trying to compile some files remotely from a Novell mounted disk (there seems to be some weirdness with re: piping output around), and the other is more mysterious - it acts like he has another cpp in his path, but he doesn't seem to. This seems to only happen under the first version of Win95, and might be related to virus protection software - if you run into this, try turning off Norton and see if it goes away.

Also, (and this seems to be an ELSA GLoria Synergy NT driver problem), running rgl on multi-frame RIB files (say, for example, exmamples/limbo.rib) causes something funky with the z-buffer. This affects me directly, and if you have any ideas what's tickling it and/or how to fix it, I'd love to hear it.

We're also concerned and interested in hearing people's performance experiences of this port vs. (say) the same version of BMRT on Linux on the same hardware. I've tried to do all the right things in compiling this code for Win32 (NT4+SP3, VisC++ 5+SP3, "Maximize Speed" optimization setting, Pentium code generation, __cdecl* calling convention, Single-Threaded*, 4 byte structure alignment), but given my lack of battle-hardened Win32 experience, I would be happy to entertain well thought out suggestions about how to convince the compiler to emit better/faster code.



Additional resources

The obvious place to start, after reading the documentation here, is BMRT's home page. Since BMRT is a RenderMan renderer, the best place to ask questions on the InterNet is the netnews group comp.graphics.rendering.renderman. Also, there's a nice set of notes/tutorials by Johan Aberg on how to integrate BMRT with Rhino, which is a really nice NURBS modeller on Win32 (currently the beta is free!).

If none of that helps, Larry Gritz wrote BMRT, so if it's a BMRT specific question, he's the man to ask : gritzl@acm.org.

If it has something to do specifically with the Windows port of BMRT (this is the first official release Win32 is supported, so I'm sure there are Win32 specific issues), I (Michael B. Johnson) did the Windows port, so feel free to bother me directly : wave@media.mit.edu. Please keep in mind that I'm not the most Windows savvy guy around (this port constitutes the first thing of real substance I've done on Windows, so...), but we want BMRT to run smoothly there, so your comments/bug finding is appreciated.


Michael B. Johnson <wave@media.mit.edu>

Last modified: Tue Dec 1 01:03:20 PST 1998