🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Voxels - implementing a height field

Started by
0 comments, last by GameDev.net 24 years, 7 months ago
I have been trying to delveop an algorithm that would be the basis of a voxel-type engine (a.k.a. using a height field). My current strategy is to use a base n-gon and then extend lines from the base n-gon to the heights specified in the height field map. I had hoped to simply take the normal of the base n-gon and then for each point in the n-gon use the formula P=Po + k*normal, (where k = height) to determine the far points in R3 space. My question has to do with perspective projection. Can anyone think of a way that I can projective project just the base n-gon and then be able to find the far points. What I DON'T want to do is calculate every point across the entire heighfield and then have to perspective project each point. I want to avoid the divide involved in the perspective projection.

I hope this question makes some assemblence of sense as it was more difficult to explain than I had hoped.

-PsyOps

Advertisement
How about using splines? Obviously, you'd still need to perspective project all the control points, but a x*y height field can usually be represented with greater detail by much less than x*y control points. (Depending on how much you need angular slopes).

Just a thought...

/Niels

<b>/NJ</b>

This topic is closed to new replies.

Advertisement