"esfoster" <nomail@nomail> wrote:
> I want to add a color to them based on their size. e.g larger particles green
> and smaller particles blue and there would be a gradient assigned to fill the
> particles in between.
divide the radius of every sphere by that of the largest sphere, that gives a
value between 1 and very small. The range depends on the sphere variation. Use
the value you get as an index to pick a colour, as jr suggest from a spline.
or use one of the interpolation (lerp) macro's to find an index between 1 and
zero from the radii.
ingo
Post a reply to this message
|