Superliminal

Superliminal

Somnasculpt Workshop
The Somnasculpt Workshop lets you build puzzles, levels, and import 3d models that you can load into the game and play around with.
convex mesh vs mesh selection
I am wondering effect this has on the object.
< >
Showing 1-2 of 2 comments
Nandu666 4 11 Apr @ 10:40am 
I have an object that is long and curved. would convex just mean like a ball?
Last edited by Nandu666; 11 Apr @ 10:53am
Furdabip 4 11 Apr @ 11:43am 
The Convex Mesh will create the hitbox of the object using the outside edges it can find for each object in the scene. This is fast but will result in holes being "filled in" so the player can't go through them or grab objects through them despite there being no faces blocking them (as with door or window objects). The Mesh will try to create the hitbox based on all the faces in the scene and is slow, but will generally work to not fill in those holes. Convex is okay for most models that are just a shape where the hitbox doesn't matter, with no holes or curves in them. The regular Mesh can sometimes make objects take forever to load or have an insane amount of triangles, lagging the player.

The best practice for objects you want the player to walk/grab through is to manipulate the Convex algorithm so your object loads fast and has the hitbox you want. You can do this by separating out your model into object chunks that would be okay to be "square" or not have edges that cover more than 90 degrees on the outside and nothing on the inside. For the example of a door, instead of the entire door, wall and frame being a single object in the scene (as if you made a cube and just punched a hole in it), make the door top be its own object, then the left side its own, then the right side (and bottom if it's there). This will make the hitbox for the door be 3 separate cube hitboxes instead of the single one that would end up filling in the hole that you want the player to pass through. The downside of this is that lighting will be applied to each of those objects individually in the level editor, so it might look "bad" in certain sections of the level. I see this as an acceptable tradeoff to having the object load faster and be more "stable" as the mesh will be square and less likely to have funky object physics.
< >
Showing 1-2 of 2 comments
Per page: 1530 50