home *** CD-ROM | disk | FTP | other *** search
- This little note is intended to clue the interested reader into how to
- take random RIB files exported from any of various modeling packages
- and turn them into nice, useful eve code that can be incorporated into
- your own models.
-
- Q: Where can I get RIB files?
-
- A: Unfortunately, there is a dearth of models in RIB format available
- on the net. Hopefully, with the advent of software like the
- WavesWorld's 3DKit for NEXTSTEP and the Blue Moon Rendering Tools (a
- shareware set of RenderMan compatible renderers for UNIX), this will
- change. In the meantime, if you access to any of a wide variety of
- commercial modeling packages, many of them put out RIB already.
- Almost all Mac packages, and several high end packages (Alias,
- Vertigo) put out RIB. Of course, all NEXTSTEP 3D apps put out RIB.
-
- If you have a Macintosh, Pixar's ShowPlace product comes with a
- really, really high quality set of clip art - it's worth the price
- of the product just for the clip art.
-
-
- Q: I got a RIB file, what do I do before I start working on it?
-
- A: Before dropping it into a WW3DWell, make sure that the file is
- probably an ASCII RIB file. WavesWorld doesn't like ctrl-M, which is
- what the Mac uses instead of ctrl-J as a carriage return, so you should
- change that. Next make sure that it's not a binary or mixed ASCII/binary
- file. The RIB spec supports this, but I don't. I have tools which I
- can't distribute that let me translate though, so send me the file and
- I'll send you back the pure ASCII equivalent.
-
- Q: Now what?
-
- A: Once you're reasonably certain you have a pure ASCII RIB file with
- valid UNIX carriage return/linefeeds, drop it into a WW3DWell. If there
- are any errors, a panel will pop up telling you what the problem is.
- The way this works is that the WW3DWell takes the RIB file and tries to
- turn it into a valid eve file. For help in debugging, it writes this
- file to /tmp/tmp.eve. It then "source"s that file. Any errors that
- pop up will be referring to lines in that file, so this is important.
-
- Q: My model looks totally wrong: what do I do?
-
- A: The most probable reason is that you need to have the "Treat
- TransformBegin/End pairs the same as AttributeBegin/End" on the Rib
- sub panel of the WW3DWell Control Panel. Select that and drop the
- RIB file in again. If it still looks wrong, send me mail.
-
- Q: I don't even see anything. What do I do?
-
- A: Currently, the WW3DWell isn't very smart about where the camera
- starts off. What it *should* do is look at the bounding box of the
- new model, look at the field of view of the current camera, and set up
- the camera so that you can see the whole new model. Eventually, but
- for now... Take a look at the bounding box info for the new model.
- If the number are very small (under 1.0) you probably want to zoom in;
- if the numbers are large (larger than, say, 5) you probably want to
- zoom out.
-
- Q: Okay, I see my model. What next?
-
- A: The model you imported may have colors, opacity, and shaders that you
- don't want. If you don't want these attributes in your model, you can
- check the appropriate choice on the "Rib" sub panel of the WW3DWell
- Control Panel and when the WW3DWell parses your rib file, it will
- ignore the corresponding commands.
-
- On the other hand, your RIB file might contain important color
- information regarding your model. Unfortunately, because of the way
- the WW3DKit works, it can't easily color shapes if you have your own
- Color commands as part of your shape. Since the WW3DWell's way of
- showing you selected object assumes that you don't have any RiColor()
- calls in your model, this can be a problem. Fortunately, there's a
- nice trick to get around this. In your eve file, do a global replace
- and change all calls like:
-
- Color {redValue greenValue blueValue};
-
- into
-
- ArchiveRecord comment Color {redValue greenValue blueValue};
-
- This will keep the information in your model at the appropriate place,
- but it will allow you to turn off the color calls while you browse
- your model.
-
- The WW3DWell tries to figure out what to call each block of information
- imported from a RIB file, but not all RIB files actually name sections.
-
- A rather nice way to deal with this is to use the shape browser in the
- WW3DWell control panel. By double-clicking on a name, you can edit
- it. Note that the WW3DWell's camera doesn't automatically track your
- selection; you need to click in the WW3DWell to get it to redraw so
- you can see the selection. (This was a performance trade-off; many of
- my models are complicated and I hated waiting for the redraw each
- click - I should probably make this selectable...)
-
- Once you've renamed everything to your liking and saved out the model
- to a new file, you can change the ArchiveRecord comments back to the
- real Color calls.
-