[EMSUSD-1023] meshs complexity in vp2RenderDelegate #1809
-
Hello, Sorry if the topic has already been discussed. We recently moved to vp2RenderDelegate and users reported that proxyShape.complexity attribute has no longer effect on viewport meshs. They could not get smooth mesh preview anymore, for instance when set dressing to evaluate object contacts. For test purpose, we tried to compile the dev branch with Is there an estimation when complexity attribute would be officially supported ? Also is there a chance that maya 2020 will be supported ? Thank you in advance for any information you can provide, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
Hi @jufrantz, As you discovered we don't have support for smooth mesh preview in vp2RenderDelegate, and the MeshViewportCompute work is our prototype implementation of the direction we would like to eventually take. That work relies on Maya API missing in Maya 2020 but present in Maya 2022, which I'm guessing explains your issues compiling with the flag enabled. Taking the prototype to production ready code is not something we are actively working on at this time. The major reason for all the complexity here is performance of the SMP code. When proxyShape.complexity is set we smooth every object in the scene, and doing many tiny smoothing operations is slow. We need to run Maya's consolidated world code first to create larger "objects", then do the smoothing, to maximize the performance. Which is complicated and why we have MeshViewportCompute. There is a simpler solution that you could implement, which would be to add a CPU OSD implementation inside Mesh::Sync() to directly produce individual smoothed objects, which then get consolidated by the normal Maya system. This would work in 2020. The code starting around is the main block of what is necessary to run OSD on the CPU. You'd have to refactor this code to strip away all the consolidation stuff, but it should be possible to have each individual mesh generate a smoothed object. It might even be possible to refactor in a way that MeshViewportCompute and Mesh could share the CPU OSD code, and just have different inputs (consolidated or non-consolidated) depending on the context of the call.William |
Beta Was this translation helpful? Give feedback.
-
Hello @williamkrick, Thank you very much for the thorough explanation and for your suggestion. We will dig more into the code following your idea and maybe come back with a PR. Refining renderItem on CPU during Sync should be acceptable for our first use cases as we wont smooth too big data sets and there will be no mesh animation. About building with -DHDVP2_ENABLE_GPU_OSD, we tried with 2022 sdk. There were some include problems (it may be because we use USD 21.08) but also these kind of errors :
Best regards, |
Beta Was this translation helpful? Give feedback.
-
Just wondering if anyone has made any progress on this issue in the past year and a half? It would be very useful to have a working I got maya-usd to compile with the Geoff |
Beta Was this translation helpful? Give feedback.
-
Hi @williamkrick & co - I'm jumping on this thread to check in re: status of this request. Is there currently any way to set refinement level for meshes rendered through the VP2 Render Delegate? |
Beta Was this translation helpful? Give feedback.
-
My 2 cents, We also tried using mayaUsdProxyShape.complexity and I can also confirm that it is still not supported in vp2RenderDelegate. In our workflow, we've resorted to using "Edit As Maya Data" and turning on "Smooth Mesh Preview" on pulled maya meshs. While it differs from using "complexity" attribute with pixar proxyShape renderer, it offers the advantage of selectively subdividing meshs in the USD stage. Support in vp2RenderDelegate would still be highly beneficial, especially if users could activate it individually per mesh, similar to how they would with maya data. |
Beta Was this translation helpful? Give feedback.
-
Our Hydra team is looking into supporting this item in the Hydra viewport. We don't plan on supporting this in VP2. |
Beta Was this translation helpful? Give feedback.
Hi @jufrantz,
As you discovered we don't have support for smooth mesh preview in vp2RenderDelegate, and the MeshViewportCompute work is our prototype implementation of the direction we would like to eventually take.
That work relies on Maya API missing in Maya 2020 but present in Maya 2022, which I'm guessing explains your issues compiling with the flag enabled.
Taking the prototype to production ready code is not something we are actively working on at this time.
The major reason for all the complexity here is performance of the SMP code. When proxyShape.complexity is set we smooth every object in the scene, and doing many tiny smoothing operations is slow. We need to run Maya's consolid…