water block problem
by Stefan Beffy Moises · in Torque Game Engine · 08/04/2002 (11:02 pm) · 12 replies
hey there,
I'm having a little problem with waterblocks...
to get them into a level, normaly I copy/paste some waterblock from one mis file to another and then adjust the block in the mission editor...
seems to work this way, but there is one strange problem:
- I resize the water in the editor (it was a square before I turned it into that "river" in the screen), but the original water "shape" seems to be stored somehow, too (the white grid with the previous waterblock's x-y-z axis in the middle), so this "water grid" doesn't change to the new settings...
and, even more strange, the waterblock seems to influence the whole map now, so as the player moves, it looks and feels as the whole map was covered with water (decreased speed, etc.).
I'm using Melv's water enhancements atm, but that doesn't make a difference, it's the same with the standard water blocks...
Here is the example "river" block:
Hm, if I try to add a new waterblock within the mission editor, I get
Thanks a lot!!
I'm having a little problem with waterblocks...
to get them into a level, normaly I copy/paste some waterblock from one mis file to another and then adjust the block in the mission editor...
seems to work this way, but there is one strange problem:
- I resize the water in the editor (it was a square before I turned it into that "river" in the screen), but the original water "shape" seems to be stored somehow, too (the white grid with the previous waterblock's x-y-z axis in the middle), so this "water grid" doesn't change to the new settings...and, even more strange, the waterblock seems to influence the whole map now, so as the player moves, it looks and feels as the whole map was covered with water (decreased speed, etc.).
I'm using Melv's water enhancements atm, but that doesn't make a difference, it's the same with the standard water blocks...
Here is the example "river" block:
new WaterBlock(water) {
position = "-520 -736 -7.78101";
rotation = "1 0 0 0";
scale = "1216 64 25.748";
liquidType = "RiverWater";
density = "2";
viscosity = "3";
waveMagnitude = "0";
surfaceTexture = "~/data/water/water";
surfaceOpacity = "0.8";
envMapTexture = "~/data/skies/day_0007";
envMapIntensity = "0.2";
submergeTexture[0] = "~/data/water/water";
removeWetEdges = "0";
UseDepthMask = "1";
MinDepth = "0.1";
MaxDepth = "1";
MinAlpha = "0.23";
MaxAlpha = "0.76";
DepthGradient = "0.4";
BlurPower = "5";
};Does anybody have the slightest idea what may be causing this??Hm, if I try to add a new waterblock within the mission editor, I get
Connection error: Invalid packet..Any ideas here? :P
Thanks a lot!!
About the author
#2
and I've recomiled the engine dozens of times, with quite a lot clean builds, doesn't change anything, too...
very strange...
So does it work for you if you copy the waterblock from another mission and adjust it in a new level? Does creating a new block in the mission editor work, also?
08/05/2002 (12:23 am)
nah, no matter how often I save the mission, it's always like that...and I've recomiled the engine dozens of times, with quite a lot clean builds, doesn't change anything, too...
very strange...
So does it work for you if you copy the waterblock from another mission and adjust it in a new level? Does creating a new block in the mission editor work, also?
#3
the mission-editor. Or I can just creat a new one directly in the mission-editor. No problem there. That's
the reason, why i thought, there's a problem with your engine.
Do you use the latest HEAD? Or Torque 1.1.2?
08/05/2002 (1:14 am)
Yes, it works both ways. I can just copy one waterblock from another mission and then adjust it troughthe mission-editor. Or I can just creat a new one directly in the mission-editor. No problem there. That's
the reason, why i thought, there's a problem with your engine.
Do you use the latest HEAD? Or Torque 1.1.2?
#4
thanks for your help!
08/05/2002 (1:17 am)
hm, very strange then... well, we are running a customized HEAD version, but the latest merge dates back to June, I think... so maybe I should do another merge or a least a diff to see where the differences are regarding the editor or the waterblock specific code...thanks for your help!
#5
head will solve your problem. Hope so.
Good Luck!!!
08/05/2002 (1:20 am)
I just looked on older version (HEAD one day in june). I had no problem there. So, i don't know if the new head will solve your problem. Hope so.
Good Luck!!!
#6
08/05/2002 (1:35 am)
Just found a change (strangely enough from end of April...) which seems to explain the crash when inserting water in the mission editor:Change #: 2809 Committed by: John Quigley Date: 2002/04/08 03:17:58 Description: Added fields surfaceTexture and envMapTexture so that editor doesn't crash when adding water. Modified Files: torque/example/common/editor/objectBuilderGui.gui (1.6)I'll check this when I'm back home... but this doesn't explain that I can't EDIT the waterblock correctly in the editor... thanks again!
#7
08/05/2002 (3:32 am)
I think you may have tried to scale the depth? It seems that I have this problem too if I do that.
#8
but why the heck has the grid the same "old" sizes no matter how I scale the block... weird!
08/05/2002 (3:52 am)
Yeah, I've scaled all three dimensions... am I not supposed to do this? I'll give it a try later on...but why the heck has the grid the same "old" sizes no matter how I scale the block... weird!
#9
Under the scale setting, type in the length of the river, the width, and then 1 for the depth.
So, it might be "1024 140 1" (for example). Then you should see the waterblock, surrounded by a yellow line which indicates the true edges.
That should do the trick. :-)
08/05/2002 (4:07 am)
The grid will stay the same--that's more for a guidline (same for models).Under the scale setting, type in the length of the river, the width, and then 1 for the depth.
So, it might be "1024 140 1" (for example). Then you should see the waterblock, surrounded by a yellow line which indicates the true edges.
That should do the trick. :-)
#10
So did you also have the strange phenomena of "water effects" on the whole map (decreased speed, etc.), even at places with no water if you changed the depth value?
08/05/2002 (4:12 am)
Thanks, Eric! So did you also have the strange phenomena of "water effects" on the whole map (decreased speed, etc.), even at places with no water if you changed the depth value?
#11
08/05/2002 (4:33 am)
Yeah... putting the depth to 1 should fix that, though. The water will still be as deep as needed, but that's just automatically done.
#12
08/05/2002 (11:41 am)
Eric, thanks again, that really fixed it... should be documented somewhere, though....!! :)
Torque 3D Owner Marco Meier
Slickware Games
work on the fly.
Do you have some strange warnings when you compile the engine? maybe you should try to make a
clean build of the engine.
--------------------
Marco