Advertisement

Questions about 3D and showing text

Started by August 31, 2020 01:00 PM
3 comments, last by sealiteral 4 years, 3 months ago

First, since this is my first post here, I'll say what I'm trying to make: I've made some 2D games for fun, and figured I'd try and make a 3D game. And maybe a third-person platformer isn't the best choice for a first 3D game (I haven't even finished figuring out how the camera should move around), but that's what I decided to make. And since I'm on Linux (and guessing the Unreal engine would take at least several hours to compile), I decided to use the Godot engine. (For the UI question, it might be relevant that the engine can change text automatically but that doesn't seem to have side effects like adding scrollbars.)

First question: 3D meshes can be made of triangles. But in Bender, it seems I can also use quads, which I'm doing quite a lot. And then I suddenly realised, when I move points around, I'm not sure what really happens to the quads. They still show in Blender as quads, but if you draw square on a piece of paper and then pull one of the angles out of the paper, you're bending the paper and now you have a “quad” that's actually two triangles, but you could take any three vertices of the quad and call it a triangle, so it's a quad that it's not clear, which triangles it's made of. I've never heard others say it's a problem, so is it something I need to worry about?

And the other question: I speak three languages, that I'd like the game to be able to show its story, menus and other text in. Should I constrain myself like a comic book translator that fits the translation inside the original speech bubbles, or should I make the UI check how much space the text is taking up, resizing elements and adding scrollbars when necessary?

None

First question: 3D meshes can be made of triangles. But in Bender, it seems I can also use quads, which I'm doing quite a lot. And then I suddenly realised, when I move points around, I'm not sure what really happens to the quads. They still show in Blender as quads, but if you draw square on a piece of paper and then pull one of the angles out of the paper, you're bending the paper and now you have a “quad” that's actually two triangles, but you could take any three vertices of the quad and call it a triangle, so it's a quad that it's not clear, which triangles it's made of. I've never heard others say it's a problem, so is it something I need to worry about?

Quads always become two triangles so we can render them (quads are not necessarily planar, but a triangle always is). It's usually no problem, the question only is which of the two options we pick to add the edge.
Probably Blender does this for you on export, but i see those options:

1. Simply use the shorter edge.

2. Pick edge where the resulting 2 triangle normals are closer to the original quad normal.

3. Calculate primary direction of curvature and align the new edge to that.

4. Choose shorter edge but do Delauney edge flips on the resulting triangle mesh until we have a Delauney triangulation. (This can even flip original quad edges, so probably not what you want)

I don't know what's the norm here, but i often notice modeling applications often make bad choices.
However, the usual reason to model quads is to use Catmull Clark subdivision. That's a special case because for subdivision we can use this pattern:

Where our new edges (green) always go from quad center to vertex.

Advertisement

From my experience with blender quads are also easier to deal with for things like loop-cuts and various other tools.

Often if do end up with a face that is not a quad (not so commonly triangle, but say the cylinder ends) it ends up being a pain.

It does actually convert to triangles though for rendering, you can see this if did move the vertices to be not planar at all. Not sure how it picks which way to do so however, presumably for the purpose of exporting you would want to use the same method so you get the same result as the blender viewports.

Thanks! It's nice to know I won't suddenly find that a mesh can't export simply because it has weird-shaped quads in it. As for Blender converting it to triangles, I think it does or doesn't do that depending on which format I'm exporting to (some formats support quads, and then it would have to be the game engine that does the splitting. But I'm guessing when I use glTf it's Blender that does the conversion.

And thanks for pointing out I need to avoid polygons (even flat ones) with five or more sides too.

None

This topic is closed to new replies.

Advertisement