• 3D
  • 3d noob question: imported glb vs mesh shapes created in Godot. Which are more efficient on memory

Hi. On 3d models. I want to optimize my resources.

  1. How much does large models that have to be scaled down affect memory?
  2. How does importing models with textures perform vs creating and texturing meshes in script?
  3. I see the term baked - are baked objects less resource using?
  4. what things should be avoided in making inefficient models?

There should be no problem with imported models. Once they are processed by the CPU and reach the GPU, they are just a list of vertices, in which case it will be exactly the same performance (assuming the same polygon mesh). Meshes do not take much memory, as they are just a list of points, and you can easily have a ton of them on a modern desktop system (in the millions of polygons). For mobile you will typically have to use lower polygon meshes, and even on desktop this makes sense if you want to supported older video cards or integrated graphics. Especially if you have animation, it can be less intensive with less polygons.

Textures are the same, they are processed by the CPU into GPU optimized formats, so it does not matter what the original file type is or how you imported it. It's all the same. In general, lower sizes for textures will be better as this is the bulk of what the memory in VRAM goes to. On a desktop you may be able to get away with 2048x2048 textures, or even 4K for the player, but you would need a decent GPU with some memory. If you want to support crappy laptops and mobile then probably 1024x1024 is a good largest size, and use less for smaller or less important objects.

I don't know about baked objects, but that is something to look into.

Baked usually refers to computing static lighting so that you can have higher quality looking lighting with high performance. I haven't touched this yet because in my game I want my lights to be able to be moved around and adjusted by the player. Baking is a good idea tho, if not a must, for more static scenes. I believe godot has some built in light baking functionality but I haven't touched it yet.

Yes, binary is going to be faster than text, as it is already processed on export into a format easier to load on the GPU. But once it is on the GPU, it should all be the same. I don't believe there would be a performance difference, but I haven't looked into exactly how Godot works in that respect so maybe there is more to it.

I see the term baked - are baked objects less resource using?

The term 'baked' can mean a variety of things, but almost always improves performance and is a necessity past a certain fidelity.

Not only does baking textures allow you to reduce material count (as multiple PBR materials can be combined), but custom normal/displacement maps can be used to simulate the look of geometry detail while keeping poly count low.

This clip should show how prevalent this is in high fidelity games: https://www.youtube.com/embed/Twrp9QyHFxQ?start=1325

A LOT of extra effort goes into making 3d games 'good looking', well beyond this, which is why it annoys me whenever people say Godot 3 can't already achieve this level of detail. It absolutely can, but very few hobbyists/indies using it have anywhere near the resources (and in my case the experience) to sculpt, texture and rebake to low poly the sheer quantity of assets required to get even rudimentary 3D scenes to look this good.

What people end up doing is using whatever unoptimised models they can find available (I'm guilty of lifting 3D scans :S) then blame the engine like it was supposed to magically do this for us.

As a shameless plug to my own videos, here's a forest scene I made in Godot last year some time:

And here's Horizon Zero Dawn:

Guess which one has ~triple the polycount of the other. And most of my background detail is an HDRI texture, while there's is actual trees.

Ultimately I think it's still important to know whatever optimisations are available, but it's a rabbithole really and one that I'd suggest really looking into when it becomes a problem. For example, if your style is Low-Poly, to begin with, you may never need to bake HQ to LQ maps.

From memory maybe 2 days, most of which spent toying around with the lighting.

TBH I need to revisit this, I've learnt a fair amount since so figure I should be able to do a better job now.

@Bimbam said: From memory maybe 2 days, most of which spent toying around with the lighting.

TBH I need to revisit this, I've learnt a fair amount since so figure I should be able to do a better job now.

Sounds wise. Especially if you enjoy it.