Control terrain elevation

Topics: User Forum
Mar 16, 2007 at 7:42 AM
Hi everybody

I saw that the function 'ConvertARGBtoFloatHeightData()' maps the colors in the heightmap to the elevations of the terrain. How can I change the maximum elevation of the terrain without changing the original heightmap ?

I can always hack the QuadTree code to change the value of the yScale variable (hardcoded to 2.5f), but may be there is a simpler way to do this.

BTW I want to thank you about this very helpful component, it saved me a lot of time. Can't wait for the next release...
Coordinator
Mar 25, 2007 at 1:10 AM
Hi saladinct,
Sorry it took so long to respond, been matering cd's for my uncle and have not check the site in a bit.

There is another version of Create that allows you to pass in the heightscale in the laterst version of the code.

Mar 26, 2007 at 5:45 AM
Oups, there is nothing under the "source code" section, where can I find the "latest version of the code" ???
Coordinator
Apr 2, 2007 at 7:49 PM
Saladinct, just add a version identical to the create that you have now, but make the last parameter a float heightScale that you can pass in.
This is what I did in the latest version of the source code. I have not uploaded version 0.4 yet. but it will be uploaded as soon as I get the grass/trees stuff working the way I want (performance is not as good as I'd like).

You will still be compatible with the newer version if you just make an overloaded Create like I stated above.

Sorry for the delay's
Clyde