Nested pack geo - per instance

   1218   0   0
User Avatar
Member
61 posts
Joined: 2月 2006
Offline
Hi,

I don't know if this is an obvious question but it's the first time I have actually encountered it. Most of the time, I've used style sheets to edit basic existing material params on crowds or debris groups but that's normally my overide - on an existing group.

I was planning to use nested unpacking to vary textures randomly on objects but then realised that my stylesheets work on groups, not the instances. Of course, it's straightforward with copystamping or pointinstances with a vex wrangle but how do I go about that in JSON? The way round I hacked was to make some separate “entire” groups before packing, for the entire objects with different names then reference that but it seems very inefficient and would be quickly cumbersome for a large number of random texture variations. Before I go down the research route, just wanted to check I am not missing something really obvious with stylesheets (like I say, I've mostly just tweaked them before but I need to get a bit deeper into them this time).

The help card file “sop_example_unpackwithstyle” is a good starting point. Again, this is based on groups but how to make it work on “per copy” method instead? So that these spheres receive a separate random texture overide per object, not per group. So in the help card example, where the shader color overide is, for example,

“baseColor” :

Switch that out to a “baseColorMap” parameter of the shader with a randomly referenced map off disk or even a different material, applied to an entire instance (say via id or pt, not sure how/if that's possible in JSON), not just the group. Or do I need to fall back on point instance for that or maybe setup a renderstate VOP in the shader?

Thanks.

Edited by frankvw - 2018年2月5日 11:29:56

Attachments:
sop_example_unpackwithstyle.jpg (68.7 KB)

  • Quick Links