Randomness to Shader Tree ?

Discussions regarding Materials, Material-Compounds or Shaders, etc.
Falam

Randomness to Shader Tree ?

Post by Falam » 21 Jan 2013, 04:43

I have a series of objects with a procedural texture applied, they all look uniformly on the object. Is there any way to apply randomness to the shader tree on each object, even though all the objects share the same material ??

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Randomness to Shader Tree ?

Post by Pancho » 21 Jan 2013, 08:22

Yes, custom attributes.

Falam

Re: Randomness to Shader Tree ?

Post by Falam » 22 Jan 2013, 01:27

Pancho wrote:Yes, custom attributes.
Creating an ICE Tree, arrghh I haven't taken the full dive into ICE, yet :(

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Randomness to Shader Tree ?

Post by Pancho » 22 Jan 2013, 08:27

Well, better take the dive ...

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: Randomness to Shader Tree ?

Post by Hirazi Blue » 22 Jan 2013, 11:04

Pancho wrote:Well, better take the dive ...
Sorry, Pancho, this isn't remotely helpful...
Maybe you could indicate how such an ICE Tree would have to look.
Not everyone has the same level of proficiency where ICE is concerned...

@Falam - Could you explain a little better what kind of randomness you want to achieve (a separate texture per object/just one specific value varied within the procedural texture per object, are you using the on-board procedurals, the Enhance textures or something else completely)?
Maybe add a picture (for those of us verbally impaired :D )
Stay safe, sane & healthy!

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

Re: Randomness to Shader Tree ?

Post by rray » 22 Jan 2013, 11:08

This (attached) could be of help if you need a random value per object

(from Automatic ObjectID Shader)
You do not have the required permissions to view the files attached to this post.
softimage resources section updated Sep 26th 2026

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Randomness to Shader Tree ?

Post by Pancho » 22 Jan 2013, 12:17

Google > softimage ice custom attributes.

I can't explain here what custom attributes are (no time). There's already some decent stuff out there. So pointing in the right direction should be a start.

Falam

Re: Randomness to Shader Tree ?

Post by Falam » 26 Jan 2013, 16:52

rray wrote:This (attached) could be of help if you need a random value per object

(from Automatic ObjectID Shader)
Maybe I'm not seeing the light at the end of the tunnel.
How can applying a different color to different objects add randomness to the procedurals within the shader tree ? The way I see it, I'd have to do this outside of Softimage in a compositor, not the route I want to go !

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: Randomness to Shader Tree ?

Post by Hirazi Blue » 26 Jan 2013, 19:53

I think rray's approach works from the idea that you'd primarily want to split the decisions between objects.
For some "true" randomness, but only once, try the following: Create an ICE Tree on your object and import either the RandomInteger or RandomScalar from the zip file below. Connect the chosen compound to the ICE Tree. Now set the specific parameters of the Random Value node, after opening the PPG of the ICE Compound (I've exposed all parameters there). In your RenderTree the value can now be read by using an Attribute_Integer or an Attribute_Scalar node, set to use either myRandomInteger or myRandomScalar.
If you create a Simulated ICE Tree and turn "Time Varying" on, you should get a different value for each frame. The numbers aren't truly random, they follow the seed parameter.
This is just an attempt at getting something across, that I don't have the time to thoroughly explain, so don't expect it to work. It's very untested, but it's meant as something you could study as an incentive to learn some more ICE.
You do not have the required permissions to view the files attached to this post.
Stay safe, sane & healthy!

Falam

Re: Randomness to Shader Tree ?

Post by Falam » 27 Jan 2013, 17:19

Hirazi Blue wrote:I think rray's approach works from the idea that you'd primarily want to split the decisions between objects.
For some "true" randomness, but only once, try the following: Create an ICE Tree on your object and import either the RandomInteger or RandomScalar from the zip file below. Connect the chosen compound to the ICE Tree. Now set the specific parameters of the Random Value node, after opening the PPG of the ICE Compound (I've exposed all parameters there). In your RenderTree the value can now be read by using an Attribute_Integer or an Attribute_Scalar node, set to use either myRandomInteger or myRandomScalar.
If you create a Simulated ICE Tree and turn "Time Varying" on, you should get a different value for each frame. The numbers aren't truly random, they follow the seed parameter.
This is just an attempt at getting something across, that I don't have the time to thoroughly explain, so don't expect it to work. It's very untested, but it's meant as something you could study as an incentive to learn some more ICE.
I understand better :)
When I move the timeline slider and I view the procedural I don't notice a change in the procedural pattern when I have the scalar_attribute hooked up to one of the scalar attributes of a fractal procedural node, it remains the same ?

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: Randomness to Shader Tree ?

Post by Hirazi Blue » 27 Jan 2013, 19:38

Hmm, it seems to work in my simple test scene (but that is not the issue here, obviously ;) ).
Please check the following: did you create the ICE Tree as a Simulated ICE Tree (i.e. where does your ICE Tree live in the stack, it should be in Simulation not in Modeling) and did you check "Time Varying"?
You do not have the required permissions to view the files attached to this post.
Stay safe, sane & healthy!

Falam

Re: Randomness to Shader Tree ?

Post by Falam » 30 Jan 2013, 02:08

Hirazi Blue wrote:Hmm, it seems to work in my simple test scene (but that is not the issue here, obviously ;) ).
Please check the following: did you create the ICE Tree as a Simulated ICE Tree (i.e. where does your ICE Tree live in the stack, it should be in Simulation not in Modeling) and did you check "Time Varying"?
Everything was correct, that I did :) The reason why I bought it up, I was expecting to see a change in the procedural pattern in the shader preview window, that resides within the RT. There is no change when the timeline is moved, then I just chalked it up to I'll only see a difference when it is actually rendered :)
Blair did a very similar post on this subject, expect the script seems to do all the work, should I smile or frown ? :)
http://xsisupport.com/2013/01/28/using-an-ice-attribute-to-drive-a-procedural-texture/