Change material only in deformed particles?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Change material only in deformed particles?

Post by Bullit » 04 Jan 2014, 10:02

I have a point cloud that a part of it is deformed by an object via raycast.
In the part that is deformed i want that it gets that object material.
And when i move the object those particles that get deformed get the object material and those that ceased to be deformed return to the point cloud material.

Any idea how i should approach this?

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Change material only in deformed particles?

Post by Tekano » 04 Jan 2014, 14:52

hey bullit it is really easy to mix materials in the render tree with a mix node and using an ICE particle attribute value as the weight parameter for the blend. and to assign the attribute is straight forward, if particles are raycasted then atttribute = 1 etc
Gossip is what no one claims to like, but everybody enjoys.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Change material only in deformed particles?

Post by Bullit » 04 Jan 2014, 18:44

Thanks Tekano, will look into that.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Change material only in deformed particles?

Post by Bullit » 05 Jan 2014, 13:10

If this helps anyone i tried with Mix 2 colors and didn't worked.
I created my attribute directly from the hit output port of raycast node, so it was a boolean.
In rendertree i tried putting the boolean attribute with alpha in mix 2 colors node and it didn't worked.
But i was able to get it to work with color switch so all is okay.

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Change material only in deformed particles?

Post by gustavoeb » 05 Jan 2014, 13:25

Convert it in the icetree before storing it then, from Boolean to integer, from integer to scalar.
If you want to have a smooth transition have this attribute be the amount deformed or distance to surface or something.
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Change material only in deformed particles?

Post by Bullit » 05 Jan 2014, 21:11

Yes converting make it work in mix node. It is still boolean though.

To have scalar i have to check from where/how to get scalar data, i have the locations from raycast node maybe i can convert from there.

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests