Closed perrauo-adsk closed 2 years ago
Hi, there have been many changes to OpenSubdiv since that issue was closed.
Specifically, we recommend not using the Hbr interfaces for new or ongoing development.
The current interfaces in Far and Osd are consistent in their handling of different interpolation modes (i.e. vertex, varying, face-varying) and you can and should have to update only aspects of your mesh data that are actually changing during each edit or frame change in an interactive preview.
Can you tell us more about your use case and which aspects seem slow to update during your smooth mesh preview?
We are using ::Far::PrimvarRefinerReal
After, looking more closely at what the user is referring to, I am indeed not using hbrmesh. Sorry for the confusion.
However the general idea remains, I am not sure if InterpolateFaceVarying is the right api to update only segments of the smooth uvs which have been dirtied by manipulation of the corresponding non-smooth uvs.
I see. Assuming your manipulation in the uv editor is changing only uv values (and not the uv topology) you might try using a face varying stencil table to apply updates to your uv buffer.
A stencil table is a sparse matrix representation of the interpolation that is performed by the primvar refinement methods like InterpolateFaceVarying. The Osd Evaluator APIs expose ways to apply stencil tables in using CPU or GPU kernels which might be much faster than using InterpolateFaceVarying directly for large mesh topologies, but there is additional up-front processing cost to create a stencil table.
That sounds great thanks. Are there any examples for this in the OpenSubdiv repo?
Here's one example in examples/glFVarViewer and there's another slightly different example in examples/glEvalLimit
Thank you
Marking this closed since we believe the question has been resolved.
We also want to encourage anyone following this to take a look at the opensubdiv/bfr API and tutorials/bfr which provide additional and often simpler ways of dealing with surface evaluation, though the approach discussed above may still be best for the use case presented.
Thanks!
I am sorry for bringing up this old issue, I am not sure if this has been fixed. As part of issue #74 now closed, user applezhao asked about the possibility of updating existing smooth UV buffers as opposed of computing uvs for the whole mesh?
The lack of such feature makes it slow to obtain smooth mesh preview during any kind of interactive manipulation of a mesh. Are there any work arounds for such a situation? Are there any plans for this.
Thank you