What is the best approach to export Vectorworks models for VR experiences in Unity?
There are a few steps to take to set yourself up for organizational and performance success, including prepping your file correctly, organizing your objects into material-based classes, and converting them into optimized mesh objects. The final product is a collection of .obj objects for easy import and management in Unity.
Start by saving out a separate copy of the Vectorworks file you intend to export for Unity. We will be making some substantial changes that would make a mess out of any sheet layer viewports and class assignments.
Open up the Organization window, in the design layers tab, and confirm all layers are in 1:1 scale.
Orient on Internal Origin
It is ideal to have your .obj objects import in the center of your Unity scene. To achieve this, adjust your Vectorworks model to be on the Internal Origin before exporting. Be sure all classes and layers are set to visible. It is easiest to turn on Show/Snap/Modify others in Layer Options and then Select All to move.
Or Main Nav> Tools> Origin> Center Drawing on Internal Origin, but you will likely still need to manually adjust for a perfect center placement. Yet another option is to skip moving your model onto the internal origin at all and instead manually designate a new origin using Tools> Origin> User Origin.
I like to organize my Vectorworks model into material-based classes in order to import efficiently into Unity & optimize for better performance. The intention is to export each of these material-based classes as individual .obj files.
Figure out all the different materials in your model, and create class names for each of these material-defined objects. Reassign all the objects in our scene to our new material-based classes and purge the rest. And if you experience any frustration with some of the pre-made Vectorworks Spotlight symbols, (like monitors, pipe & drape, risers, and doors) check out this post on Re-assigning Classes of Tricky Spotlight Objects.
Get rid of any 3D lights and camera objects. We will handle those in Unity.
Convert to Mesh & Generic Solids
Once every object in your scene has been assigned a material-based class, convert the entire class into a single optimized mesh object. With all objects in the active class selected, navigate to Modify> Convert to Mesh.
Then, with the objects still selected, go back to Modify and Convert to Generic Solids. Go down the list and do the same thing for every object, Convert to Mesh> Convert to Generic Solids.
There is one exception to the Convert to Mesh rule: skip over any objects that have a renderworks texture image applied, as in our LED screen for example. So for example, if I were to convert the led screen to a mesh, our texture mapped image data is completely gone. So in this case, bypass the convert to mesh and instead go straight to convert to generic solids. Note you may have to remap the image after converting.
Export as .obj
Finally, export each class as a combined .obj file. With only the active class visible, go to File> Export> Export OBJ. Repeat for all the remaining material-based classes.
Now your ready to start building your VR scene in Unity! Learn how to use the Oculus Integration Package to quickly create your first project in Unity for Oculus Quest.