Water Problem
by Ryan Brown · in Torque Game Engine · 03/10/2002 (4:51 pm) · 6 replies
Is anyone else having this problem? image
the webserver is having problems at this time, so i'll try to describe it in case it's still messed up.
Basically, what is happening, is that the water gets very "blocky" when it runs into land, unless you are somewhat close to it.
This image kinda shows what it looks like(this one isnt on my webserver! so it should work)
Like I said, when you're right on top of the water, there's no problem -- but if you're looking across a body of water, it's very evident.
Now, I have no clue what's causing this -- for all I know I could get a bunch of responses saying "your computer sucks". But it looks to me like the engine renders the water in squares, and is deciding not to render some of them(but then again I've made the decision to learn 3d stuff about yesterday -- so I know approximately nothing :P)
Hope someone has a solution/suggestion.
Thank,
Ryan Brown
the webserver is having problems at this time, so i'll try to describe it in case it's still messed up.
Basically, what is happening, is that the water gets very "blocky" when it runs into land, unless you are somewhat close to it.
This image kinda shows what it looks like(this one isnt on my webserver! so it should work)
Like I said, when you're right on top of the water, there's no problem -- but if you're looking across a body of water, it's very evident.
Now, I have no clue what's causing this -- for all I know I could get a bunch of responses saying "your computer sucks". But it looks to me like the engine renders the water in squares, and is deciding not to render some of them(but then again I've made the decision to learn 3d stuff about yesterday -- so I know approximately nothing :P)
Hope someone has a solution/suggestion.
Thank,
Ryan Brown
#2
Does anyone know of a way to make the water edges stay smooth at distance even with a 16 bit z buffer?
03/10/2002 (7:08 pm)
Could be a z-buffer issue. Try running in 32 bit and see if that fixes the problem.Does anyone know of a way to make the water edges stay smooth at distance even with a 16 bit z buffer?
#3
I mean, it's not like it's affecting how I learn... the engine works great -- but it bugs me :-P
Thank for the tip, John.
Ryan
03/10/2002 (7:21 pm)
Alright, if i switch to 32bit OpenGL, the edges are smooth... that's good. :) Just cause I like to be difficult, and have all my options working -- any 16-bit fixes would be appreciated. :)I mean, it's not like it's affecting how I learn... the engine works great -- but it bugs me :-P
Thank for the tip, John.
Ryan
#4
When you're running in 16 bit mode, the z-buffer is also 16 bits.. this gives only 65536 values for Z-depths
On top of this, z-buffer values are (generally) non-linear, so you have better z-buffer resolution for polygons closer to the viewpoint...
So when the small depth buffer compounds with the non-linear z-buffer, you end up getting weird effects at a distance.. where a polygon and one behind it have the same Z value so they get drawn incorrectly...
When you switch to 32 bit color depth you use a 32 bit Z-buffer which has about 4 billion discrete values.. so z-fighting is much less likely
Learn to love your z-buffer:
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html
-noh
03/10/2002 (9:05 pm)
best I can tell... that's 'Z-fighting'When you're running in 16 bit mode, the z-buffer is also 16 bits.. this gives only 65536 values for Z-depths
On top of this, z-buffer values are (generally) non-linear, so you have better z-buffer resolution for polygons closer to the viewpoint...
So when the small depth buffer compounds with the non-linear z-buffer, you end up getting weird effects at a distance.. where a polygon and one behind it have the same Z value so they get drawn incorrectly...
When you switch to 32 bit color depth you use a 32 bit Z-buffer which has about 4 billion discrete values.. so z-fighting is much less likely
Learn to love your z-buffer:
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html
-noh
#5
Nice to hear it's not normal :p
03/10/2002 (10:49 pm)
I had the same problem with Anarchy Online. Yes, I am using 16-bits and have a junky video card. So I'm assuming that changing to 32 as one of the posters did will fix it.Nice to hear it's not normal :p
#6
03/10/2002 (11:37 pm)
That problem only happens in 16bit mode, and it seems to only occur at lower resolutions for me as well (1024x768 and up seem to have no issues). I have removed those lower resolutions from my game altogether already since there are nothing but problems for me at those levels.
Torque Owner Kevin Ostrowski