- Home /
Scale VR by changing the rig, not the scene content
When asked how to scale a VR experience, people suggest to scale the actual scene content. That may be fine for a simple test scene, but for complex production ones is really not a viable option.
Take a complex scene, with terrain, trees, particle emitters, lights etc. I started investigating what scaling such a scene would mean, but it looks like a huge pain. Terrain has its own scale. Trees instances would have to be scaled as well. DetailPrototypes (grass, bushes) would need a more drastic solution where you change their min/max sizes (affecting the project content, not just the scene). Then there is particle emitters that need adjustment. Then lights, etc.
Now, it looks much less of a work to just change the VR rig, which to my understanding means: - Scale the eye separaion - Scale the tracking data
I'm using Unity 5.3.5 without any external plugin/package. Do you have suggestions how I can achieve this?
hey @mementomori000 just wondering, did you ever figure out a way to do this nicely?
Answer by phxvyper · Jun 18, 2016 at 10:45 AM
Have a single GlobalScalar GameObject centered at (0, 0, 0) that you parent over everything that you want to scale.
If you want everything to scale together, then keep them all under the GlobalScalar object and scale the GlobalScalar object.
If you want to scale groups of items, then have GameObjects as children under the GlobalScalar for groups. E.g, have a Trees GameObject with all of your trees, then scale the Trees GameObject whenever you need to.
Don't worry about the performance of scaling so many objects at once with a global object. Unity does this in a non-recursive method (when they render it, they just multiply the individual object's localScale with its parent's localScale, instead of recursively setting a scale).
Here's a quick profile of scaling 1000 cubes at once using this method.
Thanks, but this is not what I'm looking for.
Unity terrain and trees system does not inherit the transform of the parent, so you cannot scale it like that. Same story for the particles and lights settings.
I can build some helper scripts to address all these different cases, but to be honest, it would be much better to just scale the VR rig.
Your answer
Follow this Question
Related Questions
OVRCameraRig export Depth Map 0 Answers
Position sensor of Oculus Rift 0 Answers
Unity Build not running on Oculus DK2 3 Answers
How do you use the Gear VR touchpad to let the player walk around? 0 Answers
Mirror Hands with Leap Motion in VR 0 Answers