Water flash....
by Thomas Shaw · in Torque Game Engine Advanced · 02/15/2007 (6:48 pm) · 13 replies
Does anyone know what causes the water to flicker/flash as the player's view changes?
Here is a video showing what I mean:
www.3drogue.com/images/movies/water_flash.mov
I have noticed that the flashes don't happen when I am in the mission editor. What is different between how the scene is rendered between the editors and just normal play?
Here is a video showing what I mean:
www.3drogue.com/images/movies/water_flash.mov
I have noticed that the flashes don't happen when I am in the mission editor. What is different between how the scene is rendered between the editors and just normal play?
#2
This is a rebuilt mission that was originally done in TGE1.5. I put in a brandnew waterblock. However, the sky and fog settings were copied over from the original mission that was built in TGE 1.5.
I'll monkey around with the fog settings and see what happens.
02/19/2007 (8:36 pm)
Hmm. I remembered seeing something about that too... couldn't re-find those posts though. This is a rebuilt mission that was originally done in TGE1.5. I put in a brandnew waterblock. However, the sky and fog settings were copied over from the original mission that was built in TGE 1.5.
I'll monkey around with the fog settings and see what happens.
#3
Love the animation / physics on the players hair by the way 8)
02/20/2007 (2:59 pm)
We have the same problem, but when you fire a projectile. ..It only seems to happen when the screen resolution is set under 1024 x 768. I don't know why, but we're running at that res. for now to get round the problem. Love the animation / physics on the players hair by the way 8)
#4
Thanks for the compliment on the "hair". Those things are a bitch. lol. I haven't yet found a reliable way to get decent physics out of them, so they are hand-animated for all the animations. I have a new version of this character that cuts them down to just one "tail" because of that. :)
02/21/2007 (9:03 am)
Interesting. I changed my fog settings to be super far away and that helped some. Now the water only flashes if I look straight down at it.Thanks for the compliment on the "hair". Those things are a bitch. lol. I haven't yet found a reliable way to get decent physics out of them, so they are hand-animated for all the animations. I have a new version of this character that cuts them down to just one "tail" because of that. :)
#5
02/22/2007 (12:33 am)
@Thomas - Do you happen to be using fxSunLight? I've found that having it in the scene will cause this issue. I suspect it's screwing up a render state that isn't getting cleared before the reflection is rendered for water. Someone got time to track down this bug?
#6
I carefully scanned my console.log and discovered something I had been overlooking:
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1
Invalid cubemap data for CustomMaterial - Water : Sky_Day_Blur02
Invalid cubemap data for CustomMaterial - Water1_1FogPass : Sky_Day_Blur02
Invalid cubemap data for CustomMaterial - WaterFallback1_1 : Sky_Day_Blur02
I browsed the water shader codes, but being "code", they didn't mean a whole lot to me; I am not very familiar with shader code, or c++...
However, using logic, I am able to deduce that, since, the water shader code is not mission specific (I haven't touched the default shaders in any way) and I don't get this mesage when loading the terrain_water_demo mission, that some script somewhere in my mission is trying to use the waterblock shader in a bad way.
Where would I look, in my mission folders, for such a script or bit of code? I have looked around but don't see much regarding the waterblock actually in my mission specific folders.
BTW: I notice that in both the terrain_water_demo and in my own mission, that at a certain depth under the water's surface, the underwater haze effect turns off. Is that a known issue?
02/23/2007 (9:32 am)
I deleted my fxsunlight out of my mission. Unfortunately, it didn't seem to have any effect.I carefully scanned my console.log and discovered something I had been overlooking:
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1
Invalid cubemap data for CustomMaterial - Water : Sky_Day_Blur02
Invalid cubemap data for CustomMaterial - Water1_1FogPass : Sky_Day_Blur02
Invalid cubemap data for CustomMaterial - WaterFallback1_1 : Sky_Day_Blur02
I browsed the water shader codes, but being "code", they didn't mean a whole lot to me; I am not very familiar with shader code, or c++...
However, using logic, I am able to deduce that, since, the water shader code is not mission specific (I haven't touched the default shaders in any way) and I don't get this mesage when loading the terrain_water_demo mission, that some script somewhere in my mission is trying to use the waterblock shader in a bad way.
Where would I look, in my mission folders, for such a script or bit of code? I have looked around but don't see much regarding the waterblock actually in my mission specific folders.
BTW: I notice that in both the terrain_water_demo and in my own mission, that at a certain depth under the water's surface, the underwater haze effect turns off. Is that a known issue?
#7
The underwater haze limit is not a bug, it just will display that within the bounding box of the water. If you want it on deeper, then scale up the water size on the z axis.
02/26/2007 (1:00 pm)
Those console warnings just mean that you don't have those cubemaps defined in your mod. Search for "CubemapData" in the terrain_water_demo and copy those definitions over.The underwater haze limit is not a bug, it just will display that within the bounding box of the water. If you want it on deeper, then scale up the water size on the z axis.
#8
That is where the cubemap is defined.
This needs to be executed *on the client*
The initClient function in client/init.cs is a good place for you to set it up.
You'll also want to copy over some art assets from the data folder.
Look at the initClient function in client/init.cs in terrain_water_demo to see how GG initializes things. Also helpful to look at the same function in the demo example to see how some of the nifty demo stuff is set up.
02/26/2007 (1:40 pm)
Take a look in example\terrain_water_demo\client\scripts\commonMaterialData.csThat is where the cubemap is defined.
This needs to be executed *on the client*
The initClient function in client/init.cs is a good place for you to set it up.
You'll also want to copy over some art assets from the data folder.
Look at the initClient function in client/init.cs in terrain_water_demo to see how GG initializes things. Also helpful to look at the same function in the demo example to see how some of the nifty demo stuff is set up.
#9
We think we've just fixed our water flash problem by changing these two lines in our projectiles datablock :
haslight = false
haswaterlight = false
You're welcome 8)
H.
02/26/2007 (3:47 pm)
Guys,..... for your information :We think we've just fixed our water flash problem by changing these two lines in our projectiles datablock :
haslight = false
haswaterlight = false
You're welcome 8)
H.
#10
Thanks a ton! I no longer have water flash or missing water depth haze. ..... I always wondered what that third value was for in the water block scale definition. Now I feel pretty stupid. :)
@Pete: Thanks a ton for taking the time to type out your detailed response. It really helped.
I was completely missing an entry for the water/sky day blur in my commonMaterialsData.cs file!
02/27/2007 (8:50 am)
@brian/Pete:Thanks a ton! I no longer have water flash or missing water depth haze. ..... I always wondered what that third value was for in the water block scale definition. Now I feel pretty stupid. :)
@Pete: Thanks a ton for taking the time to type out your detailed response. It really helped.
I was completely missing an entry for the water/sky day blur in my commonMaterialsData.cs file!
#11
I don't currently have projectiles in my mod, but when I do, I will remember your info. Thanks.
02/27/2007 (8:52 am)
@Harvey:I don't currently have projectiles in my mod, but when I do, I will remember your info. Thanks.
#12
Thanks a ton! I no longer have water flash or missing water depth haze. ..... I always wondered what that third value was for in the water block scale definition. Now I feel pretty stupid. :)
@Pete: Thanks a ton for taking the time to type out your detailed response. It really helped.
I was completely missing an entry for the water/sky day blur in my commonMaterialsData.cs file!
02/27/2007 (8:57 am)
@brian/Pete:Thanks a ton! I no longer have water flash or missing water depth haze. ..... I always wondered what that third value was for in the water block scale definition. Now I feel pretty stupid. :)
@Pete: Thanks a ton for taking the time to type out your detailed response. It really helped.
I was completely missing an entry for the water/sky day blur in my commonMaterialsData.cs file!
#13
02/27/2007 (4:37 pm)
You shouldn't touch the Z-scale of the waterblock if you're using water for anything else than rendering. isUnderwater () will give you all sorts of results when the bounding box is incorrectly set.
Torque Owner Brian Ramage
Black Jacket Games