Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mesh/polygon borders detection

4 REPLIES 4
Reply
Message 1 of 5
crasse2
194 Views, 4 Replies

mesh/polygon borders detection

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 ?

4 REPLIES 4
Message 2 of 5

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.

Message 3 of 5
crasse2
in reply to: crasse2

Hi !


thanks for your interest !

Here is my scene/setup :


5295-viewport.jpg


I mapped the same shader on the 3 shapes


5296-ipr.jpg


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 :


5297-nodes.jpg


thanks for your help !

Message 4 of 5
crasse2
in reply to: crasse2

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)


5298-ipr-v2.jpg

Message 5 of 5

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:

5188-sweep-uvtransform.png

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report