Using ICE to drive materials

Discussions about SOFTIMAGEs© Interactive Creative Environment©
zaam
Posts: 3
Joined: 06 May 2010, 16:48

Using ICE to drive materials

Post by zaam » 06 May 2010, 16:56

This is probably a very basic thing, but I am fairly new to ICE.

I am creating a fluid simulation using Thiago Costa's SPH Fluids and a mesher from Eric Mootz. My fluid need to have three phases — liquid, expanding foam, and solid polyurethane — according to the age of the particles. Ideally, I would lie the change from one state to another to happen gradually as well — not abruptly. I have no problem driving the required changes for the fluid attributes within the ICE tree, but for some reason linking materials in the ICE tree is a mystery to me.

Any help would be appreciated.


Thanks.

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Using ICE to drive materials

Post by grahamef » 06 May 2010, 17:32

What you need to do is use an Attribute shader in the render tree to get the value of an ICE attribute, like Age% for example, and use it to drive other values in the render tree. For example, you could use it to drive a Color Multi Switch or an interpolation between textures.

Note that one thing that you cannot do is use different materials for different particles in the same cloud. If you need to use different materials, then you must use different clouds, e.g., by spawning into a different cloud at a certain Age% and then deleting the original particle.

zaam
Posts: 3
Joined: 06 May 2010, 16:48

Re: Using ICE to drive materials

Post by zaam » 06 May 2010, 18:16

Thanks.
Just to be clear, though — the object that is affected by the shader is the mesh around the particles, not the particles themselves. What I want to do is get data (particle age) from the ICE tree and drive the shader that is applied to the mesh. The docs say that attribute shaders are available only for ICE particles. Since I am using an ICE attribute to drive the shader, is that OK, or does tha shader have to be applied to the particles themselves for the attribute shader to work?

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Using ICE to drive materials

Post by grahamef » 06 May 2010, 18:51

No, in that case it won't work.

What you can try is using a separate ICE tree on the mesh to get the closest particles, look up Age% or whatever, and set a weight map or vertex color on the mesh itself. Then you can use a Map Lookup shader o drive values in the render tree.

zaam
Posts: 3
Joined: 06 May 2010, 16:48

Re: Using ICE to drive materials

Post by zaam » 06 May 2010, 19:33

Great. I think that might work.

Thanks.