CSG and Showplace
Hi John,
No, the answer isn't obvious…don't worry, you're right at the
cutting edge!
I've only worked with Showplace 1.x, and have not yet had time with
version 2.0. Unless there's been a major change in its RIB file
output, the following method should allow for CSG operations in
Showplace.
First model your objects in MacroModel. Assume we're subtracting a
cylinder from a sphere. Position them, name them, and link them
together. (Linking is discouraged in the MacroModel text file on the
topic — however, linking *can* be used in a variety of ways.)
Import to Showplace. Do what you will here, then "Render To File…"
as RIB using the popup menu. (This is not really mentioned in the 1.0
documentation, but is how to get a RIB file out of Showplace.)
Open the RIB up in a text editor. You'll see that the Showplace RIB is
not nearly as clear as the MacroModel file, at least in Showplace
1.0. I'd recommend reformatting it to make it clearer.
Kevin Bjorke of Pixar turned me on to Pete Rice's "Alpha" text editor,
and it's invaluable! By selecting a paragraph of geometry and
choosing "Paragraph to Line" from the Convert menu, we can make the
geometry scroll off the right side of the window, out of way. Then
selecting everything *between* matching "AttributeBegin/AttributeEnd"
pairs and choosing "Shift Right" from the Edit menu, the object
blocks will be neatly tabbed as in MacroModel. Finally add a line
return between object blocks. The file is now tons easier to work
with!
At this point you can use the standard "primitive", "intersection",
"difference", and "union" operators just as in MacroModel. I assume
you're comfortable with this stuff; if not, please let me know.
NOTE: The reason this works is that Showplace retains object
hierarchies during import, but flattens them down when exporting as
RIB. If we tried to subtract a child from its parent in a MacroModel
RIB file we'd get positional shifts because the spatial
transformations are concatenated together — this is why the mModel
docs discourage linking. Because Showplace flattens the hierarchies,
we can take advantage of them while setting up the scene, and bypass
them during text editing.
I'm glad you're using the CSG operations in RenderMan, John…go for
it!