0 votes

Hi guys --

Is there any difference in performance between generating a terrain using a heightmap image versus importing a sculpted terrain mesh into Godot? Afaik, generating a mesh in the engine will build a mesh resource anyway, ie create vertices and faces (and normals) based on the luminance value of the nearest pixel.
In 3.x it made sense because there was a plugin that had automatic LOD. But in Godot 4 which comes with a LOD system out of the box, is there any performance-related advantage of using heightmap mesh generation over importing a mesh?

Godot version 4.0 alfa
in Engine by (480 points)

1 Answer

0 votes

I'd say no, but:

  • With heightmap image you'll have a far easier time, if you want to dynamically adjust the landscape (explosion craters, simple digging, map editor). Also remember you can encode multiple things in the different color channels of your image (biomes, vegetation, or other ground/area related properties).

  • With a model you're far more flexible, most notably holes and overhangs. The latter requiring extra objects if you're using a heightmap. Encoding and querying extra properties might be more tricky, though.

Done right, both approaches should net you basically the same performance (since once in memory they'd essentially be the same with the exception of one model generated at runtime). So what to pick? I'd say that completely depends on your individual project, what's more comfortable for you to work with, etc.

by (234 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 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 webmaster@godotengine.org with your username.