Hi !
I'm trying to map a gradient on different distorted 2D Meshes (IE planes with deformers, extruded splines etc...) in order to have gradient starting from the sides of the 2D Meshes to their center, regardless of the shape/distortion.
I tried by uv mapping radial/box gradients on the meshes, on square planes it works but on extrudes splines ( ribbons ) it doesn't.
does somebody have any idea of how to detect borders and map gradient according to those informations ?
Can you show me an example of what you want to achieve? I'd say radial/box gradients should work fine with the Extrude object.
Hi !
thanks for your interest !
Here is my scene/setup :
I mapped the same shader on the 3 shapes
and we can see that the 'splotch' shapes doesn't fit well the snake like shape (which is an extruded spline)
but I don't understand why ?
here is my shader if needed :
thanks for your help !
I simplified it (and corrected a mistake I made, sweep extrude using a rectangle spline with 0 width)
anyway, here is the same problem, but with a circular gradient without interpolation from black to magenta.
fit perfectly in the square and rectangle shape, but still doesn't fit correctly correctly in the extruded spline shape ( the black part should be surrounded by pink all along the shape)
The effect depends on the UVs generated by the Sweep or Extrude object. You may have to use an uv_transform in front of the ramp shader. What helped me with the Sweep for instance is to set the U Scale to 0.5 and Pivot to 0: