Page 1 of 1

Control over subdivisions (angle control, area control, etc)

Posted: Fri Feb 10, 2023 9:07 am
by nullbio
It would be nice if we had more control over how Octane performs its subdivisions so that this problem with vertex displacement: viewtopic.php?f=30&t=81129&p=421718#p421718 -- can be solved. The general gist of the problem and solution is that meshes without perfect distribution and sizing of polygons results in the subdivider subdividing the smaller polygons the same number of times as it does the larger polygons (and depending on the algorithm chosen, the polygons around those smaller polygons). Example:
octane-1.png
When applying procedural vertex displaced textures to this model, you will now get lots of "artifacts" along the bevel, as you can see in the screenshots in the thread I linked and here (same object/subdivision setting as the first screenshot):
1.png
At first I thought UV maps can help this issue (as per my original thread), but after playing with it some more I'm not convinced it helps. If it does, it's negligible at best. Even with perfect UV maps the problem still exists.

So either we need a smarter displacement smoothing algorithm, subdivision algorithm, and/or a new displacement mode that can somehow average out it's displacement over multiple polygons if surrounding polygons are larger so that you see less of the artifacting, or the ability to control how the subdivider works so that we can tell it not to apply so many subdivisions to smaller polygon areas and bevels.

If controls are implemented instead of different or automated algorithms, a couple of ideas (there might be better ways but I'll leave the implementation to the engineers, this is just off the top of my head):

* Some sort of angle control value or edge detection, so that if connected vertices are above certain angles (could average all connected polygon angles to get the single number for the threshold value) it will not subdivide that polygon, or it will subdivide it less depending on certain values.
* Min edge length or polygon size values - so the subdivider would ignore subdividing polygons that are below certain thresholds set by the user.
* Perhaps some sort of displacement sampling across the whole geometry to find good average values so that similar displacement shapes can be formed over multiple polygons in a tight group that look the same as the displacement over a small number of polygons.

Edit: Experimented with Redshift to see if it has the same problem. It does, but it seems that their displacement and subdivision controls on the RS object tag can help mitigate the issue. The biggest impactor seems to be the "smooth subdivisions" setting.