queenmandarin Posted July 9, 2014 Share Posted July 9, 2014 Hi everyone. I'm currently working on a project where I need a swarm of butterflies flying towards a general direction. I got the animation down, but I'm just stuck with the shading/texturing part. I've tried Show Am All, but it doesn't work with multi-grid textures (there are 4 image files per texture, and 5 textures in total). Is there a way to assign random multigrid textures to a copy stamped crowd sim? I would appreciate the help, thank you in advance! Quote Link to comment Share on other sites More sharing options...
xray Posted July 11, 2014 Share Posted July 11, 2014 Lots of ways to do this. Hard to say what's best without some kind of example. Two suggestions 1) Set up five shaders, one per shader set. Create a primitive string attribute on your geometry called "shop_materialpath" and set it to one of the five shaders using copy-stamping 2) Instead of setting up five shaders, build all five textures into a single shader. Use some kind of point numerical attribute on your geometry to toggle a switch statement in your shader to determine which texture set to use. There are probably a number of other ways to achieve the same effect. Quote Link to comment Share on other sites More sharing options...
anim Posted July 11, 2014 Share Posted July 11, 2014 you can as well just create string attribute on your points that contains the full path to your textures (like per point path) make sure you pass that attribute to copies using Copy SOP/Attribute tab and if the name of that attribute matches the name of the texture parameter(actual name, not label) on your shader it will be automatically used so you can have literally different texture per butterfly with just one shader you will not see any difference in viewport though 1 Quote Link to comment Share on other sites More sharing options...
rayman Posted July 11, 2014 Share Posted July 11, 2014 you can as well just create string attribute on your points that contains the full path to your textures (like per point path) make sure you pass that attribute to copies using Copy SOP/Attribute tab and if the name of that attribute matches the name of the texture parameter(actual name, not label) on your shader it will be automatically used so you can have literally different texture per butterfly with just one shader you will not see any difference in viewport though Correct me if I`m wrong, but I think that attributes must be set on prims to override shader parameters. So you have to promote them after copy sop. Quote Link to comment Share on other sites More sharing options...
anim Posted July 11, 2014 Share Posted July 11, 2014 (edited) they generally don't have to be prim attribs, vertex, point, prim, detail are fine (used in that order, so if detail and point Cd is present, point is used etc. ) but for string attributes you may be right as there is no way they can interpolate over prim (so only prim and detail make sense) but you can directly transfer any template point attribute to point,prim or vertex in Attribute tab of Copy SOP if you wish Edited July 11, 2014 by anim 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.