Repeating water bug.
by Chris "Dark" Evans · in Torque Game Engine · 02/08/2002 (9:15 pm) · 20 replies
I want an ocean. I'm setting my water's position to "-1024 -1024 200" and it's scale to "2048 2048 64" so it covers the whole map.
It works, kind of. The water only shows up if I'm looking at the original.

In the image I have the water selected so you can see where the original is.
If I look farther to the right, past the original, then it disappears and I can see the terrain. It's fine as long as part of the original is in my view.
Has anyone else noticed this?
Dark
It works, kind of. The water only shows up if I'm looking at the original.

In the image I have the water selected so you can see where the original is.
If I look farther to the right, past the original, then it disappears and I can see the terrain. It's fine as long as part of the original is in my view.
Has anyone else noticed this?
Dark
#2
02/09/2002 (8:58 am)
I was just flying around water world and can't seem to reproduce this one.... I can't even get my water block to have the yellow "selected" outline, strange.
#3
Thanks though. And the yellow outline is inside the mission editor, I just cropped it to make it smaller.
02/09/2002 (3:45 pm)
Hmmm. I'll go throught and see if I can figre it out.Thanks though. And the yellow outline is inside the mission editor, I just cropped it to make it smaller.
#4
11/08/2003 (2:42 pm)
There's some definite weirdness going on here... I was able to fire up my copy of Torque HEAD and fly out a good distance; the water eventually disappeared.
#5
- Melv.
11/09/2003 (2:06 am)
Hmmm ... maybe 30-mins look at this is warranted. I'll see if I'm able to dig anything up later.- Melv.
#6
Couldn't resist a quick peek and the answer seems pretty simple as far as I can see.
First up; did something change whilsts I was away or has it been like this for quite a while as I've not been one to follow the repeating terrain stuff or any changes that may have made it into the codebase?
The reason, as far as I can initially tell, is that the terrain is repeating fine as I created some huge peaks that could been seen from 2048m away in every direction. If I move to any of them, the terrain repeats but when I get there ... no objects. If this applies to interiors and shapes then it sure as hell will apply to the waterblock scene-object.
Maybe there's a preferences somewhere? This looks like it's not terrain related but something to do with the scene-traversal stuff.
Hope this rings a useful bell....
- Melv.
11/09/2003 (2:38 am)
Well,Couldn't resist a quick peek and the answer seems pretty simple as far as I can see.
First up; did something change whilsts I was away or has it been like this for quite a while as I've not been one to follow the repeating terrain stuff or any changes that may have made it into the codebase?
The reason, as far as I can initially tell, is that the terrain is repeating fine as I created some huge peaks that could been seen from 2048m away in every direction. If I move to any of them, the terrain repeats but when I get there ... no objects. If this applies to interiors and shapes then it sure as hell will apply to the waterblock scene-object.
Maybe there's a preferences somewhere? This looks like it's not terrain related but something to do with the scene-traversal stuff.
Hope this rings a useful bell....
- Melv.
#7
The problem may be more insidious than I first thought. Forcing the object-box to gigantic proportions still results in a similar effect. I'll need to look at this further when I get back from visiting the in-laws.
- Melv.
11/09/2003 (4:27 am)
Hmm...The problem may be more insidious than I first thought. Forcing the object-box to gigantic proportions still results in a similar effect. I'll need to look at this further when I get back from visiting the in-laws.
- Melv.
#8
11/09/2003 (9:20 am)
_IF_ you get back from the in-laws. Mwahaha!
#9
Melv,
There have been a series of fixes to the water stuff back in 1.1.2 and I think one of them may have caused the 'water disappears' in the repeating terrain because it was related to changing the water's object box to fix another bug.
Seems like a camera issue to me though, because if your on the edge of the repeating terrain block not looking at the water directly will make it suddenly appear.
11/10/2003 (9:22 am)
Haha, the movie "Meet the parents" comes to mind right about now :oMelv,
There have been a series of fixes to the water stuff back in 1.1.2 and I think one of them may have caused the 'water disappears' in the repeating terrain because it was related to changing the water's object box to fix another bug.
Seems like a camera issue to me though, because if your on the edge of the repeating terrain block not looking at the water directly will make it suddenly appear.
#10
I've fixed the problem and uploaded it to the CVS. Please checkout rev 1.16 for fix.
BTW: It was only a minor problem. :)
- Melv.
11/10/2003 (11:49 am)
Guys,I've fixed the problem and uploaded it to the CVS. Please checkout rev 1.16 for fix.
BTW: It was only a minor problem. :)
- Melv.
#11
11/10/2003 (2:43 pm)
What was it exactly?
#12
11/10/2003 (2:51 pm)
Awesome! so the water dissapearing problem is fixed now?
#13
@Eric: It should be but if you find other effects then please let me know.
- Melv.
11/10/2003 (11:21 pm)
@Robert: The object-space box was not being set in the onAdd function.@Eric: It should be but if you find other effects then please let me know.
- Melv.
#14
11/15/2003 (4:02 am)
Hmm, there is still something odd about the water. If you walk around the edge of the water in the starter.fps eventually the splash emitter that signifies a player is in water stops working. It's very odd.
#15
That'll more than likely be another problem; possibly not even related to the waterBlock object itself. The water disappearing problem itself does seem to be fixed.
- Melv.
11/15/2003 (4:18 am)
Robert,That'll more than likely be another problem; possibly not even related to the waterBlock object itself. The water disappearing problem itself does seem to be fixed.
- Melv.
#16
I know this is an OLD thread, but I want to resurrect it because I think this fix re-introduces an old bug. Long ago, folks ran into a prob where the character behaved as if it was underwater when it was parallel to the water block. I realized that this was because of the objectbox. Looking at the code, I saw that it was set to the huge value:
basically, this caused the character to be in the water any time it was below the water level. This is great if you want one huge water block but if you are placing distinct blocks this is a real problem. I'm currently using the following code in my local build so I can choose, but I think we need to come up with another solution to make it more 'configureable'. Any ideas?
I'm guessing the var: mRemoveWetEdges is a bit of a misnomer, but if anyone has hard facts on that I'd love to hear an explanation.
Note: The code above causes the gizmo to be centered instead of on the edge. It also causes the waterblock to act like any other block, i.e. you can grab the sides w/ ALT+CTRL and scale, etc. When the z scale != 0 you get a bounding box:

[HOW]-Ed
PS - Sorry to keep editting this post, but there is one more detail. Some may ask, "Why have the Z portion of the scale != 0?" Well, because if z==0 you run into another bug when the character is underwater, namely disappearing water fog. This happens when the player looks around a certain angles. By making the water have a Z dimesntion and insuring that the lowest part of the bounding box is BELOW the lowest surface point, you solve this problem.
Cheers,
Ed
03/13/2004 (4:59 pm)
Melv,I know this is an OLD thread, but I want to resurrect it because I think this fix re-introduces an old bug. Long ago, folks ran into a prob where the character behaved as if it was underwater when it was parallel to the water block. I realized that this was because of the objectbox. Looking at the code, I saw that it was set to the huge value:
if(!mRemoveWetEdges)
{
mObjBox.min.set(-1e4, -1e4, 0);
mObjBox.max.set( 1e4, 1e4, 1);
}basically, this caused the character to be in the water any time it was below the water level. This is great if you want one huge water block but if you are placing distinct blocks this is a real problem. I'm currently using the following code in my local build so I can choose, but I think we need to come up with another solution to make it more 'configureable'. Any ideas?
if(!mRemoveWetEdges)
{
mObjBox.min.set( 0, 0, 0 );
mObjBox.max.set( 1, 1, 1 );
}I'm guessing the var: mRemoveWetEdges is a bit of a misnomer, but if anyone has hard facts on that I'd love to hear an explanation.
Note: The code above causes the gizmo to be centered instead of on the edge. It also causes the waterblock to act like any other block, i.e. you can grab the sides w/ ALT+CTRL and scale, etc. When the z scale != 0 you get a bounding box:

[HOW]-Ed
PS - Sorry to keep editting this post, but there is one more detail. Some may ask, "Why have the Z portion of the scale != 0?" Well, because if z==0 you run into another bug when the character is underwater, namely disappearing water fog. This happens when the player looks around a certain angles. By making the water have a Z dimesntion and insuring that the lowest part of the bounding box is BELOW the lowest surface point, you solve this problem.
Cheers,
Ed
#17
There are many things that need fixing-up with the water. This may sound like an excuse, but believe it or not, I didn't change any of the core functionality/code of the waterblock. My only work was related to the way the surface itself was rendered. I appended the code rather than amended it but seem to have inherited the problems.
On the whole, the code runs pretty fast but there's an awful lot of chud in there as well that needs sorting out.
The waterblock does suffer from a little mismanagement of the bounding box and certainly needs a little work doing to it. I haven't looked at the code for a while but to answer your post, the b/box needs to be dynamic and adjust to its position/scaling factor rather than be static. I don't recall, but if it's doing this already then it needs fixing.
No time at the moment though. :(
- Melv.
03/14/2004 (3:55 am)
Edward,There are many things that need fixing-up with the water. This may sound like an excuse, but believe it or not, I didn't change any of the core functionality/code of the waterblock. My only work was related to the way the surface itself was rendered. I appended the code rather than amended it but seem to have inherited the problems.
On the whole, the code runs pretty fast but there's an awful lot of chud in there as well that needs sorting out.
The waterblock does suffer from a little mismanagement of the bounding box and certainly needs a little work doing to it. I haven't looked at the code for a while but to answer your post, the b/box needs to be dynamic and adjust to its position/scaling factor rather than be static. I don't recall, but if it's doing this already then it needs fixing.
No time at the moment though. :(
- Melv.
#18
At any rate, my last update was May(05 2004) and this bug is still occurring. It's workable but unterminated water blocks still vanish suddenly.
06/30/2004 (6:44 am)
Objects and other things aren't meant to repeat are they? Waterblock and terrain blocks yes, but surely not object blocks?At any rate, my last update was May(05 2004) and this bug is still occurring. It's workable but unterminated water blocks still vanish suddenly.
#19
06/30/2004 (10:14 am)
I am currently working on fixing water code. I have most of the issues mentioned about water, in these forums, fixed. I can't really give a timeline on when I'll have this done but rest assured it is being worked on.
Torque Owner Chris "Dark" Evans