Hey.... Can anyone tell me, on a computer that meets or exceeds all of the hardware requirements, latest drivers and running the latest version of Unity.... Is there a maximum recommended scene size, or perhaps number of assets that can be smoothly processed in play mode using Oculus Rift? I've been challenged to find the outer limits of Unity. I put together a scene with a full chemical plant. Roughly 2 dozen imported CAD models, all with dozens of individual meshes and all shaded. Everything loaded into Unity fine and I had the scene built and shaded in less than an hour. Gameplay with the Rift is extremely choppy and there are obvious FPS issue. The scene freezes and then catches up, tiles and is just very unpleasant to run. The file size of the scene is 475 KB. I'm sure there are ways I can optimize these models to make them smaller, but the point of this test was to basically find the breaking point. Now I need to determine if this is software or hardware related. Since the laptop more than meets the sys reqs, I'm thinking it's in Unity, and I may have FOUND my breaking point. Any ideas?
It's not a limitation of Unity; all heavy 3d programs need to be optimized and VR in particular needs special care. For something like this, you'll see some benefit from single pass stereo rendering. You need to be very sensitive about what's happening in your shader; since you're using high poly meshes it matters a lot for both the vertex and fragment portions. If you can bake the lighting, that would be a big benefit. You would benefit a lot from using a LOD system for these kinds of meshes. You will benefit from marking the objects that will not be moving around as static. You will see benefits from using the LWRP.
@mikerz1985 If I am reading you correctly, the number of assets has less to do with the breaking point than how they are processed? Does that sound about right? If so, then our next focus (for me) is to learn about proper optimization.
so, at 90fps you have somewhere in the region of 11ms worth of processing time per frame. how and where you spend that time will depend on what your eventual goals are. large CAD models can contain an extremely large number of polygons (into the 100's of millions), assuming that your rendering is taking significantly longer than the allotted 11ms, its likely that you will need to simplify the models, or simplify the shader, or both, in order to approach a desired 90fps. you can use the unity profiler to get an idea of how much over you are, and then work backwards from there to determine what changes you'll need to make to your scene to achieve frame rate. (https://docs.unity3d.com/Manual/Profiler.html)
I have found that if I derive these large assemblies in Inventor, before pushing out to 3DS Max and exporting as FBX, I can drastically reduce the number of polys. Unfortunately it also means that I cannot apply shaders to individual faces in Max, because a derived assembly is seen as one single part. So, I have to do all of my shading in Inventor... which is slower than.... you know what. But so far, from the Unity side, the performance is much better. Thank you guys for the input!
Have you looked into using PIXYZ? It sounds like it's doing a lot of things you might be trying to do https://unity3d.com/pixyz
Again, thanks for the input. My only issue is with a specific set of models given to us by a third party. This was only a test anyway. My own Inventor models I am able to work with without any issues. If we have more of this down the road, I have some good ideas from this thread as to solutions.
@cgbenner Maybe I'm reading or interpreting this incorrectly, so I apologize if I'm stating something you already know. There have been times my CAD data was smashed into a single part but I am still able to utilize multiple materials in both 3ds Max and within Unity. In 3d Studio, just select faces using an edit mesh modifier and the sub object mode for faces or polygon and assign a material while selected and then when assigning another material to different faces on the same mesh it creates a multi-sub object material in 3ds Max. Each face/polygon selection can have it's own material this way. Face selection can be greatly sped up by utilizing the "ignore visible edges" check box near the top of the modifier window and adjusting the "planar thresh" setting to something useful depending on the curvature of your particular model. When you FBX that out and into Unity, the importer converts the multi-sub object material into a material array on the one object where each array index corresponds to the slot number of the material within the multi-sub object material back in 3d Studio. So far I have no found no limits to the array size, although I'm sure they exist. Hope this helps.