Got distance mapping to work on top of height map movement! Whew!
After wrapping up the work to get metrics measured on a small room scale (as opposed to the whole game), I fixed up height based movement on my terrain. Essentially the inputs would be an x and z, and would search for the triangle to use. Once the triangle had been found in the specific cell, a raycast would be shot through the triangle and an intersection would be calculated at that point (from 1.0f through the triangle. The intersection would essentially be a float value that I could use to set that distance. Behold!
I assure you, it's a lot more interesting in video form.
As for distance-based normal mapping, the idea is to only set the actual normal mapping at a set depth value. The other one would be a less detailed map that would be stretched over a larger quad (say, stretched over an entire cell). That way, less detail would mean less processing power on getting the little details in. However, I'm not entirely convinced, and may need to play around with values until I get what I'm looking for:
No comments:
Post a Comment