Saving the height map from a sculpted region #635
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You didn't normalize; you clamped. Two completely different operations. As the docs say, the data are real heights. How does one convert values between say -500 and 500 to 0-1? If you explore the documentation and API more, you'll find we have an exporter tool written in gdscript that uses data.export_image so you don't need to do per region. However, as the import docs say, Godot doesn't support higher than 8-bit PNGs, so export with EXR or you'll destroy your data. Also, I recommend always static typing your code, even for demos. You'll waste countless hours troubleshooting bugs introduced by sloppy coding that could have been identified by the linter. |
Beta Was this translation helpful? Give feedback.
You didn't normalize; you clamped. Two completely different operations. As the docs say, the data are real heights. How does one convert values between say -500 and 500 to 0-1?
clamp(x, 0, 1)
is the wrong answer.If you explore the documentation and API more, you'll find we have an exporter tool written in gdscript that uses data.export_image so you don't need to do per region. However, as the import docs say, Godot doesn't support higher than 8-bit PNGs, so export w…