Polygons per mesh

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lone Dragon


I’m diving into the 3D world of Godot and have a couple doubts regarding performance issues.

  1. How does Godot deal with meshes? Does it convert quads to tris by default? Should I convert the quads from Blender meshes to tries before importing into Godot to gain some performance?

  2. What is the average advisable mesh faces count for, let’s say, a main character for Godot to perform 60 FPS in a low end computer? I know there are many other aspects to consider, but just to have a broad idea for a game like Legacy of Kain - Soul Reaver or the original Tomb Raider series. Is 10.000 faces an acceptable number?

  3. Is that possible that Andrea Catania’s nVidia Flex implementation (impressive work, by the way) to be incorporated in later official Godot releases? Would that work in non nVidia graphics cards?

Thanks in advance

At some point it would have to. But personally, I recommend doing this on the Export side to avoid unwanted results.
There’s a “Better Collada Exporter” for Blender (by Godot). In that, there’s an option to triangulate your Blender models on Export. Also, there’s an option to auto-apply Modifiers (if you i.e. use triangulation or other modifiers (like Mirror/Array) on your Blender models.
GitHub - godotengine/collada-exporter: "Better" Collada exporter for Blender, orignally developed by the Godot Engine community

There’s also a newer godot export filter currently in development. But I didn’t try that out yet.

#2 10k faces for the main character may well be possible. The number of faces is only one of many variables which could pull down the frame rate.

  • IMHO, GLES2 will be the choice for low end hardware. (Many low end cards support GLES3 but are very slow at it.)
  • Fragment shaders, especially at higher display resolutions may have impact on the game. (Low end hardware has a very limited amount of shaders.)
  • Lighting and shadows can have a big impact on performance.
  • LOD: At the moment there’s no LOD support in the 3.x Godot main branch. This is (hopefully) to be expected in 3.2. So you either implement it yourself or you have to wait for it.

#3 I am absolutely unsure. But it is possible that it appears one time together with Bullet as a selectable physics engine. Anyway as shown by Andrea it is always possible to do your own build. But I know only very little about this topic. You could propose it as a feature on godotengine github.

(Here’s one of Andreas videos about nvidia flex in Godot:)

wombatstampede | 2019-03-27 07:40

I’ll take a look at “Better Collada Exporter”. I tried to make that work on Blender 2.8 without success, so, I think I’ll stick with Blender 2.79 for a while due to better add-on support.

Thank you very much! That was very helpful.

Lone Dragon | 2019-03-27 08:53

I also still use Blender 2.79 at the moment.
Godot also allows to assign import scripts in the dae importer. That allows to automatically edit 3D scenes after import with GDScript. (I.e. re-assign materials, add collision shapes based on material names, recalc meshes or UVs or similar.) The script basically gets passed the imported screen and it can then edit it using normal scripting. (MeshDataTool, SurfaceTool etc.)

About #3:
On a second view I’m quite sure that Godot will not deliver a ready standard build including NVIDIA Flex. That is because Flex is closed source software. So (compared to Bullet) it can’t be included with Godots sources. But maybe they can offer easier ways to access/include Flex as a module.

wombatstampede | 2019-03-27 09:07

I’m asking about Flex because I’m trying to make a cloak to one character, following Andrea’s tutorial here Soft Body in Godot 3.1

Problem is, when the cloak bends towards the character, even though it does not touch him, it fades to invisibility… lol

At first I thought that was just passing through the character, but after setting cloak’s offset I can see the bended part of the cloak, that goes towards the character, just vanishes as it is being sucked through a dimensional portal which does not happen in Andrea’s video: https://www.youtube.com/watch?v=-slbuCjzPA0

Maybe he is using Flex… I’m not sure. Do you know efficient tutorials for cloth in Godot?

Thanks once again

Lone Dragon | 2019-03-27 12:20

I didn’t try this out so far so I can just guess.
Did you try to experiment with the materials settings?
→ Cull Mode “Disabled”
Maybe: Depth Draw Mode: “Opaque Pre-Pass” or even just for testing “Always”

wombatstampede | 2019-03-28 11:24