You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don’t know if this is appropriate for OpenSubDiv, but I thought this is at least a good place to ask.
I’m wanting to add an option (in Blender) to be able to set edge creases from a bevel radius approximation and vise versa. (The main benefit of this is that you may wish to set similar curvatures with diverse geometries. This would allow calculating the correct crease value for a given curvature for each edge.) Given the relative angle of the edge faces and the distance between the limit surface and the control edge (at the edge midpoint) calculating the bevel radius to approximate it is fairly straightforward. Unfortunately I’m having trouble determining the distance between the limit surface and the control edge from the edge crease, and vise versa.
Is there a straightforward way to bidirectionally compute this relationship?
Is this already implemented in OSD?
Would it make a useful addition to OSD?
For comparison, the rough algorithm to determine the approximate bevel radius from the distance i’m looking for:
Take the unit-length normals of the two faces adjacent to the edge.
The arc-cosine of the dot product of these normals to get the angle between these surfaces.
Inscribe a circle with the desired bevel radius in the calculated angle.
The distance between the circle center and the angle minus the bevel radius is how far the surface lies from the control edge.
Given:
the angle computed above
the distance from the limit surface to the control edge
the bevel radius approximating the SS limit surface:
I realize there are all sorts of edge cases where this has divide by zero issues and other range errors and discontinuities, and I think I neglected to say that one of the normals should have been negated, but this is intended to give the general idea.
TL;DR: how do I compute the crease value from the distance between the control edge (midpoint) and the SS limit surface, and vise versa?
The text was updated successfully, but these errors were encountered:
Given a SS control cage edge, with relevant local geometry, how do I calculate between a OSD crease value, and the distance between a point on the control cage (the midpoint of the edge) and the corresponding point on the OSD limit surface bidirectionally?
Should computation of this relationship be added to the OSD API? (Or is it possibly already there?)
As I’m really new to OSD, I really don’t have any meaningful opinion on the second point. The main issue with the first point is really compatibility:
The basic Catmull–Clark subdivision surface algorithm is widely well understood and well documented, but does not include a definitive definition of “crease” or how it impacts the algorithm.
Searching online there are appear to be several definitions of “crease”, and how it impacts the CC SS algorithm.
So, can you clarify which crease variation of the CC SS algorithm does OSD implement. From that I expect I can derive the relationship I’m looking for.
I don’t know if this is appropriate for OpenSubDiv, but I thought this is at least a good place to ask.
I’m wanting to add an option (in Blender) to be able to set edge creases from a bevel radius approximation and vise versa. (The main benefit of this is that you may wish to set similar curvatures with diverse geometries. This would allow calculating the correct crease value for a given curvature for each edge.) Given the relative angle of the edge faces and the distance between the limit surface and the control edge (at the edge midpoint) calculating the bevel radius to approximate it is fairly straightforward. Unfortunately I’m having trouble determining the distance between the limit surface and the control edge from the edge crease, and vise versa.
For comparison, the rough algorithm to determine the approximate bevel radius from the distance i’m looking for:
I realize there are all sorts of edge cases where this has divide by zero issues and other range errors and discontinuities, and I think I neglected to say that one of the normals should have been negated, but this is intended to give the general idea.
TL;DR: how do I compute the crease value from the distance between the control edge (midpoint) and the SS limit surface, and vise versa?
The text was updated successfully, but these errors were encountered: