Add Colour on Distance ICE Particle Compound
As part of a personal project I’ve got going at the moment I’ve been playing around with particle colours in ICE. The most obvious way of doing this is with the Modify Colour node. It’s pretty easy to link this up with the age percentage to get a nice gradation in hue:
Now this is all well and good, however, when things get more complicated you may end up deleting a lot of particles before they’ve got the chance to become old. In this case you might well want to use another way to grade the colour. In this example I’ve tested the distance from the sphere and, once it’s more than 5 units away, added some colour every frame. You only need to add/remove a little bit to achieve a similar effect to the Modify method, though it’s usually a good idea to clamp the values to ensure that the particles don’t over-saturate.
We can use pretty much any parameter to test in a similar way. In this example I’ve emitted spheres towards a floor and compared their relative positions in y. Using this method I can add in the blue when they’re approaching the floor, then mix the green back in when they bounce back up:
Obviously this is a pretty simple, isolated test, but it’s easy to see how more of these parameter comparissons can be used to layer in more advanced changes.
If you’d like to play around with this techique yourself then feel free to download the following node, just change the file extension and you’ll be able to rummage around for yourself. Stick it into your user compounds folder and it’ll show up under ‘Tasks/Particles/Colour’. The node will test a particle’s position with whatever object you plug in and will add colour after and/or before the desired distance:
Add colour on distancexsicompound (.txt file, change to an .xsicompound to use)
UPDATE: There is a limitation with this node in that it can only be used once in an ICE Tree. See this post for more details and for a new solution! This node will still work for single colour changes – as you can see from this new video:




January 27th, 2010 at 12:30 am
[...] Add Colour on Distance ICE Particle Compound [...]