Jump to content
nicholas_yue

VRAY : Single or multiple bounding boxes for lots of geometry

Recommended Posts

Hi,

 

  When generating lots of geometries e.g. hair, fur, particles, grass etc, I am currently doing something like this

 

    gdp = allocateGeometry();
 
    // Build all the geometry in gdp
 
    // Create a geometry object in mantra
    openGeometryObject();
 
   // Add the geometry
   addGeometry(gdp, 0);
 
 
    closeObject();

 

    However, I see that there is only one bounding box via getBoundingBox()

 

   Should I leave it to Mantra's optimization to deal with the billions of geometry or should I help by splitting them up into chunks and have bounding box for each "chunk" so as to keep Mantra's memory footprint in check.

 

    If taking the multiple bounding box approach, would I be looking at recursive procedural ?

 

    In any case, with multiple bounding box, is there any example I can have a look at ?

 

Cheers

 

Share this post


Link to post
Share on other sites

If you are only doing a single procedural then you can really only give Mantra a single bounding box for your entire geometry.  If you want to be able to do the multiple bounding boxes based on some pre-defined groups or patches then yes, you'll need to build your procedural either recursively or using a different child procedural.  For procedurals that do generate lots of geometry from well defined areas it is generally best to use this approach.

Share this post


Link to post
Share on other sites

If you are only doing a single procedural then you can really only give Mantra a single bounding box for your entire geometry.  If you want to be able to do the multiple bounding boxes based on some pre-defined groups or patches then yes, you'll need to build your procedural either recursively or using a different child procedural.  For procedurals that do generate lots of geometry from well defined areas it is generally best to use this approach.

Thanks Graham, this will dove tail nicely with LOD too.

 

Cheers

Share this post


Link to post
Share on other sites

If you are only doing a single procedural then you can really only give Mantra a single bounding box for your entire geometry.  If you want to be able to do the multiple bounding boxes based on some pre-defined groups or patches then yes, you'll need to build your procedural either recursively or using a different child procedural.  For procedurals that do generate lots of geometry from well defined areas it is generally best to use this approach.

Hi Graham,

 

Where can I find example of recursive procedural and child procedural ?

 

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×