Can't find the water chip...
by Jeff Loveless · in Torque Game Engine Advanced · 08/27/2006 (9:18 am) · 12 replies
I'm hoping that maybe I just downloaded the wrong release, or messed up (somehow?) compiling.
When running the demo of TSE after compiling, when i look at the shore, where the water and terrain meet, and look up and down, I get a really strange tearing effect like the water and terrain seperate and you can see a white space in between them, Is this a known bug, or a common problem, or the wrong build?
When running the demo of TSE after compiling, when i look at the shore, where the water and terrain meet, and look up and down, I get a really strange tearing effect like the water and terrain seperate and you can see a white space in between them, Is this a known bug, or a common problem, or the wrong build?
#2

hope that works... I outlined the area of the water that i'm talking about, it doesnt show when look at that area head on. but only when you look up and down...
09/09/2006 (11:08 am)
hope that works... I outlined the area of the water that i'm talking about, it doesnt show when look at that area head on. but only when you look up and down...
#3
09/09/2006 (11:08 am)
Thats the latest build BTW
#4
09/09/2006 (11:10 am)
Well, there's no smoothing for water edges at the moment.
#5
I havent taken a look myself, but I think this is linked with the water and how the buffer is updated. If you violently rotate the camera vertically, the water will jitter and you can see trough it briefly. It's ugly, but nothing show stopping.
09/09/2006 (1:58 pm)
Matt, you misunderstood. Smoothing of edges has nothing to do with it.I havent taken a look myself, but I think this is linked with the water and how the buffer is updated. If you violently rotate the camera vertically, the water will jitter and you can see trough it briefly. It's ugly, but nothing show stopping.
#6
There really isn't a strong, easy solution other than tweaking your vis distance for your mission, and/or masking the issue with a shoreline effect of some sort.
Please note that I could be wrong! It just appears to be a similar artifact to what we've seen in the past.
09/09/2006 (11:23 pm)
From word around the office, this is related to z-buffer precision issues having to do with having very large vis distances. Basically, the longer the vis distance you have, the less precision you get in the z-buffer, making sorting a bit difficult at best.There really isn't a strong, easy solution other than tweaking your vis distance for your mission, and/or masking the issue with a shoreline effect of some sort.
Please note that I could be wrong! It just appears to be a similar artifact to what we've seen in the past.
#7
09/10/2006 (8:04 am)
Right on, thanks for looking into it everyone, I was curious because when i noticed this I went back to our build of TGE we added CG shaders on the water, and it doesnt suffer this same affliction, maybe a look back at how tge handled the z-buffer, or take a look at the shader we were using here http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10830
#8
09/10/2006 (10:26 am)
Totally different code. If you want to compare TSE water to TGE you might as well do a complete rewrite.
#9
09/11/2006 (2:18 pm)
This issue actually has to do with how often the reflection of the water is updated. TSE won't update it every frame because it's expensive. If you want to though, and want to totally fix this problem, look at the top of WaterBlock::updateReflection() and comment out the update restrictions.
#10
This way you would get inaccurate reflections between updates but the white jitter would disappear.
Edit: Or perhaps increase the tickrate of the reflection based on camera movement?
09/11/2006 (2:24 pm)
Brian, couldnt you just cache the old texture and keep it until a new update is rendered?This way you would get inaccurate reflections between updates but the white jitter would disappear.
Edit: Or perhaps increase the tickrate of the reflection based on camera movement?
#11
Thanks Brian.
09/12/2006 (11:27 am)
I apologize for leading folks in the wrong direction on this--should have looked much closer at the pic!Thanks Brian.
#12
Regenerating the texture if they move their view angle up and down would probably fix it but at a pretty high cost! You can always make the texture regen every frame if desired - it's a pretty easy change (check updateReflections on the water).
09/14/2006 (11:43 am)
Stefan - we do cache. There's just no data there due to how the math works.Regenerating the texture if they move their view angle up and down would probably fix it but at a pretty high cost! You can always make the texture regen every frame if desired - it's a pretty easy change (check updateReflections on the water).
Torque Owner Matt Vitelli