Google SketchUp to ShiVa
From ShiVa Wiki
SketchUp to ShiVa 3D Plugin
This plugin for SketchUp will apply the correct meter scaling and rename the materials so that ShiVa 3D can read them. Just use "File > Export to ShiVa3d" to export a perfect DAE ready to import into ShiVa. Thanks to forum user myro!
- GitHub Repository
- Original Forum Post
Pipeline with UU3D
When importing models from Google SketchUp I ran into several problems, especially with materials, such as Shiva would always end up with extra unneeded materials. Even using Ultimate Unwrap 3D I ran into many problems. This tutorial covers how to convert a model from SketchUp > UU3d > Shiva.
The Model in SketchUp:
To export your model, go to File > Export > 3d Model
Make sure the Export Type is set to COLLADA File (*.dae)
Click on "Options" in the lower right corner of the Export Model window. See the picture, the options are set up as follows:
Save the .DAE file. SketchUp creates a folder for your texture files so go to where you saved your model, open the folder with your model name, and move your textures files up one directory so: Your textures and modelFile.dae are all in the same directory. (You can now delete that subfolder SketchUp created)
Open the DAE with UU3D. There are several import options, set them up as follows:
Now that the model is imported in UU3D, I can see that the faces are not oriented how I want them. The inner box is correct where the outside faces have the material on them. But on the large box, I want the material to be on the inside faces, not the outside like seen in the picture:
So select all the faces in UU3D that need to be reversed or flipped. I use the 3d selection mode in UU3D to pick faces. Now that all the faces are selected, click on:
3d Tools > Modifiers > Flip Normals
Right Click > Modifiers > Flip Normals
Note that you can do this in Google Sketchup as well. In SketchUp, select all the faces that you want to "flip" the material on. For this tutorial I have selected the entire bigger box.
Right Click > Reverse Faces
Now that the faces are oriented correctly, time to move on. If you reversed faces in SketchUp, re-export the model as a DAE and open it with Ultimate Unwrap 3D (Repeat steps 1 and 2).
Now the faces are oriented properly the way we want them. But we are still not ready to export to Shiva. In UU3D, expand Materials on the right hand side. Any material that does not have a texture (with a T in the box) probably needs to be deleted. Notice in the picture that I have selected the "Unassigned" material and UU3d reports (upper left corner) that 1 Vertices, 1 Edge, and 3 Faces are assigned.
Delete unnecessary geometry and materials
Now we want to delete the geometry AND the material so first:
1. Right click on "Unassigned" > then click "Select" (or use AutoSelect)
2. Click Edit > Delete (this deletes the geometry)
3. Right click on "Unassigned" > then click "Delete" (this deletes the material)
Now all that should remain is the necessary geometry and under "Materials" in UU3D there should only be 1 material for each texture. The model is ready for Shiva. Save as a FCollada file (DAE) in UU3D, when the export options opens up, you can use the default UU3d options.
Import the model in Shiva3d. Adjust the scale and other options if necessary. I selected to import Meshes and Materials only. Notice in the Data Explorer that the correct number of materials and textures are imported.
Adjust the materials lighting properties and add the model to your scene! Notice that 2 sided faces appear correctly in Shiva using this method.
Meters and Shiva Units
1 Shiva Unit is equal to 1 meter. You should configure Google SketchUp to use meters as the default template. You can open this window by clicking Help > Welcome to SketchUp...
Now use the Rectangle tool to create a square that is 1 meter by 1 meter and Push/Pull it up to 1 meter as well. I have provided an orange "1 Meter" texture here if you want to use it.
Now you have a box in SketchUp that is 1 meter X 1 meter X 1 meter:
Follow the procedure to export this model and open it with Ultimate Unwrap 3D. When importing into UU3D, there is an option to adjust the scale- leave this at the default value 1.000. To scale the model correctly, in UU3D click 3D Tools > Modifiers > Scene > Scale... and set the value to 0.0254:
Now you will want to click 3D Tools > Modifiers > Scene > Move... and click the Center button and the Above: Y button. Now the model is the correct size and in the middle of the scene.
Go ahead and save the model now and import it to ShiVa Editor. The nice thing is that the model is scaled exactly correct now, so when importing to Shiva just use the default "Scale by: 1.000".
There are a couple options in Shiva that will help us in this example. In the Scene Viewer, click: - Display > Grid > Setup... now notice that 1 grid unit is HALF of a Shiva unit (aka half a meter!)
- Edit > Options > Translate... and you can set the Snap Mode: Grid.
Now you can snap these boxes together and they will fit perfectly. Look in the image below to notice that the 1 Meter Box is exactly 1 Shiva Unit.
Now shoot it! ;)
Credits and Further Reading
Created by Forum User Selzier
Link to the original forum thread