Distributing a set of textures among points

Discussions about SOFTIMAGEs© Interactive Creative Environment©
NightroadAX
Posts: 19
Joined: 16 Nov 2010, 03:23

Distributing a set of textures among points

Post by NightroadAX » 16 Oct 2012, 05:53

Hey all, I have a particle emission using an instance shape, and I have 5 variations of the texture I want to distribute across the points,
but have no idea how to go about it.. I was hoping I could use if/then nodes (with data attribute nodes) in the render tree, but they're only for the ICE tree..

Any suggestions/examples would be appreciated!

nb. It's not a sprite, as I have the instance unfolded/UV'd, but it's a similar idea to having various sprites combined across a point cloud..

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: Distributing a set of textures among points

Post by EricTRocks » 18 Oct 2012, 10:58

You can assign the particles a random integer (On Emit) in a range of the number of textures you have. Assign the same material to all the objects being instanced. Integer Attribute (set to the custom attribute you set in the On Emit) > Color Multi-Switch. Plug each texture into a different port. If you double click the Image node in the render tree you will have a drop down for the texture projection if you need to specify a particular UV map, otherwise I believe it uses the first one.

There may be a more elegant way of doing this but I haven't used the render tree in a few years.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

NightroadAX
Posts: 19
Joined: 16 Nov 2010, 03:23

Re: Distributing a set of textures among points

Post by NightroadAX » 20 Oct 2012, 00:19

That worked wonderfully! Thank you!