I’ve been working on several projects now importing sketchup models into unity 5 for VR viewing with the Oculus Rift DK2.
Here is my basic work flow.
If you don’t know about Unity 5 then you need to get familiar with the work flows within Unity 5 first.
- Cut up your model into groups.
Keep in mind that in unity a surface is not a surface as you know it in sketchup.
In Unity you cannot select a surface for editing unless that surface is a separate group. If for example you export an entire model as a single group then in unity you can only select the entire model but not individuel parts or surfaces.
This means you should make every surface that will get a different material into a unique group.
This is a lot of work as normaly I would make my groups in sketchup much bigger.
The advantages of this will become clear when in unity. - Export your model in .fbx and selct the options window. Check double sided, and triangulate, export texture maps and finaly swap yz co-ordinates and use centimeters.
- open your project in unity and drag your .fbx file and materials folder into the unity assets window. I normally drop my .fbx file right into the materials folder, then drag and drop the materials folder into my assets folder directly in Unity.
- set up the options in Unity5 for VR (edit>project setting>Player and check “virtual reality supported” but not “sterioscopic rendering”)and drag your model into the working window.
- set up your physical colliders and add a first-person prefab from the standard assets folder. The latest version of unity automatically converts this for the Rift.
- set up your lighting and materials in the excellent shader in Unity5 and That’s it you are ready to view your building in minutes.
- When you change a group in sketchup just re-export that new group and name it apropriately. If you export it directly into your project assets file, Unity will automatically replace it in your Unity model (if the name is the same)
This makes editing very easy but makes prep work very tedious. You should get used to naming every group very specifically (if you don’t already do this) so you can easily swap out walls window etc. - enjoy the VR experience! It’s amazing how easy it is to get a feel for how big or small spaces are and which proportions will work and which not.
Notes:
Don’t relocate anything in Unity5 without considering what this will do when you re-import something new or swap out something. For example if I move my house on any axis in Unity then whatever I import from sketchup after that will no longer be in the correct position.
Hope this is usefull for someone.
Jay