I’ve made a terrain in the latest version of udk with the following settings:
Section size: 255x255
Sections per size: 2x2 sections
Number of components: 16x16
Overall resolution: 8161x8161
Total Components: 256
I would want to get the heightmap or all of the vertices of the terrain and I can’t find the way. I’ve searched the web and apparently there was a format before called .raw. Now it’s PNG and all it gives you is very innacurate data. With the above listed settings I would get a map that is 20000 by 20000 units in 8k squared picture and with a height by 20000 that has to be converted into the color for the heightmap, which can only be from 0 to 256. And, actually, for the positive side it only gets from 127-255. So there are only 128 values to represent 20000 units. Very innacurate.
The only solution I’ve come up with is this: have a object in the sky that moves on the X, Z axis, fires a ray on the ground, and sees the Y of that point. For every movement on the X,Z axis by 20cm, it would print out the Y for that bit. Maybe into a file.
Image to kind of get the idea: http://prnt.sc/eogzlu
This is really messy though and I’m wondering if there are any kind of methods that I can call on the terrain to get this stuff. I think that if I would be able to get the vertices of the terrain, than maybe I would be able to make up the squares and kind of process it afterwards similar to before: fire rays from above on the ground and see where it hits.
Just to get the idea why I need this: I am implementing my own server and I have to move the champion wherever he wants. Therefore, I have to aknowledge that he might be moving on a hill so I have to make sure he doesn’t speed up like crazy and the rule of Pythagoras’ theorem is taken into consideration.
Any input would be greatly appreciated !