Hi all,
I'm trying to set the vertex colours of a specific cluster through ice and I'm kinda stuck. I'm just not sure how to set only to those polys.
Can someone point me in the right direction?
Thanks
Pete
Setting ice values to poly clusters.
-
Pooby
- Posts: 501
- Joined: 27 Aug 2010, 20:25
Re: Setting ice values to poly clusters.
If cluster ISelement equals yes, then execute the set data.
Should do it
Should do it
-
Pete
- Posts: 118
- Joined: 16 Jun 2009, 07:28
Re: Setting ice values to poly clusters.
Hi Pooby,
Thanks for the reply, I could understand how that would work but I'm not sure how would you put that in an ice tree?
Thanks
Pete
Thanks for the reply, I could understand how that would work but I'm not sure how would you put that in an ice tree?
Thanks
Pete
-
Pooby
- Posts: 501
- Joined: 27 Aug 2010, 20:25
Re: Setting ice values to poly clusters.
Ok,Im on the train without a computer, but I'll have a go.
On the left you have a get data node. This contains the cluster iselement attribute, which is a Boolean. (orange)
This plugs into the boolean input on an IF node.
In the false section, plug nothing in as if ISnot part of the cluster, you want it to do nothing.
In the true section, plug in the bit that sets the vertex colours ( however you want to do that )
Plug the output of the IF node into an execute port.
This will only execute on the elements that are part of the cluster.
On the left you have a get data node. This contains the cluster iselement attribute, which is a Boolean. (orange)
This plugs into the boolean input on an IF node.
In the false section, plug nothing in as if ISnot part of the cluster, you want it to do nothing.
In the true section, plug in the bit that sets the vertex colours ( however you want to do that )
Plug the output of the IF node into an execute port.
This will only execute on the elements that are part of the cluster.
-
Pete
- Posts: 118
- Joined: 16 Jun 2009, 07:28
Re: Setting ice values to poly clusters.
Ahhh, cool I was just having trouble finding the cluster is element attribute.
That worked but now it has a context issue. Any ideas how to get past this?

Thanks
Pete
That worked but now it has a context issue. Any ideas how to get past this?

Thanks
Pete
-
Pooby
- Posts: 501
- Joined: 27 Aug 2010, 20:25
Re: Setting ice values to poly clusters.
It's because the color at vertices map isn't in per poly context. It's per sample.
If you want to do it per sample, you'll need To first set the data to something like self.Whatever
Then in a get data, use the Nodelocation attribute and have a get data coming from that, finding self.whatever
That will be in sample context (I think) so you can plug it into the colour at vertices map.
I know it sounds odd, but samples are unusual as there are 4 at each vertex. Luckily, you don't usually deal with them.
If you want to do it per sample, you'll need To first set the data to something like self.Whatever
Then in a get data, use the Nodelocation attribute and have a get data coming from that, finding self.whatever
That will be in sample context (I think) so you can plug it into the colour at vertices map.
I know it sounds odd, but samples are unusual as there are 4 at each vertex. Luckily, you don't usually deal with them.
-
Pete
- Posts: 118
- Joined: 16 Jun 2009, 07:28
Setting ice values to poly clusters.
Thanks pooby,
I keep stumbling into this so I'd better get my head around it
I guess it seems a little weird that you set the data then just get it again. I suppose the node location changes the context but I'm not sure how.
Hey your tutes are great by the way! They really helped me get a lot more out of ice.
Thanks
Pete
I keep stumbling into this so I'd better get my head around it
I guess it seems a little weird that you set the data then just get it again. I suppose the node location changes the context but I'm not sure how.
Hey your tutes are great by the way! They really helped me get a lot more out of ice.
Thanks
Pete