Installing Blue Moon Render Tool for Windows
Background
The Blue Moon Render Tool, most commonly refered to as BMRT, is a RenderMan compliant renderer. The main component of BMRT is the renderer which converts RenderMan Interface Bytestream (RIB) files. In addition the package contains header and lib files so you can develop C programs which generate RIB files.
BMRT was developed by Larry Gritz in the early 90s. The last version developed was 2.6Beta which you can download from my graphics home page.
Introduction
This document will help you set up BMRT in a windows environment using Microsoft Visual C++ 2005 Express. You can use almost the same method for other Windows based C compilers.
Downloading
Start off by downloading the various components needed to set up the software. Firstly check out my Graphics home page where you will find the Blue Moon Render Tool as well as various libraries and tools you will need. Save these files in a temporary folder somewhere.
Note: The Bezier tools set is not required to use BMRT but it will help you create more natural movement effects which my lecturers like to go on and on about;)
Next you need to get a copy of Microsoft Visual C++ 2005 Express from their MSDN download site. It is free to download and use, I do recommend registering your copy as it gives you access to some usefull programming resources and updates.
If you have different Visual Studio 2005 product which incorporates the C++ compiler you don't have to download this. If you have other Visual Studio Express products you will still need to download this as it contains the C++ compiler we will be using.
Installing
Go through the Visual C++ 2005 Express installer first, I highly recommend installing MSDN library at this time. It does increase the download size but it is worth doing and once completed it is out of the way.
Blue Moon Render Tools
Now extract the files from the BMRT package it will create a directory called BMRT2.6. Here is the content of the directory.
File listing BMRT2.6beta.intelnt.zip
- bin - Directory with binaries to view and render rib files.
- doc - HTML and PDF versions of the BMRT documentation
- examples - Example rib files for you to render and view
- include - header files required to develop C programs.
- lib - Lib files for linking in to your C projects.
- Shaders - Example shader source files.
- .rendribrc - rendrib resource file for default values.
- Changes - Changes file
- License - License file
- README - ReadMe file
- Win32README.html - Windows ReadMe file
There are two ways of setting up the include and lib files with Visual C. I prefer copying the BMRT lib and header files to the Visual C include and lib directories. By doing this using the command prompt compiler is much easier. The alternative is to set the directories up in Visual Studio. I'll show you both.
Method 1 (my preference)
Copy the files in the include directory to the Visual C include directory. There should not be a file conflict. If you prefer create a new directory in the Visual C include directory but remember when you write your include you must include the subdirectory #include <bmrt/ri.h>.
These are the default locations for Visual C++ 2005 Express Include and Lib directories.
- C:\Program Files\Microsoft Visual Studio 8\VC\include - default include directory
- C:\Program Files\Microsoft Visual Studio 8\VC\lib - default lib directory
Now copy the BMRT2.6 directory from the zip file to your program files
Alternative Method
Copy the BMRT2.6 directory from the temporary location to your program files directory, or any other location you prefer (program files seems sensible). Start up Visual C++ Express 2005 and go to tools -> options.
using the show directories for dropdown select include files and use the new folder icon to create a new include location. Type in the location of yoru BMRT directory, don't forget to add include to the end.
Do the same for the library files adding lib to the end.
With this setup you can still build your code in the IDE but you will need to add extra details to your make files if you want to compile programs from the command line.
Environmental Variable
To use the rendrib.exe renderer and the rgl.exe OpenGL realtime preview renderer we need to add two values to the environmental variables. Right click on my computer and click properties. Select the Advanced tab and click on the Environment Variables button. Add the BMRT2.6/bin directory to the path variable.
Now create a new variable called BMRTHOME and set this to your bmrt2.6 directory. Note you must use dos safe naming so in the example below you see the naming if the directory is stored in the Program files directory.
BMRTHOME | C:\Progra~1\BMRT2.6
Path | [default values];C:\Progra~1\BMRT2.6\bin
Do not delete the values already stored in the path variable. Windows and other programs store importatn information here. Just add a semicolon the end of the line and add the bmrt bin directory.
Success!
At this stage you have fully set up the Blue Moon Render Tool and you should be able to render the example rib files bu running the following command.
change directory to the bmrt examples directory
rendrib cornell.rib [creates a tiff file with the rendered image]
rgl limbo.rib [opens a real time rendered window]
Configuring Make files
To build projects using the microsoft nmake program you need to create a make file. Here is the file listing of lamp.mak (which you can download from my graphics home page)
all: lamp
lamp.obj: lamp.c
cl /c lamp.c
lamp: lamp.obj
link lamp.obj libribout.lib libc.lib libci.lib /nodefaultlib:libc.lib /nodefaultlib:libcp.lib /out:lamp.exe
If you have used my recommended install method above this is all you need. If you have opted to keep the header and lib files in the BMRT2.6 directory you need to use the following code in your make file.
all: lamp
lamp.obj: lamp.c
cl /I$(BMRTHOME)/include /c lamp.c
lamp: lamp.obj
link lamp.obj /libpath:$(BMRTHOME)\lib libribout.lib libci.lib /nodefaultlib:libc.lib /nodefaultlib:libcp.lib /out:lamp.exe
When you try to compile from the command line it is important that you open a command prompt from the Visual Studio Tools menu on the start bar. This ensures the compiler settings are all correct. DON'T JUST RUN CMD FROM THE RUN MENU.
The books above are very good references for RenderMan 'stuff'. The book below is great for the shader stuff, important to make things look nice.
Ads -> 


