- Home /
Terrain and heights arrays
Hi,
i happen to have a map with real heights and i did a very easy script to modify my terrain based on it. The map i have its composed by sample points 357x233 with a horizontal resolution of 100 meters.
The problem is using TerrainData.GetHeights i dont find a way to get exactly 357x233 but always a square...and the size depend on the height resolution.
Is there a way to do this right?
im using c#
Thanks
Just pad out your data. The heightmap is stored as an image, and usually those need to be powers of two, as well.
Answer by DaveA · Mar 20, 2012 at 07:03 PM
You can pad the data, or 'scale' it (interpolate it) out to a power-of-two-plus-one-sized square.
Your answer
![](https://koobas.hobune.stream/wayback/20220613065332im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Yet Another Terrain Seams Question 2 Answers
Spherical Terrain or screenshot to texture 0 Answers
Generated Terrain not colliding! HALP. 0 Answers
How To creat Sky effect in Scene? 1 Answer