XGen support in 3Delight for Maya is done using a procedural plugin derived from the code published by Autodesk. Many thanks to J Cube Inc. for their contribution.
Requirements
- This plugin requires 3Delight Studio Pro 11.0.157 or newer. 3Delight for Maya 7.0.61 or newer can also be used (except for "archive" primitive).
- The AbcExport plug-in that comes with Maya is also used by XGen for its file export operation; it will be automatically loaded by 3Delight for Maya upon rendering a scene with XGen primitives.
Creating and Rendering XGen objects
...
- Select the polygon mesh or NURBS primitive that will receive the XGen primitives.
- In the XGen shelf, click the Open the XGen Window button. This displays a wizard that will guide you to set up the XGen collection and description nodes.
- Select the desired primitive type when prompted by the wizard.
- You can assign any shader to the XGen primitives. Just select the XGen description shape and assign to it an any Maya Hypershade material or RenderMan shader, or click (native Maya ones or as one of the 3Delight materials buttons that come in the 3Delight shelf) or any pre-compiled RenderMan shader (via the assignment panel).
- Render the scene as usual with 3Delight. The required XGen files are automatically exported, and the scene is rendered.
Archive Primitive
Using any user-defined objects as XGen primitive is a two-step process. , both steps are described in detail below:
- The XGen archive must first be created, while 3Delight is set as the XGen renderer.
- The resulting archive can be then used in another scene's XGen description.
Info |
---|
The XGen "Archive" primitive type requires usage of 3Delight for Maya's RIB Archive feature, which is limited to 3Delight Studio Pro licenses. |
Warning | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
There appears to be a bug in the XGen archiving Python script involving object instances. A fixed
This bug has been fixed in Maya 2016, so please do not install the modified |
Creating the XGen Archive (Step 1)
- In the XGen Window, go in the Preview / Output tab. In the Output Settings group, make sure that Renderer is set to '3Delight'. You might need to create a XGen description in order to access this setting.
- Make sure the scene is saved.
- Select the objects you want to archive.
- Select the XGen → Export Selection as Archives... menu item (from the main application menu).
- Adjust the export settings and click Export. Note: if nothing seems to happen, try again.
- You should see a Progress Window appear that goes up to 100%.
- The resulting files are a "
.xarc
" file, some ".abc
" files in a subfolder, and some ".rib
" files in another subfolder.
Using the XGen archive as a primitive (Step 2)
- Select the polygon mesh or NURBS object that will receive the XGen description.
- Click the Open the XGen Window shelf button. Follow the wizard to create a new description, choosing Custom Geometry / Archive as the primitive type when asked.
- In the XGen window, select the Primitive tab.
- In the Primitive Attributes group, lower Density to something very low, like 0.02. This is simply to relieve the viewport's initial display.
- In the Archive Files group, click the Add button.
- Choose the .xarc file you exported above.
- You will be prompted to choose if the archive's materials should be imported in the scene. This allows the materials to be edited in the scene; the edits are applied on the archived objects without requiring another archive export. This will be supported in the future but right now it is not supported.
- You should see your archived objects instantiated by XGen in the viewport.
- In the Archive Files group, click the Auto Set button next to the Size slider.
- Change the Density again to trigger a refresh.
- Render the scene with 3Delight.
Rendering a RIB containing XGen primitives with renderdl
For rendering a RIB file containing a XGen object with renderdl, you will need to add the path to the XGen libraries that come with Maya to the PATH
(windows), LD_LIBRARY_PATH
(linux) or DYLD_LIBRARY_PATH
(OS X) environment variable. The XGen objects are procedurally generated during rendering, and this operation uses the XGen libraries.
...