Material - draw a line between two coordinates?

You guys are awesome,
@RyanB In your post #15 the technique that you used for small rock, What you think if use this technique for a top down (Strategic) shadow ? Is it good for mobile performance ?
And also where i can find a tutorial about that ?

Regards

This looks really good and comprehensible but how do you use it for multiple segments? Say you want to draw a parametric circle using this of say 20 segments. In a less complex engine you would just do a begin draw, call draw on the mesh with the applied material a number of times while changing the input arguments to the material and then end draw when you are done, but in UE4 i guess theres not really a traditional draw loop where you can render persistently like that so i guess every segment would need to be its own instance? Would you be able to describe how to approach this or even if you have a simple example that would really be gold worth!

Hi guys,

I’m chiming in on this as I was experimenting and had some fun with the UE material functions and coordinate system transforms.

For this example I wanted to use the DrawLine-2D Material Function for drawing a circle in Polar coordinates. Since a line in Cartesian coordinates represents a circle in Polar coordinates.

And lo and behold. It worked directly out of the box.

Below is the material function “CartesianToPolarCoordinate2”:


I thought it was quite intersting, so I wanted to share this.

Br,

Roger

For anyone struggling to read the lower blue node in the second image, this is the Pi node!