Sign in to follow this  
neonic

zFar clipping

Recommended Posts

Hey got a question. All of the posts that I have gotten replies to have helped me greatly. My question is: I have a terrain heightfield system. It takes in a 32x32 BMP and generates the height values via the corresponding pixels grayscale color. This was great. The first thing I did was made the 32x32 bmp. I used the base color of about 8 (r=8, g=8, b=8) and this put the pixels at 8.0f on the y-axis. I am trying to make a RTS game where the camera is above the map and pitched down about 40.0f degrees. The camera is located at (0.0f, 250.0f, 0.0f) and you can move around the x and z axes(axii?). My problem is that It looks way too zoomed in when the grayscale color is like 150 so I figured well the best way to make it look better is to "zoom" out and move the camera position up to around 300.0f. Well then when you move down, you can see the top of the terrain getting clipped by the zFar variable. It looks horrible. So I instinctively moved the zBuffer out a little. Well the problem is now that if I move it out enough to mask the clipping at a height of around 300 or a little more, then it becomes entirely too laggy. Any suggestions on what I can do?

Share this post


Link to post
Share on other sites
What is you clip range? My clip range is 30 - 1000. How many triangles are in your land? 32x32x2 should not be too laggy

Share this post


Link to post
Share on other sites
grayscale color is like 150..

Perhaps you mean the distance between the lower level and the upper level.

Please be aware that if you dont scale down these values u will have a map that is 32*32*256, so what you wanna do is scale it so you have 32*32*8 or 32*32*16

after loading the bmp scale it down... if that is what you mean

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this