Archived

This topic is now archived and is closed to further replies.

UponTheEnd

Can you look at and tell me whats wrong..plz.

Recommended Posts

Here is a project i am working on, it should run..i hope it does atleast. i just want you to look at the problem with the sky box when you travel away from it, and tell me what is wrong if you know because i am stomped.. there arent any optimizations yet but it shouold run fine.. thanks alot heres the link: http://www.geocities.com/cscoding/Project.zip another thing to add is the heightmap i am using came from the project Omonious. just to give credit

Share this post


Link to post
Share on other sites
Could it be anything else?
i have thought of that i made the far clipping plane huge like 55,000 and the farest i can see in the level on the program is 12600..

could it be anything else you guys could think of?

Share this post


Link to post
Share on other sites
I don''t think floating point variables can go that high :-P
i have two suggestions.. one is to scale everything down.. floating point numbers can handle an amazing amount of precision...

the second suggestion would be to draw the skybox so that it doesn''t move at all and is always in the same position relative to the player... in this case you would do it without the depth buffer (or clear it) so that everything is drawn over it no matter what.. no translation for the skybox.. and you can make it like 1x1x1 size.. you will also be able to travel forever without running into the skybox..

Share this post


Link to post
Share on other sites
Thanks alot for the replys.

the last reply gave 2 sugestions, the first one was a good idea but i checked on the internet for floating point numbers, and it can go much higher than 55,000.

on the second suggestion, it is a good idea,

just make the sky box relative to the player, i got a question about that though, wouldnt if i ran to the far side of the map, the sky box would travel with me and it would take over the terrain?

thanks alot

Share this post


Link to post
Share on other sites
Oh they can? hmm.. nm then.. hehe..

The idea is to disable the depth buffer or clear it after you draw the skybox (i believe both should work). With a clear depth buffer, anything drawn afterwards should draw over the skybox because the depth information from the skybox is not present (unless i misunderstand the workings of the depth buffer, i have yet to put it into practice). So the skybox should never be able to overlap the terrain

Share this post


Link to post
Share on other sites
A floating point number is just an ordinary number, but it has the capability of setting the point whereever it wants, so it loses precision if it''s bigger... think of it as decimal numbers, i can make a number of 5 decimals and set the point somewhere. it goes from 99999. to 0.0001 and everything in between, but all values above 9 only have 3 numbers after the point so are less accurate, above 99 only 2 numbers are left, etc. Same principle, but then in binary numbers.

Marty

Share this post


Link to post
Share on other sites