Wrap Texture switch around rather than use Default

Discussions about SOFTIMAGEs© Interactive Creative Environment©
ionside
Posts: 16
Joined: 22 Dec 2011, 05:13
Location: Australia

Wrap Texture switch around rather than use Default

Post by ionside » 02 Dec 2014, 02:22

Hi!

I'm using a material with Texture_Array_Switch, it includes around 80 images and check ID for the Attribute. So, in the emitting particle ICE tree the first 80 odd particles display the images (using Set Instance Geometry) but every one after that is of course emitting with the default texture.
How should I go about wrapping the textures around again or, wrapping out-of-range? I'm presuming going by ID is the wrong way about it?

User avatar
rray
Moderator
Posts: 1810
Joined: 26 Sep 2009, 13:51
Location: Bonn, Germany

Re: Wrap Texture switch around rather than use Default

Post by rray » 02 Dec 2014, 10:08

Hi! Probably the simples way is to use integer_attribute for the ID------->integer_to_scalar-------->input #1 of a scalar_basic node (operator="remainder", input 2=your particle count)--------->scalar_to_integer------>texture_array_lookup
softimage resources section updated Sep 26th 2026

ionside
Posts: 16
Joined: 22 Dec 2011, 05:13
Location: Australia

Re: Wrap Texture switch around rather than use Default

Post by ionside » 02 Dec 2014, 11:13

Interesting, I think I understand. I'll give it a shot tomorrow, Thanks!

User avatar
dwigfor
Posts: 395
Joined: 17 Nov 2009, 16:46

Re: Wrap Texture switch around rather than use Default

Post by dwigfor » 02 Dec 2014, 15:06

I still have so much left to learn in render tree.. :-s

I think my approach would have yielded same results, but with more ice, less rt. particle id -> modulo (by the number of textures) -> set data, and then use that variable in the rendertree.

ionside
Posts: 16
Joined: 22 Dec 2011, 05:13
Location: Australia

Re: Wrap Texture switch around rather than use Default

Post by ionside » 02 Dec 2014, 23:58

rray - That worked a treat, thank you! I didn't realize it would be so simple to hook up within the render tree... I didn't know there was a mod op within the scalar basic node!

dwigfor - Yes I'm pretty limited with render node knowledge. For some reason in didn't occur to me to use mod in either instance but it makes perfect sense. Thank you!

Sorted!