How is the max height calculated when using a heightmap? #169
-
So my example heightmap and terrain generated shown below. Black RGB (0,0,0) becomes a height of 0. Why is the maximum height 272? Is alpha involved? Should we introduce a scaling option (min/max) values? |
Beta Was this translation helpful? Give feedback.
Answered by
JamesTKhan
May 10, 2023
Replies: 1 comment
-
With heightmaps it looks like the max height is calculated using an arbitrary value, terrainWidth * 0.17f It should be possible to plug in different values to replace the hard coded 0.17f, the UI fields just have to be added in. Adding in fields to change the value makes sense to me. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
antzGames
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With heightmaps it looks like the max height is calculated using an arbitrary value, terrainWidth * 0.17f
It should be possible to plug in different values to replace the hard coded 0.17f, the UI fields just have to be added in.
Adding in fields to change the value makes sense to me.
https://github.com/JamesTKhan/Mundus/blob/master/editor/src/main/com/mbrlabs/mundus/editor/ui/modules/inspector/components/terrain/generation/HeightmapTab.kt#L75