godot_heightmap_plugin icon indicating copy to clipboard operation
godot_heightmap_plugin copied to clipboard

Performance Improvement?

Open DriftWare07 opened this issue 3 years ago • 11 comments

As is, the actual terrain in the editor makes it very laggy. Are there any performance tips to help reduce this?

DriftWare07 avatar Oct 09 '22 21:10 DriftWare07

We need more information:

  • How large is your terrain?
  • Which hardware do you have (CPU/GPU)?
  • Which Godot version are you using?
  • If using a self-compiled Godot editor build, did you build it with the production=yes SCons option?

Calinou avatar Oct 09 '22 21:10 Calinou

I'm using standard Godot 3.5. as for gpu, I'm using an rx 50. Sorry about the late reply.

On Sunday, October 9, 2022, Hugo Locurcio @.***> wrote:

Which hardware do you have (CPU/GPU)? Which Godot version are you using? If using a self-compiled build, did you build it with the production=yes SCons option?

— Reply to this email directly, view it on GitHub https://github.com/Zylann/godot_heightmap_plugin/issues/344#issuecomment-1272628889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXYSTWQTR5MABIDPN2VIBRLWCMYG7ANCNFSM6AAAAAARA274QI . You are receiving this because you authored the thread.Message ID: @.***>

DriftWare07 avatar Oct 14 '22 20:10 DriftWare07

as for gpu, I'm using an rx 50.

What's an RX 50? I've never heard of this GPU model.

Calinou avatar Oct 14 '22 21:10 Calinou

Sorry, rx 570.

DriftWare07 avatar Oct 14 '22 23:10 DriftWare07

An RX 570: https://www.amd.com/en/products/graphics/radeon-rx-570 Compared with an nVidia 1060: https://www.nvidia.com/en-gb/geforce/graphics-cards/geforce-gtx-1060/specifications/ Based on clock speeds, RX 570 is about 20% slower than a 1060.

As for lag, I have a 1060, and dont have lag at all. Can you provide a test project, tell us how you are measuring performance in it, and how much you get?

Things that can lower performance are having a lot of detail layer nodes at high distance, or have low chunk size with high LOD distance.

Zylann avatar Oct 15 '22 13:10 Zylann

I'm out of town as of now, but I can get back to you asap.

DriftWare07 avatar Oct 15 '22 15:10 DriftWare07

I am going to watch this also because I suddenly started having issues when loading the "map" during runtime whereas it takes about 20-21 seconds to load where before it was within seconds. I testing taking everything in/out of the scene and narrowed it down to this plugin. Just chiming in to give insight on performance issues as well and hopefully help with conclusions.

NOTE: It runs solid once the map loads (i.e. in gameplay). It is only the preloading/loading the map that freezes the "game" at the moment. I haven't changed anything but textures recently and I am only using 512 textures. Same Hterrain map/textures (not of that changed from when it was loading ok, to lagging/freezing for 20 sec). Hope that helps!

mojoyup avatar Jan 06 '23 22:01 mojoyup

I am going to watch this also because I suddenly started having issues when loading the "map" during runtime whereas it takes about 20-21 seconds to load where before it was within seconds. I testing taking everything in/out of the scene and narrowed it down to this plugin. Just chiming in to give insight on performance issues as well and hopefully help with conclusions.

Did you save binary data into text-based scene/resource files, causing them to contain Base64 serialized data (which is slow to read/write)? You need to save it to external binary .res files.

Calinou avatar Jan 06 '23 23:01 Calinou

I am going to watch this also because I suddenly started having issues when loading the "map" during runtime whereas it takes about 20-21 seconds to load where before it was within seconds. I testing taking everything in/out of the scene and narrowed it down to this plugin. Just chiming in to give insight on performance issues as well and hopefully help with conclusions.

Did you save binary data into text-based scene/resource files, causing them to contain Base64 serialized data (which is slow to read/write)? You need to save it to external binary .res files.

It is automatic, so it may be likely that the data (within the referenced folder of choice) is not a .res. I can check into that. And external as in via save/load from user rather than root right?

mojoyup avatar Jan 06 '23 23:01 mojoyup

And external as in via save/load from user rather than root right?

No, I mean saving resources such as Mesh to files that are not built into the .tscn file.

Calinou avatar Jan 06 '23 23:01 Calinou

And external as in via save/load from user rather than root right?

No, I mean saving resources such as Mesh to files that are not built into the .tscn file.

Oh ok, no that has not been done. All of the data is strictly from the default saving/loading of the plugin still.

So, the only thing Ive done with the terrain is create the data directory, and then everything should be in there untouched, only edited through the plugin itself, if that helps :)

NOTE: The mesh IS imported from heightmap, and not generated as well. I think thats important for me to note :)

ADDITIONAL: I did test with the pro filer, and I see the bump when it freezes and it is under physics time the most for frame time. As far as script functions, there are 2 that are called "_get_chunk_at" and "get_grid_or_default" that seem to cause the hang up also. Capture

mojoyup avatar Jan 06 '23 23:01 mojoyup