how to instance mutlimaterial bgeo ?

   2903   7   2
User Avatar
Member
383 posts
Joined:
Offline
Hello,

I 'm trying to instance trees .
they have leaves and trunk material.
But when I sue instance point, i can apply only one material to the entire object.
So I separated the trees in 2 parts

But what if I would like to instance an object with, let say, 10 materials ?

I tried delayed load a little but without success …

thanks for your help
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
279 posts
Joined: Dec. 2009
Offline
Split your tree geo by material, then instance X times for each.
2 materials, 2 instances, 3 materials, 3 instances, etc…
It's more complicated if you use packed primitives…
User Avatar
Member
383 posts
Joined:
Offline
this is what I did for the trees but …
Now I need to instance characters from another soft with dozen of differents surfaces.
This method will drive me crazy

I need something more efficent ..
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Staff
2597 posts
Joined: July 2005
Offline
vbk!!!
this is what I did for the trees but …
Now I need to instance characters from another soft with dozen of differents surfaces.
This method will drive me crazy

I need something more efficent ..

Packed primitives are an easy way to do instancing. You might want to read this post [sidefx.com]
User Avatar
Member
383 posts
Joined:
Offline
thanks for the link.

I was thinking the packed primlitive was only for the copy at SOP level …
Obviously, I misunderstood something !
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
383 posts
Joined:
Offline
ok
that's better !

But now I am stuck with the renderstate …
It seems it doesn't find the attribute create on one of my primitive group.

I made a simple scene test.
Maybe could you take a look and explain what I did wrong.

thx

Attachments:
packTEst.hip (148.7 KB)

http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
8621 posts
Joined: July 2007
Offline
renderstate packed:<attribname> will get attribute that's on the packed primitive, not inside

because you are creating attribute before packing, you can't get it by that function

so you either make sure that you create that attribute before packing

or much much easier, just use Bind VOP in your shader to get sphereColor vector attibute you created
it should work for your current setup
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
383 posts
Joined:
Offline
the bind VOP works thanks Tamte.

I would like to make color variation on my instanced sphere.
What should be your method ?
FOr the moment I am just stuck …


edit :

Forget it, It's ok now.
http://vimeo.com/vbkstudio [vimeo.com]
  • Quick Links