Game Development Community

CustomMaterial + Waterblock = flickering

by Lee Latham · in Torque Game Engine Advanced · 10/09/2007 (1:24 pm) · 5 replies

I wonder if there's a workaround for this issue. I've got a CustomMaterial on the wall (DTS) and a waterblock down below it. When the waterblock is there, the wall flickers quite a lot. Strangely, this happens most when you do NOT have the waterblock in view. If you back up to where I am in the screenshot, it's okay. Move close and it flickers. Remove the waterblock, and no flicker at all.

www.singularityfps.com/images/shaderflicker.jpg
Any ideas?

#1
10/09/2007 (11:49 pm)
Did you try to not use the waterblock but an object that uses the "indoor water" material? (in the data/water folder is a material.cs which includes the data for the indoor water)

regular water blocks + in dif usage don't like each other very much.
#2
10/10/2007 (12:48 am)
Marc, that's a really cool idea. I didn't know that, I will definitely check it out right now (and post how it goes)

BTW, everything you see there is DTS. I'm using polysoup collision and loving it. Seems to work fine over netplay and everything...so far :-) The little objects in the blue part of the floor are fungus's twice as tall as a man.

Man, your like my gaurdian (or torquian?) angel recently. I'll definitely buy you a beer next time I'm in your country!
#3
10/10/2007 (1:07 am)
Hmm, strangely, I got the flckering same as before on the CustomMaterial (Water) which I lifted from the materials.cs as you suggested. Doesn't look like water either, it's got like a bunch of refracted images in it. Oh hell I'll show ya:

Hmmm this is getting interesting. The flickering is happening, and you can't see that; but at different points in the flicker running down the image I get different screenshots:
www.singularityfps.com/images/wow1.jpg
and then

www.singularityfps.com/images/wow2.jpg
It's iterating through the refractions...from I don't know what...showing the edge of the spa, and sometimes showing a view straigt up (I can assure you) showing the window in the bathroom (still without details).

Now is that interesting or what? I'm thinking a driver issue. I'm running an Nvidia GTX 8800, I believe, and I know the driver version is 6.14.11.5822, dated April 07. Hmmm I'll go upgrade that once I'm done jamming on the songs I'm listening to at the moment.

edit: actually, I don't know WHAT that view is of. I don't know what that round thing could be. Freaking weird man, I have a poltergeist in my video driver.
#4
10/10/2007 (11:07 am)
Or the shader in getting its reflection because what you see there is the bath room from above and that "rings" are the basin when viewed from straight above I would say.

the only case I had so far was when I had waterblocks that were large then you get massive flickering far away ... but not when it was near me.

Perhaps your world is tiny, this would lead to similar floating point accuracy problems as edges far away
#5
10/10/2007 (3:14 pm)
Doh! I'd forgotten about another waterblock I had in the level, moved out of sight. Deleted that and the flickering went away. Now I just get the smooth reflection. Still don't know where it's getting that. I'll just keep jacking with it.

So I guess to adjust the water effects, like waves, you have to edit the shader itself with this method? That is one nice thing about the waterblocks, the ability to manipulate them in the editor.