Page MenuHome

Cycles: Adaptive isolation
ClosedPublic

Authored by Mai Lavelle (maiself) on Sep 18 2016, 12:59 AM.

Details

Summary

Idea here is to select the lowest isolation level that wont compromise quality. By using the lowest level we save memory and processing time. This will also help avoid precision issues that have been showing up from using the highest level (T49179, T49257).

This is a pretty simple heuristic that gives ok results. There's more we could do here, such as filtering for vertices/edges adjacent geometric features that need isolation instead of checking them all, but the logic there could get a bit involved.

There's potential for slight popping of edges during animation if the dice rate is low, but I don't think this should be a problem since low dice rates really shouldn't be used in animation anyways.

Diff Detail

Event Timeline

Mai Lavelle (maiself) retitled this revision from to Cycles: Adaptive isolation.
Mai Lavelle (maiself) updated this object.
Mai Lavelle (maiself) added a reviewer: Cycles.

Seems like a good heuristic.

intern/cycles/render/mesh_subdivision.cpp
283

log2 is a c++11 function, but seems to have been available for longer in gcc/clang so I think it should work on all the compilers we use now.

This revision is now accepted and ready to land.Sep 18 2016, 1:11 AM
Mai Lavelle (maiself) added inline comments.
intern/cycles/render/mesh_subdivision.cpp
283

Oops, good catch, @Ronny G (nutel) already had problems with that (using gcc 5.4.0), will change to log2f before committing.

Sergey Sharybin (sergey) added inline comments.
intern/cycles/render/mesh_subdivision.cpp
283

This also mixes use of max coming from util_algorithm.h with an explicit call to std::max. Think we should consider use of explicit std:: rather fully exceptional and in all other cases use our own utilities.

285

Same as above.

This revision was automatically updated to reflect the committed changes.