Download

Color Gradient Material

I am working with point clouds in UE 4.24 and am designing materials to apply a color gradient to them. Here is an example of one of the gradients, which applies a color gradient in the X-direction based on Absolute World Position.

HighresScreenshot00000.jpg

I am trying to figure out something similar, but for a radial color gradient as opposed to a linear color gradient (i.e. colors band outward radially from a set position).

Here is the material diagram for the Gradient X material for reference:

Also, is it possible for a material to read in inputs; for example, to change the XYZ coordinates of the center of the radial banding to something other than the center point of the point cloud?

Thank you in advance!

So I’ve figured out this much. I figured out how to implement a radial gradient and apply it to the point cloud based on texture coordinates.


HighresScreenshot00001.jpg

I would like to color the point cloud based on Absolute world position instead:


And the result is this:
HighresScreenshot00002.jpg

How can I adjust the material to make it so that the base color lerps from green to brown based on the alpha values of the radial gradient texture sample?

Use SphereMask. It takes a set of positions and spits out an alpha. Ought to plug right into the Alpha of a LERP w/2 colors.

ref:
WTF is? - https://www.youtube.com/watch?v=xRxkcFOhNrc
https://docs.unrealengine.com/en-US/…ity/index.html

It works now. Thanks!

HighresScreenshot00005.jpg