This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

TL;DR: How can I manually control the layering of 3d objects? Also, how demanding on performance are transparent meshes compared to higher-poly meshes?

I'm currently trying to remake a GBA game (Boktai 2) in the Godot engine. I've been generally finding success with handling many things more-or-less manually through code, and I want to do the same with the terrain visuals, especially since I'm planning to build them all by hand (i.e. no terrain will be random or automatic)

I want the game to be as toaster-friendly as possible, so I'm trying to avoid dynamic lighting and anything but the most low-poly of meshes. Since the camera view is orthographic and always at a fixed angle throughout the game, I've found that I can do a lot of illusion that cuts down on actual rendering.

For a stair block, I'm currently using an intentionally wide, transparent mesh with a jagged texture. This works pretty well overall, but when the stair block happens to be right next to another block, the meshes cut into each other and ruin the illusion.

Stair block
In-Game view
Additionally, a similar problem happens with the player sprite. I've tried a couple of workarounds with Sprite3D and even a bent plane mesh with a special UV wrapping, but the layering is always erroneous somewhere.

Is there a way to have finer control over 3d layering, similar to z-ordering in 2d worlds?

Also, I noted that The page for spatial material noted that transparent meshes are less efficient than opaque meshes - but by how much? I would assume that using a transparent mesh with 6 vertices would be much easier on performance than using an opaque mesh with 28 vertices, but since I know basically nothing about 3d rendering or even the Godot engine itself under the hood, I'm sure it would be better to ask. There are also some curved blocks later in the game, so I'll need to either make those transparent or add more vertices.

Is it better on performance to have a transparent, lower-poly mesh, or an opaque, slightly higher-poly mesh?

Thanks in advance.

in Engine by (16 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.