pegasusearl If you have done Godot 3D game on android, I would be interested in hearing some tips and tricks.
I haven't but I have done a lot of 3D, performance optimizations are not limited to a platform.
pegasusearl Gridmap to draw the terrain, such as road, river, sidewalk, and those green area.
Gridmap is not a voxel, it just draws the meshes on the screen, this means each mesh has its own transform, it just makes it easier for the artist to make the level.
pegasusearl Separate Gridmap to draw the static obstacles, such as trees, rock, cone, etc.
and you are using 2 of them.
pegasusearl Moving meshes such as: vehicles and logs on the river.
I suppose you are using area3D with meshInstances? and not rigidbodies, or, worse, moving static bodies?
for something this simple you don't need collisions.
pegasusearl This to me is weird because terrain has the least amount of vertices, and there is not that many exist at one time.
no no no. the polycount is irrelevant. the things you have to look for are:
polygons (triangles) must NEVER be smaller than 1 pixel. this is why your meshes should be optimized and why we have LOD.
it doesn't matter how many polygons a mesh has, but how many times the CPU has to communicate with the GPU. so if you have 50 cubes, they are going to be more expensive than a single high poly mesh.
and because your nodes are being destroyed, that means additional overhead.
textures should never be bigger than 4k, and using too many is also a bad idea.
xyz it's Godot 3
godot 3 is famous for being bad at 3D. there are many optimizations that were made in godot 4.
pegasusearl Many of these are just built-in Godot function that returns value but never used. I already make sure for every time I convert float to int it won't cause game logic problem.
I don't know what I'm supposed to do with these. What would be the drawbacks for ignoring them?
render_target_set_sharpen_intensity not supported in GLES2
are you using GLES2?
looking at the docs, I found this:
https://docs.godotengine.org/en/3.6/tutorials/rendering/gles2_gles3_differences.html
so:
1 - make sure the triangles are not smaller than 1 pixel on screen.
2 - try to pack all your textures into a single 1k megatexture, then repeat. don't leave individual small textures. packing everything into 3 or 4 materials should reduce overhead.
3 - create bigger meshes for the terrain and create a script to handle them. and when it goes out of the screen, don't remove it, instead, transport it back to the start to be reused. you can keep these meshes in memory, it will be cheaper than creating them again.
for example, those roads could be a single mesh.
4 - also make sure the pixels are roughly bigger than one pixel on screen and are not stretched unevenly. using a 256x256 texture on a face that will occupy 16x16 pixels is a bad idea.
calculate the screen size and the size of objects and give them a proper texel size.
5 - it would also be a good idea to use gles3. gles2 is very old.
6 - make sure textures are set to VRAM compressed and I think you have to use ETC compression (read the docs). don't use the textures in lossless mode for 3D.