How can i change height multiplier of the region when importing heightmap? #947
-
|
Rn i am making a procedurally generated world with this extension, I really love it and documentation helped me out a lot, however i cant seem to understand how can i scale height multiplier for individual regions when setting heigtmap to that one region? I am using FastNoiseLite to generate noise image. When i import heightmap to the whole terrain with "import_images()" its alright cuz it have a parameter for height multiplier, but when i set heightmap for individual region, i cant seem to find a function to scale the noise. Is it possible? Or should i some how modify the original heightmap? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Regions store real height. If you have a normalized heightmap, scale and offset it before you store it in the region. You don't need a function, multiply the values when setting the region data per pixel. You can also review the code for import_images.
Then you should already be pulling data from FNL per pixel to get 32-bit noise, as shown in CodeGenerated.gd. Just multiply and offset it before storing it. |
Beta Was this translation helpful? Give feedback.
I thought you were adding data to regions? That's not in this code at all.
If you're going to use import_images, then just build off of CodeGenerated.gd which I already directed you to.
You already described how to do it in your first message. But what you described, and your code are two different things. I was expecting to see in your code the creation of a Terrain3DRegion, populating it with data, and loading it into Terrain3DData.
I can't tell you what is best for your game. Your need is the best motivation to learn.
There's a ton of docum…