Modeling a house in SketchUp and bringing it into Unity 3D

Teaching materials for the school of programming. Part 7

Spoiler

Previous tutorials can be found here:





  1. Spaceship





  2. Dominoes





  3. Flappy bird





  4. Gravity room





  5. Platformer





  6. Trees (plugin SpeedTree)









In the last lesson, we touched on the topic of self-creation of objects for games. Incl. mention was made of the SketchUp program we used a lot to create simple structures.





Today, we will create a building and transfer it to Unity. I want to draw your attention to the fact that to import a finished building, you need SketchUp to be on the same PC. Without the program, Unity will not be able to import the model. 





Execution order

Open SketchUp and select the Simple Template - Meters.





Select the shape tool and draw a house-shaped square on the ground.





Now, we will extrude it with the push / pull tool.





Let's make the walls. To do this, use the Offset tool.





Let's repeat the operation one more time.





A rather narrow frame has formed that can be used to create walls. At this stage, it is worth adding all the planned partitions.





The extra lines are removed with the Erase tool.





Moving out the walls.





. . , .





.





Ctrl+C Ctrl+V, , .





.





/ " " (On Face).





, .





.





"" (Paint Bucket) . .





.





, Shift, , β€” Ctrl.





. -, , β€” .





. Alt "", .





"" .





. , . "".





.





, . , "" (Scale).





Draw the outline of the roof on the plane. Extra lines can be erased.





Use the Extrude / Press in tool to add volume.





Use the "Offset" on the roof to add some volume.





And push the plane inward a little.





Let's paint everything with suitable textures and remove the person. The house is ready to be imported into Unity!





In the import settings in Unity, check the Generate Colliders checkbox, and in the Material tab - Use External Materials.





At the same time, all materials are imported and folders are created.





Now, you have your own house model to use in games!








All Articles