0

I want to add Bevel to the Circular-Transform node group.

related https://blender.stackexchange.com/a/309345?noredirect=1

enter image description here

The result should be this with Width = 10

enter image description here

Karan
  • 1,984
  • 5
  • 21
  • I don't think the "circular-transform" has any relevance here. The bevel seems to be multiplying the color by the distance to the nearest edge (potentially scaled=multiplied) and clamped to $[0, 1]$ range. And therefore the heart of the question is how to get calculate that distance. – Markus von Broady Jan 08 '24 at 18:51
  • what do you mean? – Karan Jan 09 '24 at 03:30
  • Your "bevel" is simply a gradient, where you take the original color you would have if not for the "bevel", and then darken it based on the distance to the edge. – Markus von Broady Jan 09 '24 at 09:15
  • May I ask what is the unit of "Width" ? It looks like 10% of the external radius. And also related to Markus von Broady comment, how to you define the "edges" to smooth ? Are these defined as separation lines between two repetitions, as well as the external radius (i.e. 4 radius and 1 circle in your demo) ? If so, the "Bevel" NodeGroup in your graph should be after the "Circular-Transform" one. – StefLAncien Jan 09 '24 at 21:06
  • yes, I think it is 10% of the external radius – Karan Jan 10 '24 at 05:47
  • How to do that? – Karan Jan 11 '24 at 10:59

1 Answers1

0

As mentioned in the comments, the problem comes down to calculating the distance to the nearest edge. In a shader, or otherwise in a mathematically defined object that you can't just test using a BVHtree, it is a hard problem. I think basically if hard mathematical transformation problems like this didn't exist then we wouldn't have cryptography.

The example given in the screenshot makes it easy to define the distance to the edge:

Notice how just the 3 last nodes added by me: Map Range → Power → Multiply, is what controls the bevel and the rest is what calculates the distance to the edge: a minimum of the horizontal distance to the center, vertical distance to the center, and distance to the circumference.

This would also work, if that situation was the basis of the original effect, that is only then transformed by vector manipulations - in such case you only would need to pass the custom group output to be used instead of the 2nd (added by me) "Texture Coordinate" node. But unfortunately the base coordinate system is different, and you didn't put any effort to explain it in your question.

Markus von Broady
  • 36,563
  • 3
  • 30
  • 99