The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I am trying to create custom 3d tilemap made by multimesh instances. Built-in gridmap is just bad, it doesn't allow any individual shader / light action.
Scene strucure :

Spatial ( "hexmap" )
     Spatial ( "tileset")
             >MultimeshInstance * 10 ("grass","sand","mountain","road",so on
             >VisibilityNotifier

Rendering 100 tiles was good. Rendering 1000 was also OK. Rendering 10000 started to visually drop framerate.
So I made hexmap to create new "tileset" scenes once per 30 x 30 square, so visibility notifier would allow only the chunk of tiles on the camera to be visible at once. And this is where outcome was unexpected for me :
single visible chunk of 30*30 tiles of one active "tileset" caused similar frame drop as 10k tiles rendered at once !
So my question is : is multimesh rendered behind the scenes even when visibility is set to false ?? If it is so, how can I optimize it ?

Note : I did ensure that other chunks have visibility set to false at runtime.

Other strange thing I realized : frame seemed to drop more the further Camera was from the viewport origin on x axis.

Finally : when I choose to render 10k of tiles of the same type I notice, that tile "ocean" drops frame much more compared to tile "grass". But grass tile has 3 times more faces than ocean tile ! they have the same material and light settings. How can this be ??

Godot version 3.4
in Engine by (8,188 points)
edited by

1 Answer

0 votes

Ok, I realized that visible instances were still rendering tiles, that were also behind vision, and when all instances were visible, tiles were rendered multiple times. That was of course because I didn't set multimesh property as resource localtoscene :)

by (8,188 points)
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.