Modeling ******** Basic modeling ============== It is not always easy to find graphic assets that match your needs. Therefore, you should at least know how to create simple shapes to enhance your 3D demos. The first and simplest approach is to model the elements of your game using a cubic shape or a sphere. This is the basic technique that everyone should know. For example, if you want to model a pickup pickup: * Check on internet vehicle dimensions: "pickup pickup vehicle dimensions" * Create a 3D Cube * In the Inspector, in the scale values, enter 6, 2 and 2.5 (distances are in meters) .. image:: pickup1.png :scale: 60% * Duplicate this cube (CTRL-D) * Move this cube upward so that it is placed above the base .. image:: pickup2.png :scale: 40% * Change its X scale value to 1.5 * Move this cube to obtain a ratio 1/2 1/4 1/4 .. image:: pickup3.png :scale: 40% * In the Assets folder, go to *SolidColorMaterials* folder * Drag and drop a material to color our two cubes .. image:: pickup.gif :scale: 50% * Select the two cubes (SHIFT+Click) * Use CTRL+SHIFT+G to group them * In the hierarchy windows, click on the newly created object and rename it *Pickup* * Here is our final result: .. image:: view.gif :scale: 80% .. warning:: You should at least reach this level of modeling for your project. It is simple, effective, and allows for a good understanding of the objects in the scene. Lego Style modeling =================== You can refine the first approach by adding details to your model: * Two headlights .. image:: pickup4.png :scale: 40% * A bumper .. image:: pickup5.png :scale: 40% * Four wheels .. image:: pickup6.png :scale: 40% * A windshield .. image:: pickup7.png :scale: 40% * Some furniture .. image:: pickup8.png :scale: 40% * A door handle .. image:: pickup9.png :scale: 40% At the end, your hierarchy should look like this: .. image:: pickup0.png :scale: 40% .. note:: We achieved the maximum that can be obtained with a LEGO-style modeling approach. If you reach this level, that’s great, and you don’t need to go any further. Level 3 is optional and intended for those who are curious to explore how things work in professional software. Probuilder ========== We don’t have time to cover advanced modeling software like Blender, Maya, or ZBrush. However, Unity includes a built-in modeling tool that provides essential functions for polygonal 3D modeling. It is primarily designed for level design prototyping by blocking out a level with simple geometry that can later be replaced with final game assets. That said, many professional games featuring a low-poly art style have been entirely modeled using ProBuilder, such as Secret Legend: .. image:: secret.png :scale: 80% Since Unity 6, ProBuilder has been directly integrated into the interface. While the tools remain the same, most YouTube tutorials still showcase the older version with its dedicated workspace window. Installation ------------ * Select Windows > Package manager * In the left column, select **Unity Registry** * In the search bar, type **ProBuilder** .. image:: probuilder.png :scale: 70% * Click on the install button First Shape ----------- .. warning:: You must understand that a cube created with *3D Object > Cube* is ABSOLUTELY not the same as a cube created with ProBuilder. The Unity standard cube is a non-modifiable instance that acts as a reference shape for all other instances in the scene. It is not editable. The only option available is to scale it to change its size in the scene, but its original shape remains unchanged. A ProBuilder cube, on the other hand, is an editable mesh that you can sculpt and modify as you wish. Each ProBuilder cube has its own unique geometry and does not share its structure with other instances. * A new tool is available: look at the cube-shaped icon .. image:: icons.png :scale: 40% * Click and old on this new button: a list of all available ProBuilder shapes appears .. image:: params.png :scale: 40% * Select *Create Pipe*: the icon has changed .. image:: 2icon.png :scale: 40% * Click on the *Create Pipe* tool * Create a pipe in the scene .. image:: pipe.png :scale: 40% * Notice that a new panel called **Shape Settings** appears on the lower right .. image:: settings.png :scale: 70% * Change the **Thickness** parameter and see what happens * Change the **Sides count** parameter and loot at the shape * Change the X, Y and Z parameters and see what happens Low poly modeling ================= Instead of introducing different tools independently, we demonstrate them while modeling a basic pickup. Create Cube ----------- * Create a PB cube in the scene * Change its size for X:4, Y:1, Z:2 .. image:: cube.png :scale: 70% Edge selection -------------- * Look a the grid-shape icon on the top of the toolbox panel: .. image:: grid.png :scale: 50% * Click on this icon to activate new icons in the top bar: .. image:: filters.png :scale: 60% * Left: select only **vertices** of the shape * Middle: select only **edges** of the shape * Right: select only **faces** of the shape * Activate the *Edge Filter* * Select an horizontal edge of the cube .. image:: edge.png :scale: 40% Edge loop --------- * With the edge selected, right click in the scene to bring up a context panel: .. image:: edgeloop.png :scale: 40% * Select **Insert Edge Loop**, a yellow edge loop appear: .. image:: edgeloop2.png :scale: 40% * Select the red translation gizmo to move the loop at 3/4-1/4: .. image:: edgeloop3.png :scale: 40% * Click anywhere to confirm * Select a long horizontal edge: .. image:: edgeloop4.png :scale: 40% * Right click and select *Insert Edge Loop* * With the red translation gizmo, move the loop in the middle of the shape. * Click anywhere to confirm .. image:: edgeloop5.png :scale: 40% Face selection -------------- * Activate the *Face Filter* .. image:: facefilter.png :scale: 50% * Select the middle face on the top of the cube .. image:: face.png :scale: 40% Extrusion --------- * If we pulled the face upward using the translation tool, we would obtain this shape: .. image:: extrude1.png :scale: 50% .. warning:: This is not what we are looking for. We want to add material to our object, generating new faces and edges. To do this, we need the extrusion tool. * With the face selected, right click in the scene to bring up a context panel: .. image:: extrude2.png :scale: 50% * Select **Extrude Faces**, .. image:: extrude3.png :scale: 50% * Using the green gizmo, extend the height of the pickup's roof: .. image:: extrude4.png :scale: 50% Select multiple edges --------------------- * Activate the *Edge Filter* .. image:: edgeicon.png :scale: 50% * Select this edge: .. image:: arete.png :scale: 40% * While holding the SHIFT key, select the three other edges: .. image:: selectloop.png :scale: 40% * Using the red gizmo, translate this group of edges to create a typical windshield slope .. image:: slope.png :scale: 40% * In the same way, lower the front edge of the pickup. .. image:: slope2.png :scale: 40% Interior extrusion ------------------ * Select the face at the back of the pickup: .. image:: back.png :scale: 40% * Right click and select *Extrude Faces* * Reset extrude distance to 0: .. image:: distance0.png :scale: 50% * Select *Scale tool* in the *Toolbox* * Using the blue and red Gizmos, shrink the face: .. image:: back2.png :scale: 50% * Right click and select *Extrude Faces* * We are performing a second extrusion * Nothing appears, do not worry * Select the Translation tool in the toolbox * Use the green gizmo to create the pickup bed: .. image:: back3.png :scale: 40% Interior extrusion ------------------ * Select the windshield face .. image:: win1.png :scale: 40% * In the top toolbar, select **element** to obtain 3 axis oriented relatively to the windshield * The blue axis is now normal to the face .. image:: win2.png :scale: 40% * Perform an extrusion to create the glass face: .. image:: win3.png :scale: 40% .. note:: Geometrically, the shape of the pickup remains unchanged. But, this new face will be used to set a specific color for the glass. * In the same way, add faces for the two side windows: .. image:: win4.png :scale: 40% Adding edges ------------ * Loof at the front face of the pickup .. image:: front.png :scale: 30% * Select the **Cut tool** .. image:: cut.png :scale: 40% * Add edges to represent the pickup's headlights: .. image:: phare.gif :scale: 60% * Then, you can adjust vertices location to improve squareness of the headlights: .. image:: front2.png :scale: 50% PB coloring =========== Neutral material ---------------- By default, ProBuilder materials use a texture featuring a 1-meter grid. We cannot disable this texture because the default ProBuilder material is read-only. Thus, we first create a copy of this material and then we will be able to modify it. * Select a standard PB oject in the scene * In the inspector, find the mesh renderer entry and click on **ProBuilderDefault** .. image:: meshrenderer.png :scale: 40% * This opens the assets folder where the material is stored * Select the ProBuilderDefault material .. image:: mat.png :scale: 50% * Press CTRL C to copy it * Go in the folder: Assets-SolidColorMaterial * Press CTRL V to paste it * Rename it to VColor .. image:: vcolor.png :scale: 50% * Select the VColor material * In the Inspector, on the right of the albedo parameter, click on *Select* button .. image:: texture.png :scale: 50% * Select None (by name) .. image:: none.png :scale: 50% * Apply this material on the pickup .. image:: neutral.png :scale: 50% Colorize -------- * Select Tools > ProBuilder > Editors > Open Vertex Color Editor .. image:: vertexeditor.png :scale: 40% * Select Translation tool * Select the pickup * Activate Face Filter * Perform a rectangular selection to select all the faces of the pickup * Click the *Apply* button on the left of the brown color .. image:: rust.png :scale: 30% * Select the windshield glass and the side windows * Choose a light blue color .. image:: glasses.png :scale: 30% * Select the pickup's headlights * Choose a white color * Here is our final result: .. image:: end.png :scale: 30% Going further ============= **OPTIONAL - NOT PART OF THE OFFICIAL COURSE** Let's create some pickups in few minutes: .. raw:: html
If you want to discover what is possible with low polygonal modeling, you can visit these channels: * `10 minutes modeling challenge <https://www.youtube.com/playlist?list=PLC7nmYI-cbT1JN7OADBFhSnpkV-odrMyW>`_ * `Low poly tutorials