Most of the time, a regular VRED scene does not need to be optimized to adapt it to run in VR or MR. However, in case you have issues with the performance of your dataset when entering XR modes, here are some suggestions for optimization and we recommend doing them in the presented order.
Occlusion culling temporarily disables rendering of objects not seen by the camera, as they are occluded by other objects. Find this option under Visualization > Advanced OpenGL Setting > Occlusion Culling.
First, check the number of nodes in the Scenegraph. From our tests, we have found that in general, up to 10 000 nodes should not be an issue. However, in case your scene exceeds 10 000 nodes, we would recommend reducing the overall number. You can do so by merging objects that have the same material and do not have to be moved individually.
Run this Python command, print len(getAllNodes())
, in the Terminal to check the overall number of nodes in your scene. VRED will return the overall number.
In the Material Editor, right-click a material and select Select Nodes to select all nodes with that material applied. Thus, you can easily identify objects with the same material and merge them, if needed.
When using Occlusion Culling in addition to improving performance, it is useful to merge adjacent objects and pack them in a way they can still be occluded by other objects.
Some materials need more computational power than others. So, if you want to improve your performance, it's recommended to search for and remove the following:
The material easiest to render is our Plastic material. Many times, you can replace one of the above materials with a Plastic that looks similar. Use the heavy materials above only where needed and visible in your experience to optimize performance in MR.
For material optimization, we usually add a material group with one shader on top of all geos to determine if the performance drop is due to the material. If so, isolate individual geos from the material group to identify the issue.
While VRED is very capable of handling huge numbers of polygons, they can still be a factor of improvement for optimizing a scene for MR. We have noticed in XR scenes with more than 50 million polygons, performance can be impacted.
As this is a rather high number, reducing polygons is something to consider if the other two areas of optimization, mentioned above, have not improved things enough.
If you still have NURBS data in your scene, try re-tessellating the whole dataset of individual parts, as needed.