Thursday, July 17, 2008

MOSAIC feature ramblings - part 9

Part 9 - The Geometry Setup tab and geometry export types:


GeometryThe "Geometry Setup" tab allows you to control different aspects of how MOSAIC exports geometry objects.

The terminology of the tab can be a little confusing, by "geometry" I'm referring to any Blender object that contains mesh, surface (patch), curve or particle data (I plan on adding blobbies later on).

Something else to keep in mind is that Blender handles this in two parts, the object (container) and the geometry data (datablock), even though MOSAIC's GUI is showing both in one tab.

MOSAIC follows this structure by exporting the object RIB and geometry data RIB separately, this allows efficient sharing of geometry datablocks by multiple objects. This is why you'll see two archive methods and multiple code begin/end menus in the tab.

This topic represents the absolute heart of MOSAIC's export code and I could discuss this in fine detail for weeks, so instead let me try to summarize which geometry and its data can be exported:


Mesh and SDS modifier geometry
  • Double/single sidedness

  • Object/per face smoothing

  • Object/per face solid (flat)

  • Per vertex colors

  • Per vertex UV coordinates

  • Per face normals

  • multiple materials per object

  • multiple materials per face

  • SDS edge creasing

  • Export of all modifiers (be careful about type and ordering)

Particles
  • Multiple particle systems per object

  • Export of Hair, Emitter and Reactor types

  • Supports child particles

  • Showing and hiding the emitter geometry

  • Hair, point, object, group and billboard visualizations

Surfaces (aka in RenderMan as patch)
  • Multiple patches per object

  • Multiple material code is in place but Blender does not support yet

  • Support for both "Uniform" and "Endpoint" UV knots

  • Support for control point "Weights"

Curves
  • Currently ONLY supports Bezier curves (natively supported by RenderMan)

  • Multiple curves per object

  • Multiple materials per object

  • Supports "extrude" for creating ribbons

  • Supports node "tilt" parameter for ribbon control points

  • Uses nodes "radius" parameter to further tweak per node extrude

  • Support for cyclic curves (periodic, some renderers don't support this)

Dupli Objects
  • Support for DupliFrames, DupliVerts, DupliFaces, and DupliGroups

  • Support for dupli lights and cameras

  • Support for shadow mapping on dupli lights (basis for occlusion rigging)

  • Duplis make automatic efficient use of RIB archives

Now let's begin listing the controls, I'll break them down by group explaining what each group does and then outline each control in that group.


Navigation and RIBset management:
This group of controls is at the top of the tab and allows you to select available geometry objects, updating all controls and Blender selections accordingly. It also has controls for creating, deleting and selecting RIBsets for this tab.

Here's a breakdown of the controls in this group:

  • Select Geometry - This will show a list of available geometry objects for selection, once selected it will update the current active object selection and all controls in this tab.

  • Select RIBset - This will show a list of available RIBsets for selection, once selected it will update all controls in this tab.

  • Create New RIBset - This will create a new RIBset from the current RIBset control settings and select it.

  • Delete This RIBset - This will delete the currently selected RIBset and select the DEFAULT RIBset.


Code management:
This group of controls is for attaching user created code fragments (text file with the "cf_" prefix in their names) to the beginning and end of different RIB blocks. As the previous group, this group of settings is available in various configurations for all the remaining tabs.

Here's a breakdown of the controls in this group:

  • Object Archive - This menu allows you to specify whether the exported RIB code for the object is exported into a separate RIB archive ("Read Archive") or inlined into the scene RIB ("Inline Code"). For this tab there is also a "Delayed Archive" selection, this uses the delayed read archive call which only loads the RIBs for the object in memory if its bounding box is on camera (great for animations with lots of objects).

  • Datablock Archive - This menu allows you to specify whether the exported RIB code for the datablock (geometry data) is exported into a separate RIB archive ("Read Archive") or inlined into the scene RIB ("Inline Code"). For this tab there is also a "Instance Object" selection, this uses the ObjectBegin/End blocks just before each frame block in the main RIBs for instance calls. These make efficient use of memory but are limited as to which RIB code can be used in them (see the RiSpec or your renderer's manual) and are not as efficient to export.

  • Object Begin Code - This allows the insertion of custom code fragments into the beginning of the object RIB archive before anything MOSAIC exports.

  • Geometry Code - This allows the insertion of custom code fragments directly in the object RIB after the objects geometry (if any). This is handy for creating custom geometry code such as using Quadrics by hand.

  • Object End Code - This allows the insertion of custom code fragments into the end of the object RIB archive after anything MOSAIC exports.


Shader management:
This group of settings is available in various configurations for all the remaining tabs and is for selecting shaders for the selection.

Here's a breakdown of the controls in this group:

  • Atmosphere Shader - This will select an atmosphere (fog) shader that will only affect this object.
  • Notes - This will display a popup of any notes attached to shader fragment by the author (usually containing information about which Blender controls are used by this shader).

Also note that the built-in vs_MOSAICfog shader automatically uses all Blender's world Mist settings and uses the HorRGB color for the mist. This means that setting up and using the world mist should feel identical to using it in Blender.

Note : Immediately following this blog series I will be rewriting the built-in shader system so some shader related information may change.

Pass utilities:
This group of controls is for creating specialty render passes related to this object.

Here's a breakdown of the controls in this group:
  • Enable Environment Mapping - This will generate a scene and render pass entry for a environment map for this object using the current scene as its beauty pass. There will be a future blog covering this in more detail latter.

  • Edit - This will pop-up the environment map dialog for editing the environment pass if it exists.


Options and attributes:
This group of controls is for setting object related options and attributes for this object.

Here's a breakdown of the controls in this group:

  • Shading Rate - This will bypass the current scenes shading rate for this object only (0 uses scene's shading rate).

  • orient - This allows you to manually specify the geometry orientation as left or right handed (DEFAULT export nothing).

  • shading - This allows you to manually specify smooth or constant shading interpolation, see you renderer's docs for more info (DEFAULT export nothing).

  • para class - This lets you set which parameter class to use. These let you specify if "facevarying" or "facevertex" is used for UV and color mesh data which can produce very different result depending on your renderer.

  • DisplaceBound - This lets you specify how much displacement bound to use (0 exports nothing). This parameter is used by RenderMan to extend the objects bound box to make room for displacement shaders that push geometry out of bounds. This is necessary because most RenderMan renderers use the object bounds to limit shader calculations and will clip anything that falls out of bounds.

  • CoorSystem - This specifies the coordinate system to use for the displacement bounds, see you renderers docs for more info.

  • cull hidden - Whether or not to cull hidden primitives, see your renderer's docs for more info (DEFAULT exports nothing).

  • cull backface - Whether or not to cull backfaces, see your renderer's docs for more info (DEFAULT exports nothing).

  • dice binary - Whether or not to use binary dicing, see your renderer's docs for more info (DEFAULT exports nothing).

  • dice raster - Whether or not to use raster oriented dicing, see your rendere'rs docs for more info (DEFAULT exports nothing).

  • trace displace - Whether or not to raytrace displacements, see your renderer's docs for more info (DEFAULT exports nothing).

  • trace motion - Whether or not to raytrace motion blur, see your renderer's docs for more info (DEFAULT exports nothing).

  • Use Object in Animations - This option allows you to manually take advantage of a "speed hack" in MOSAIC. This option can drastically improve export times in an animation for any object that is not animated. If enabled them MOSAIC will only export this object on the first frame of this animation and will then just re-use it without recalculating any of its data. Even though this option is on by default (to eliminate confusion) you should always disable this for ALL objects not being animated for much improved export times :)

  • Extend Bounds Calculations - This is another speed hack and is disabled by default. Some RenderMan renderers require that particles and the motion of a motion blurred object within the shutter be contained in a bounds box. You can tell if this is the case if your renderer clips a motion blurred object or particles. The calculations for recalculating the bounds for these (especially for particles) can be excessive and not necessary for all renderers.

  • Transform MBlur - This enables the motion blurring of the objects transform motion, that is the change in the objects position, rotation or scale.

  • frames - This specifies the number of frames to blur across.

    Note : MOSAIC begins the blur by this number before the current frame so blur leads to current frame.

  • Geometry MBlur - This enables the motion blurring of geometry motion, that is the morphing of vertices or control points of the geometry.

    Warning : this can be very slow for dense geometry and it is recommended you stick with transform MBlur unless the geometry is morphing far and fast enough to actually see it blur.

  • frames - This specifies the number of frames to blur across.

    Note : MOSAIC begins the blur by this number before the current frame so blur leads to current frame.



Well, that's it for the geometry tab... next up is the "Lights Setup" tab :)

Thanks for reading, WHiTeRaBBiT

2 comments: