Some tips and tricks to uploading meshes properly and improving physical interactions (Blender 2.8+)

[color=#999999]UPDATE 23 OCTOBER 2019: I have entirely rewritten this thread. Certain replies may seem a little bit out of context as a result of this edit, but after re-reading this thread, I have decided that it is not up to the standards I’d like to hold it to. As such, I’ve updated it with new contents. I have also updated this thread to use Blender 2.8.[/color]

[color=#999999]It should be far easier to read, far more organized, and much more presentable.[/color]


Hey all.

In this thread I will be going over some tricks to ensure that the meshes you upload are set up and ready to go on Roblox. I do not go over tips for 3D modelling in itself. I will be using Blender for this tutorial, which is outstanding if you need a free solution to 3D modelling. You can get it at https://blender.org/ or on Steam at steam://store/365670.
[color=#999999][size=1]n.b. The Steam protocol URL above points to my own website to redirect to Steam protocol URLs. The site was designed to allow usage of this protocol on websites / services that don’t natively support it (e.g. Discourse)[/size][/color]

This thread goes over the following points:

  • Things to do when importing to Roblox to ensure the size and appearance of your model is correct.
  • Good practices with collision on your meshes to ensure proper interaction and performance.

There are also a number of things to assume in this tutorial:

  • All keybinds use Windows terminology. If you are on a Mac, all mentions of Ctrl should be treated as ⌘ Cmd instead, for example.


Importing To Roblox

This part goes over some tricks in your 3D editor of choice. These tricks may not exclusively apply to Blender.


Section 1: Scaling models to be correct on import.

Blender units are proportional to Roblox units. Specifically, 1 Blender unit is 100 studs. If you export a mesh with the default settings, your model will be 100x bigger than it needs to be!

There are two possible ways to tackle this problem. The primary method is to edit the appearance and unit scale in Blender (I prefer this method), and the second method is to edit the export parameters when you export your model. I will go over both methods.


Method 1: Editing Unit Scale

Editing the unit scale in Blender is super easy! You’ll want to start by navigating to the [color=#3FFF7F]Scene[/color] tab and opening the [color=#3FFF7F]Units[/color] dropdown category.

image

After you make it here, you’ll want to edit the [color=#3FFF7F]Unit System[/color] and [color=#3FFF7F]Unit Scale[/color] values so that Unit System is set to Metric and Unit Scale is set to 0.01.

You may notice that your grid is incredibly large now. We will fix this next. Navigate to the dropdown menu for [color=#3FFF7F]Overlays[/color] at the top of Blender, and change the [color=#3FFF7F]Scale[/color] to 0.01.

image

Now, exporting meshes with the default settings will make one Blender unit identical to one Stud! This should streamline the import process quite a bit.


Method 2: Editing Export Scale

This is the simpler solution, but I personally believe that it is more of a bandage solution rather than the proper way to do it.

When exporting your models, you will see a “Scale” value.

image

You will want to set this value to 0.01 when exporting. You will need to set it every time you open Blender, so if you forget, it will have adverse effects.


Section 2: Using normals to save poly-count and keep things smooth.

Normals are a feature of all 3D models that changes how light appears to reflect off of a surface. Since we are in a computer 3D environment, we are not constrained by the limits of reality. Imagine holding up a sheet of paper so that it is flat and upright. In a 3D program, we could edit the normals of this paper so that it reflected light as if (and, by extension, looks like) the sheet of paper was bent into a C shape.

Normals can be used to make lowpoly models look smooth and hide part of the fact that they are lowpoly.


Making the mesh smooth

Making the mesh smooth is incredibly easy. Start out by going into Edit Mode by setting the [color=#3FFF7F]Object Interaction Mode[/color] in the top left of your screen to Edit Mode, or press Tab to swap between Object and Edit mode. Make sure you have the object you want to edit selected.

If the mesh is not already selected (all orange), select everything on the mesh by pressing Ctrl A. Everything should be orange. If it’s not, press it again.
[color=#AAAAAA][size=2]Note: If you use 2.7 era controls like I do, simply press A without holding Ctrl. This can be configured in Edit → Preferences.[/size][/color]

Now, go up to the [color=#3FFF7F]Mesh[/color] tab at the top of the screen, go into the [color=#3FFF7F]Shading[/color] subsection. Select [color=#3FFF7F]Smooth Faces[/color]. You can also search for this option by pressing F3 [color=#AAAAAA][size=2]Or for 2.7 era controls, Space[/size][/color]

image

When you click this, your mesh will suddenly appear quite odd. It will be automatically smoothed out so that the transition between faces is gradual.


Catch case: What if I want to keep some parts sharp (able to tell there’s two separate faces somewhere, or have a distinct flat surface)?

Thankfully, this is possible too!

You should start out by going to [color=#3FFF7F]Edge Selection Mode[/color] by clicking the icon of the Edge at the top of the screen, next to the Edit Mode button.

image
(See the image icon)

Next, select the edges that you want to keep sharp. If you have any edges in a loop (for instance, the end of a cylinder), you can hold Alt and select an edge. Blender will attempt to automatically select the loop.

In this example, I will be doing this to a cylinder.

See how the edges on top and bottom are selected?


[size=1]n.b. since all of those edges make up a face, which is the end cap of the cylinder, it also selects and highlights that entire face.[/size]

After you’ve done this, go to the [color=#3FFF7F]Mesh[/color] tab at the top of the screen, and go into the [color=#3FFF7F]Shading[/color] subsection again. This time, you will click [color=#3FFF7F]Sharp Edges[/color]. The edges you have selected will be highlighted in a [color=#00FFFF]Cyan[/color] shade to indicate that they are sharp. You can also press F3 and search “Sharp Edges”. If you want to undo this, select the “Smooth Edges” option instead.
[color=#AAAAAA][size=2]Note: I recommend mousing over Sharp Edges and Smooth Edges in the Shading menu and right clicking on them, which will allow you to add them to your favorites (accessable via pressing Q anywhere in Blender) and access them with a single button instead of going to the Mesh menu every time.[/size][/color]

After you’ve marked your edges as sharp, we need to split the mesh so that it knows there should be clear seams on those edges.

Go back to Object mode (same way you got to edit mode, but select object mode this time), go to the [color=#3FFF7F]Modifiers[/color] tab on the right of your screen, click [color=#3FFF7F]Add Modifier[/color], and select [color=#3FFF7F]Edge Split[/color].

image

image

This will create a new Edge Split Modifier. Deselect the “Edge Angle” Checkbox so that it is OFF.
image

My cylinder now looks like this:

See how the top and bottom caps are sharp and no longer have shading to smooth out that edge?

[color=#FF0000]IMPORTANT:[/color] When you export your models, you will need to check the [color=#3FFF7F]Apply Modifiers[/color] checkbox! You can also apply the modifier yourself, but this action is irreversible (you can undo it, but if you save the model and exit Blender, that’s it). If you forget to do one of these two, the Edge Split will not be applied.
[color=#AAAAAA][size=2]Note: Checking the “Apply Modifiers” option in the export menu does NOT irreversibly apply the modifier. It will keep it in the Modifiers list on the right of your screen so you may continue to work with it on.[/size][/color]

image


Section 3: Ensuring your mesh can be seen from all angles (For flat / 2D geometry only)

This section is obsolete. Click here to view.

Roblox uses a feature called “Backface Culling” for meshes. If you’ve ever flown your Studio camera inside of a mesh you’ll notice that you can see out of it as if it’s not actually there. This is what Backface Culling does: It blocks out the back side of geometry from being visible.

If you upload any meshes with plane geometry (a 2D flat shape, like a single stray face), this will adversely affect your mesh. For instance, say you have a flat plane for a grass texture. Due to backface culling, this grass will only be visible from one side.

You can visualize this in blender by going up to [color=#3FFF7F]Viewport Display[/color], and checking the [color=#3FFF7F]Backface Culling[/color] box.

image

Now, any faces you view from the wrong side will appear transparent.

Backface Culling

You can remedy this problem with another modifier. Go to the [color=#3FFF7F]Modifiers[/color] tab on the right and add the [color=#3FFF7F]Solidify[/color] modifier.

image

After adding this, you can keep its [color=#3FFF7F]Thickness[/color] value at its default, or you can set it to 0 if you want perfectly flat geometry to be preserved.

[color=#FF0000]IMPORTANT:[/color] If you turn backface culling off and have thickness set to 0, you will notice Z-fighting. This will not be visible in Roblox, so this is okay to see. It may be annoying in Blender, however, so I recommend keeping Backface Culling on.

Roblox now offers a property named DoubleSided on MeshPart instances that disables backface culling. This performs the same task, but does not double the poly count of the uploaded mesh.



Collision Best Practices

I’m certain many of you know about the issue where Unions and MeshParts don’t have realistic collision in many cases. Fortunately for you, this has a remedy.

In Roblox, collision can be very expensive. If your place uses a lot of unions or meshes, having their CollisionFidelity property set to Default can cause extreme lag in some cases. Hull is considerably less laggy in most cases, and Box is the fastest in all cases.

I recommend getting CloneTrooper1019’s “Show Decomposition Geometry” plugin to view MeshPart and Union collisions.

There are some rules to keep in mind when adapting your mesh to have proper collision.


Rule #1: If you can use primitives, you should use primitives.

One example of this is if I upload a highpoly sphere because I think Roblox’s spheres look bad for my game. You may think that setting its collision to Hull is a good idea since it can perfectly represent your mesh. However, this is false – Setting it to Hull is a bad idea! Why?

First off, a convex hull preserves flat edges. This means that if your mesh rolls, it will wobble or get offset, because it’s still relying on super small, flat faces. Second, the game has to calculate that collision. Although hulls are generally fast, this takes resources.

It is a better choice to add a default Roblox sphere of the same size, make it transparent, and weld it to the same location as the mesh sphere. The mesh sphere should have its collisions disabled and should have its Massless property set to true. All physical properties should be given to the Roblox sphere. This is a better choice because Roblox spheres use actual radial collision – This means they will flawlessly behave like a sphere, and collision is super fast to calculate. Additionally, given that your mesh is intended to be a sphere, the physical properties should be assigned to the Roblox sphere which, in the eyes of the physics engine, is a 100% perfect sphere. As a result, the behavior will be more accurate if you assign physics to the Roblox sphere instead of your mesh.

This idea also applies to using multiple primitives to make collision for your mesh. It’s generally better to use welded / anchored primitives instead of the actual mesh collision, especially for complex interaction.

Note: If your mesh can use box collision safely, it is better to use the mesh with its CollisionFidelity property set to Box! Adding a special part just for this is a waste. Please remember that this is less of an indisputable rule and more a guideline. In some cases it’s probably better to use more precise collisions, and every game is different, after all.


Rule #2: If you don’t need to collide with it, you shouldn’t be allowed to.

Any meshes you use in the background that players or other parts won’t be able to interact with (no walking on it / colliding with it, no Touched connections) should have their CollisionFidelity set to Box, their CanCollide property set to false, and their CanTouch property set to false. This will improve performance.

[size=2]* Adding any constraints, BodyMovers, or any other physics-based instances will make the physics engine calculate information for this part unless it is Anchored. Connecting any Touched events will also cause the physics engine to calculate for this part, even if it is Anchored, unless CanTouch is false, in which case the Touched event will simply never fire.[/size]



What do you all think? Anything you think should be added? Any stuff I missed? Let me know in the replies so I can improve the thread!

179 Likes

Oh my! Didn’t think there was a way to set the scale of exported files! Wonderful tip!

Might as well contribute my own tip. Another way to see the backface culling, which may be good in certain cases, is to click the “Backface Culling” button in the very same menu as the one to view normals using blue lines. Instead of blue lines, it makes any side a normal isn’t facing transparent, like it would be in Roblox.

7 Likes

Yeah I was gonna mention this but I forgot to. Good bit to add.

1 Like

Also make sure you apply the scale when you’re done modeling something by pressing Ctrl+A–>Scale. That way the scale values will reset and won’t cast any ugly shadows in studiio.

6 Likes

Also to upload a mesh to roblox with the texture included, you have to export it from blender render

5 Likes

Thanks for tips! :grinning:

1 Like

a pretty neat tutorial ; i once planned to write a similar far more detailed one but iam lazy and busy as hell ):

Some suggestions and additions :

First off instead of showing us users some “complex” maths ; you could have used the simple sentence which is : 1 square of Blenders floor grid is exactly 1x1 Roblox studs in size "
Which is pretty crucial in order to simply give the Blender mesh the right size .

About the Face normals : instead of only addressing to fix planes ( which are a rather very rarely used mesh ) you could have simply told and teached the common face normals recalculation method .

Because the solidify modifier only adds additional triangles and does not fix most normals shading issues .

tell me if you like me to tell the full and best way to deal with most face normal problems …since iam sadly too busy to make my own tutorial ):

But thank you for making a tutorial anyways (:

This section was specifically directed at planes in a mesh because many users have actually resorted to uploading meshes ripped from games that tend to be low-poly and use plane geometry.

I’ll append that thing about normal smoothing and correction in a bit here, though, because that’s definitely something I need to cover.

1 Like

meshes ripped from games ): i dont like that situation at all :worried:

I truly fear that all those mesh rippers will only lead the Roblox mesh feature into an dead end … i especially fear that for example disney will one day get aware that some ppl even rip meshes out of official licenced Star Wars games );

I slowly dislike ppl which rip meshes :neutral_face:

anyways is someone allowed to share or inform about Discord servers here on the forums ? since i got an utterly usefull discord channel about using Blender for Roblox

Great post, thank you!

I had a problem with collisions as well, and could never figure out how to fix it. In Blender, I had created a typical triangular terrain with some hills and valleys. When I imported it, the collisions were not calculated properly in Roblox - my character would walk over a small valley, for example, but appeared to be walking in air (by 1-2 studs) over the actual mesh below. I tried all the collision modes in Roblox, but nothing would fix it.

4 Likes

Very useful! Thanks!

1 Like

I may edit this post later on to go over how to split up meshes into several parts that you upload separately so that you can make better collision for things that require it, since the collision fix that I gave only works in some scenarios.

I was stumped by backface culling and your guide helped me fix it. Thanks very much!

4 Likes

Another quick thing to note if you didn’t already know is, Meshes contain location data, which means they will import with the exact position you exported them in.

For example if you import this gun stock in two separate parts;

The medium stone grey will import relative to the position it is in blender, which is right next to the dark stone grey.

You are given the option to import the mesh with location data;

Just hit Yes when prompted.

2 Likes

Honnestly thank you so much. I have been able to make so many things now that the meshes arn’t half invisible. I am not great with blender but it looks 10x better than making it in studio so THANKS!

I’ve just done a complete overhaul and rewrite of this thread from scratch.

Let me know if I missed any details or you think I should add something. It should be a lot more descriptive now! I’d love to get this improved to its maximum potential.

3 Likes

Tbh I’m glad I found this helpful resource, I’m a scripter who’s also looking into mastering Blender modeling and texturing so I don’t need to rely on other people and builders all the time except for just sound effects.
Now I can work on my own games and projects continuosly, if I lack models I’ll just make one in Blender and use this tutorial to correctly import it to Roblox.

Could you possibly do an updated version of this covering all the topics you have, but in Blender 2020. A lot has changed, and I can’t say I’m not a little bit confused.

2 Likes

Hey, thanks for getting the units set! I’ve been struggling to keep things appropriately and proportionately scaled due to Blender and Roblox having completely different scaling. This will help me a ton when making buildings and general objects a player will interact with to help keep things decently precise.