Jump to content

Instancing Instances


Recommended Posts

ok.. i want 100 trees with a 1000 leaves per tree. i want the leaf geometry to be point instanced on to each of the 100 trees which, in turn are point instanced on to my ground.. i've created both points on the tree geometry at the places where i want leaves as well as points on my ground where i want the trees.

i can get the trees instanced over my ground obviously, but it get's tricky when i want to have those 1000 leaves on each of them. since the trees are not being instanced until render time (same goes for the leaf geometry), the leaves don't see the new instanced trees in order to base their own copies and transformations off of..

does this make sense? anyone have any insight as to how to get this working? i thought that maybe by creating the instance attribute manually in sops might work by extreme luck, but it didn't (not suprised)..

thanks everybody,

dave

Link to comment
Share on other sites

thanks for the idea arctor.. unfortunately it's not working.. nothing get's rendered.. well let me clarify that.. if i want to just render the tree otl, i get it perfectly with the tree and all it's leaves.. if i try and instance that otl (or even a subnet of any kind) i get a blank image that renders within micro seconds (as if it doesn't even see anything in the otl/subnet to instance).

if i could actually get an otl or subnet to instance, then i'd be golden..

Link to comment
Share on other sites

Instancing the leaf geometry itself is not generally a wise idea - unless the leaf geometry is very complex and you're going to be close-up to appreciate it.

Why? The overhead for storing the instance attribute and causing mantra to manage all the transforms per leaf is far heavier than the simply copying a 8-poly leaves to a cloud of 100 points. It'll be faster and use less RAM if you use sprites, cards or simple geometry as leaves without instancing. Cards/sprites textured with leaves (even bump-mapped or normal-mapped if you're close enough) should suffice.

Using instancing for entire treefuls of leaves and for the trunks is a good idea, though.

Make 10 leaf configurations and 10 tree trunks and mix and match between them, using Render From File (bounded). You'll end up with plenty of permutations and be able to render fast and ram-frugally.

Read this: Mantra Instancing page on the OdWiki

Take care,

Jason

PS. Mark Elendt once told me the exact RAM overhead that is incurred per instance, but I lost the mail. Anyhow, Mantra needs to manage shaders and transforms per instance too - which is fast, but takes a moment when you're dicking with 100x1000 instances.

Link to comment
Share on other sites

hey thanks jason for the help.. i remember reading that wiki page a while back and just didn't think to apply it this time around. the sprite suggestion was a good one as well.. i started running some tests and i'm liking the results already.

a quick question regarding just general optimization.. say i have a flower bed of like 5 bushes that each have 100 flowers on them. The flowers are somewhat heavy for detailed closeup shots.. let's say 500 poly's each.. would it better to instance the flower on to a single bush and just make copies of the bush and individually place them. Or would you want to copy the flower 100 times to a single bush and then instance the whole thing 5 times.

thanks for the help guys..

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...