question

crasse deux avatar image
crasse deux asked ·

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 ?

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Peter Horvath avatar image
Peter Horvath answered ·

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:


Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

crasse deux avatar image
crasse deux answered ·

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)



ipr-v2.jpg (88.5 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

crasse deux avatar image
crasse deux answered ·

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 !


viewport.jpg (237.2 KiB)
ipr.jpg (92.9 KiB)
nodes.jpg (282.3 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Peter Horvath avatar image
Peter Horvath answered ·

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.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.