Jump to content

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

 

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...