Colorize using distance to an object?
#4
(06-21-2025, 11:29 PM)Findus Wrote: Target seems to be the target of a "find object" operator. I can sort of make it work for gravity, but had no luck with mapping.

Attached is a file (Max 2020) that uses an Object Test (Ignore if true, save all test values, and saved to a custom channel).

This is then retrieved via a value operator, mapped to 0-1 and used in a Mapping Operator. Could probably be retrieved directly in the Mapping Operator as well somehow.


Another, probably simpler approach would be to do this in the material. Use a distance map (e.g. V-Ray Distance or 3ds max Falloff) and use a mapped Gradient Ramp to apply your colors.

Thanks for the scene Findus, it helps understanding a lot!

The distance is evaluated to the cube's pivot meaning changing the cube's size doesn't modify the particles colors.
And the cube could be any other object without changing anything either.

Is there any way it could be distance measured to the surface of the mesh itself ? (= the polygons)
  Reply


Messages In This Thread
RE: Colorize using distance to an object? - by Fabrice - 06-24-2025, 09:07 AM

Forum Jump: