MantraProcedurals
From Odwiki
Contents |
What is a MantraProcedural?
A procedural is a plugin to that will allow mantra to generate geometry on the fly at render-time.
Implemented procedurals
Mantra has the following procedurals in the standard distribution:
- HScriptInstanceProcedural : tell mantra of a node type and its parameters and it will generate the geometry for you at render time.
- Caveat: This will call hscript (and use an hscript license) for each object rendered this way.
- SpriteProcedural : mantra will instance cards (quads) onto supplied particle points and apply a shader to it.
- FurProcedural : mantra will procedurally generate fur/hair based on a skin mesh as well as optional guide, clump and parting curves.
- Image3DIsoTextureProcedural : an IsoSurface will be generated from an i3d file.
- PolygonizedMetaballsProcedural : mantra will generate a polygonal mesh from supplied Metaballs. Note: This method is not as efficient as rendering metaballs directly in mantra.
- This allows for displacement shading of metaballs
- This allows for motion blur of metaballs
- RunExternalProgramProcedural : mantra can execute an external program to generate geometry for the beginning and end of frame (for MotionBlur purposes)
Making your own procedurals
Where to look
- You'll want to look at the VRAY_Procedural.h header file.
- If your procedural is based on an iso-surface, you might also want to look at VRAY_ProcIsoBase.h which has a method called evaluateDensity() (similar to the GU_Iso.h class)
- In the samples, there's a very simple VRAY_DemoBox procedural which renders a box as it's procedural.
Installing a new procedural
Aside from the built-in procedurals, you have to tell mantra where your plug-in procedural can be found. This is done by installing a file called VRAYprocedural (please see the VRAY_DemoBox for an example of this).
See also InstallingPlugIns



