Understanding ScaleY and Importing Raw Heightmaps

Falagard

23-03-2006 20:16:47

Quick question:

I'm looking at Lucky Luciano's old libnoise generation code and it appears that it generates heightmap data with values between 0.0 and 1.0.

Are all 16 bit raw heightmaps used by the PLM2 also in that range? If I get a heightmap from say... Terragen, will it be in that range of 0 to 1 for each pixel, or does it go between 0 and ... whatever the highest values of 16 bits is? :-)

If I have a ScaleY value in the config file for terrain set to say 1000, is that the same as saying the maximum height is going to be 1000, or does it take whatever the height value is and multiply it times 1000?

Know what I mean? :-)

Clay

tuan kuranes

23-03-2006 20:42:23

all heights are normalised between 0 and 1, using input format range as divider.

16bits heightmap: 0.0f <= value / 65535 < 1.0f
8bits heightmap : 0.0f <= value / 256 < 1.0f

Afterwards it's scaled by ScaleY, so yes maximum value is ScaleY.

Falagard

23-03-2006 20:52:21

Awesome, okay that's what I thought, thanks :-)