Preparing your models for Unity
There are just a few more things to do. I know you've all been working hard, but I need some help to convert your models into Unity within a week. Please look at the list below for all the steps you need to take to prepare your models for me so I can import them into Unity.
1. Get rid of Primitives, Generators, and Splines
When you're done with your project, save it under a different name. That way, if something goes wrong, you can always go back to the original. The model should only be a Mesh model, so get rid of all the other elements like Primitives, Booles, Cloner, Deformer, Splines, etc. This step is easy: just select all the objects and press C. However, I suggest that you go through your Object Manager step by step, in order. This will make sure that everything is converted how you want it to be.
2. All textures need to be alone and UVW
OK, this is more complicated. To use Unity with your textures, you need to bake them. Yes, you heard right β we're going to bake today. First, we need to find all the objects that need our attention.
a) Object Groups
First of all, we need to combine objects that have the same textures so that we can bake them properly. This can sometimes be difficult, but it is possible. Imagine this: we need single objects with only one texture. If you have hierarchies with several objects, but using one texture that is assigned to the parent, we need to fuse all these objects (including the parent) into one. But be careful! These objects shouldn't be too big, otherwise you won't be able to bake a texture of high enough quality to make them look good. It is best to ask your supervisor for advice.
To do the grouping, select all the objects (which should all be meshes by now) in the Objects-Manager. Right-click on them and select Connect Objects + Delete. This will combine them into one object! It's that easy. Be smart about it though, and think about what makes sense to fuse and what not. These objects shouldn't be too big. Don't connect ALL the roofs of one reconstruction, but everything connected to ONE roof is a possibility. You might even do the North, East, South and West sections separately.
If the resulting objects still have multiple textures, don't worry β we will solve this in the next step.
b) Optional: Simplify objects
Sometimes objects are just too big, meaning they have too many polygons and are therefore too heavy for the machine, especially in VR when we use two separate images. If you have an object in your scene that is too heavy, you can use Polygon Reduction. Say you want to simplify an object. You can select that object, go to the tools menu with the array object and select the Polygon Reduction tool while holding down the ALT key. Holding the Alt key will automatically make the Polygon Reduction tool a parent of the selected object. The calculations will start, but depending on the object it may take a while. You can get an idea by looking at the status bar at the bottom left of the screen. It will tell you how long it will take.
Once calculated, you can see the simplified object. Most of the time this is not enough, but now you can easily make changes. In the Polygon Reduction object, enter a reasonable number in the Triangle Count field. Try something like 5000 and see how it looks. The calculation should be much faster now. Find the sweet spot between good looking and low poly. When you are done, you can select the Polygon Reduction object and press C to make it a final mesh. Note that this will keep your object reduced, so it might make sense to make a copy of it before you mesh it.
c) Bake textures
So, about baking... We only need to bake textures on objects where:
- the object has multiple textures stacked on top of each other; or
- a single texture is not in UVW mode. You can check the mode by clicking on the texture tag and looking in the Attributes Manager. Under Projection, there should be UVW. If not, don't change it, because it will probably look weird. We will bake the object instead.
To bake an object, select the object in the Objects Manager and press SHIFT+C to open the Command Line. Then enter Bake and select Bake object... Make sure you only select Single Texture. Then, set the supersampling to 0, the pixel border to 1, and set the width and height to somewhere between 512 and 8192. For larger surfaces (like terrain) you can even go to 16.384. Remember to create square textures, so always enter the same size for width and height. Finally, click the three dots next to Path Name to choose a place to store the baked texture. It's a good idea to store the new texture in the tex folder of your project. Then hit Bake and see what happens.
If you've done everything right, you should now only see one texture in UVW projection. The command has left the original object there, just in case, but you can't see it (double red dots). If you're happy with the result, you can delete the original object, so only the baked object remains.
Do this for all the objects in the scene so that in the end you have:
- Only meshes
- All meshes that need a texture have a single texture in UVW projection
- Everything is named properly, without any special characters (Γ€, ΓΆ, ΓΌ, Γ. &, etc..)
- No objects are too big
d) Orientation of polygons
Finally, we have a problem. Polygons have a front and a back, and Unity only sees the front. So sometimes when you are modelling, the orientation of the polygons is wrong. Select one of your objects and switch to polygon mode. Press CTRL+A to select all the polygons in the Viewport. If everything is done correctly, you should see all your selected polygons in a yellow colour. This is the front. If you see polygons in a blueish colour, you are looking at the back and need to orient the polygons correctly. Select all the polygons that are blue, right click and select Reverse Normals or press U~R. Do this until you see all the polygons in yellow. Do this for all your objects, otherwise you'll see holes in VR where there shouldn't be any.
3. Export
Finally, you need to save your project to give it to me...rst, check that all the textures in your master file are connected correctly... do this, open the Texture Manager ...m the Window menu)... all listed textures have a green tick on the left, all is well... not, you will have to correct this until they do...nally, to save the project in a way that I can open it on my computer, you need to Save Project with Assets.... You'll find this in the File menu. This will create a folder and in it a C4D file and a subfolder called tex. Give me everything!