In this thread I will be going over some tricks to ensure that you always have the right size and appearance when uploading your meshes. I do not go over tips for 3D modelling in itself. I will be using Blender for this tutorial, which is a good bit of free software for 3D Modelling.
This has two parts:
- Importing to ROBLOX, which goes over editing in your 3D program
- A brief part over how to make your model the best for anywhere collision needs to be factored in.
PART 1: IMPORTING TO ROBLOX
This part goes over some tricks in your 3D editor of choice.
Section 1: Scaling models to be correct on import.
This section will tell you how to ensure your imports are to-scale and not way too big or small. Click to view!
This is fairly simple and my other tutorial had this as its main focus. If I open up blender’s default workspace, you can see the basic cube there in the middle. If we were to import this cube (Exporting to FBX, importing to roblox) we would notice something rather funny about its size!
If I were to import this cube into roblox, its size would be
[200, 200, 200]! Luckily for us, this makes scaling easy: We can see from the grid on the floor that the cube takes up 2 grid spaces. From this, we can assume that one blender unit is the same as 100 studs. Simple enough, right?
In order to fix this when we export (without actually editing the model), we need to change the export settings. When you export as an FBX, pay close mind to the options in the lower left…
In order to make one blender unit equal to one stud, we would simply set this value to
0.01 - 1/100th of a blender unit, or 1 stud. This means our cube would be
[2, 2, 2] in size when we import it since it takes 2 blender units on the grid.
Section 2: Keeping triangle count low while making things appear smooth.
(Suggested by Post #7)
This part goes over what normals are, and how you can use them to create a very good illusion of a high quality mesh. Click to view!
First thing I will go over is for those who don’t know what normals are. Skip this if you know what they are.
In 3D modelling, there’s something really cool we can do since we’re not in the real world. Logically, if you hold something in the real world, it will reflect light based on its surface, right? When we’re in a 3D editor, we can actually edit the direction that the light reflects on an object - That’s crazy, isn’t it? Imagine holding a piece of paper upright, but having the light bounce off of it like you were holding it sideways.
By using normals, we can make a model appear smooth. Normals apply to vertices, or, the actual points in 3D space that can be told to make a face. When they are used to make a face, you can think of it like bending way the face reflects light, almost like curving a sheet of paper. Keep in mind that this doesn’t actually change the physical shape. Just the lighting.
So here you can see a shape called an icosphere - It’s a sphere that takes after a primitive type of geometry called an “Icosahedron”. As you can see though, it’s very low poly and is not a good choice for getting the appearance of it being smooth.
Fun fact: Did you know that the default Ball shape on parts uses an icosahedron? That’s an example of how what I’m about to go over can help!
Seeing this there is a single step we can do in blender to automatically make it smooth for us. At the bottom of the window, go into Edit Mode by clicking the “Object Mode” menu option, and changing it to Edit Mode.
Now that you’re in edit mode, ensure your model is selected (It should be by default) - If it’s not, press the
A key on your keyboard to select all.
Now, go over to the menu on the left, click the “Shading/UVs” tab, and click the “Smooth” option under “Faces”
What this will do is smooth out the normals, causing the model to appear very very smooth. You can see the effect right away. You might be able to see it better if you deselct everything or go back into object mode.
Section 3: Ensuring your mesh can be seen from all angles (For flat / 2D geometry only)
This section goes over how to ensure your normals are correct. Roblox has something called "Backface culling" - This means that if the camera is viewing a surface in the same direction as the normal, the face will appear invisible (When you look at a surface and you can see it, you're looking in some direction that's opposite of the normal).
One of the issues many people run into when uploading meshes - Especially meshes with flat portions - is that they can only view the mesh from one side due to the normals. This is very easy to fix within blender.
To get started, we need to go to our mesh and turn on Edit Mode. For the example, I have a flat plane.
Unfortunately, while blender does show which way the normals are facing (If you look at a face from the back, it will be dark, whereas looking at it from the front will make it bright), we can’t be exactly sure, especially on more complex meshes. In order to assist with this, enter edit mode then press the
N key on your keyboard. This will open a little menu. Scroll down and find this: (Zoom in on the image! Part of it is gone)
Click that little square icon with the orange face highlighted, the one that’s in the smaller red circle I drew. You will notice little blue lines on your mesh. These blue lines will be sticking out of the face, in the direction that their normal is. In the case of my plane, I can see it two-sided in blender, but that blue line is only on one side. This means the side without the blue line will be invisible in roblox.
(Suggested by Post #2 - You can also check the “Backface Culling” option in that same menu, and it will make pieces of geometry you’re looking at from the wrong side invisible)
In order to fix this, we need to duplicate that face and turn it around so that there’s actually TWO planes - One for each side.
Luckily for us, Blender has a built in tool to do this for us. Start by selecting the vertices of the plane. You can do this either by right clicking on the vertices to select them, or by pressing the
C key and clicking on top of the vertex with a selection brush.
After we have our vertices selected (Again, make sure you’re in edit mode. I feel like one of you is going to get stuck here ), click “Mesh” on the lower side of the window (If you used the selection brush by hitting
C, hit escape so you can use the mouse again), then mouse over Faces and click “Solidify”:
When you click this, you will notice a few more blue lines. What this operation does is adds thickness to any selected faces. We need to change this, however. After you do the solidify option - assuming you didn’t click anything after that - you will see options in the lower left corner of your screen:
We’re going to set that Thickness value to 0. This will do exactly what we want, and add a back to our face. Note that this duplicates the face, which means it adds triangles to the mesh.
That’s the result.
PART 2: A tip for collision with meshes in-game.
I’m certain many of you know about the issue where Unions and MeshParts don’t have realistic collision. Fortunately for you, this has a remedy. Unfortunately it only works in a very specific case.
This type of collision is called a “Convex Hull” - It can be set with the CollisionFidelity property in roblox. A convex hull is easily imagined like shrinkwrap - It creates a film around the shape of an object, but doesn’t go into any dents, holes, or pores. If your mesh is convex, which means it has none of the features that I just mentioned, you can set the CollisionFidelity property to
Hull and drastically improve accuracy with collision. Take a look at this sphere I uploaded.
Looks good, right? Unfortunately its collision is rather messy with the default collision…
However, since my shape is convex, it’s possible to set the CollisionFidelity to
Hull to get an exact shape.
Click to view.
(Note: I activated the studio setting to view Decomposition Geometry - This is how union / mesh collisions are viewed. CloneTrooper1019 has a plugin that makes it much easier to enable/disable. Get it here: https://www.roblox.com/library/414923656/Show-Decomposition-Geometry)
Hopefully this is enough to help you all import properly the first time so that you can avoid issues with your meshes. Please reply if I got anything wrong or missed any points.