Adding Water To Map?
by Don Weatherby · in Torque Game Engine · 10/17/2006 (5:08 pm) · 7 replies
Hello ppl im having major difficulties putting water into my maps and ive looked for tuts and stuff and just cant find one that helps any help would be very very awsome! thx to everybody!
About the author
#2
10/17/2006 (7:45 pm)
Thx man i very much thank you!
#3
-------------------------------------------------------------------------------------------------------------
First Rule, save your work often!!!
OK, so I'm trying to add a lake to my map. I'm using the GameOne mission from the tutorial.
1. First I used the World Editor (hotKey F2) to raise the ground in a circle, like a volcano. I keep my brush small, 3x3.
2. Next, use the World Editor Creator (F4) and go to Mission Objects>Environment>Water
This opens a pop-up window called Building Object: WaterBlock. In Object Name, I named it Lake (real original). Anyways, click OK to accept the defaults, since I don't know what the wave parameters do yet. We'll change a couple settings in a minute.
OK, so this opened a flat plane of water which I couldn't find in the camera view, (NOTE: I do all world editing in Camera View. Hit Ctrl+TAB to toggle back and forth from player view to camera view) so I went to the upper right window (tree view) and found 4900: Lake - WaterBlock. I think the 4900 is randomly generated, so just look for the WaterBlock.
3. Then I opened the World Editor Inspector (hotKey F3). In the TRANSFORM section, I changed position to 0 0 0, but still could find the water, so I highlighted the 4900: WaterBlock in the tree view and clicked World>Camera to Selection.
Whoa. What happened. OK, I moved around a little and saw I was near a big opaque square. I found my lake, but it doesn't really look like a lake floating here in the middle of nothing. I'm not sure how to move the water other than using the TRANSFORM>POSITION section.
4. I gave up on my original volcano/lake, and used the Terrain Editor to create a rim of hills around the lake. I know it's better to bring the lake to the mountains, but we'll learn that later.
So now I have a lake in a mountain, but it doesn't quite seem right.
5. Let's go to the Inspector (F3). In the TRANSFORM section I see SCALE, so I changed the 32,32,1 to 32,32,32. Aha, I learned that the last digit (the 1) is the height of the object (water). Not how thick the water is, but how high off the ground it is. The water itself is just a flat plane (surface) with no thickness.
OK, so I mess with the numbers until I get it to fit my mountain. My end result is 40,40,3. Yours will probably be different.
6. OK, next I File>Save the mission, and File>Exit.
7. I restarted the mission, by clicking Start (from the tutorial). My world loads, and I'm back in player view. So I run around looking for my lake. Boy, it's like a million miles from the PlayerSpawn. We'll have to fix that later.
Finally I find it. (I had to cheat by switching to Mission Editor/Camera View to see where it was, then I went back tp player view).
8. The water is hard to walk through. Is is supossed to be? I don't think so, but how do I fix it. I remember something about viscosity in the Inspector. Go back to Mission Editor (F11), World Editor Inspector (F3).
Highlight Lake - WaterBlock in the tree view. In the Inspector, set FLUID> LiquidType> Water, Fluid>density>1, Fluid>Viscosity>5.
Then SURFACE>waveMagnitude>0.1
What this does is affect the physics of the water. The surface moves a little, and walking is like being in a real lake. You float a little when it gets deep. It's harder to start moving and stop moving. You aren't really swimming, as much as running/floating through deep (sometimes over your head) water. Breathing hasn't been programmed in yet, so you can't drown yet.
9. Last thing. Since we worked so hard creating the lake, highlight the Lake - WaterBlock in the tree view. Then World>Lock Selection (hotkey Ctrl L). This locks the WaterBlock so you can't accidentally delete it.
10. Finally, File>Save Mission As... gameonemission.mis
Good Luck,
Tony
10/18/2006 (4:34 am)
Here's how I did it. It may seem like rambling since it was written by an absolute beginner (me), but it may help.-------------------------------------------------------------------------------------------------------------
First Rule, save your work often!!!
OK, so I'm trying to add a lake to my map. I'm using the GameOne mission from the tutorial.
1. First I used the World Editor (hotKey F2) to raise the ground in a circle, like a volcano. I keep my brush small, 3x3.
2. Next, use the World Editor Creator (F4) and go to Mission Objects>Environment>Water
This opens a pop-up window called Building Object: WaterBlock. In Object Name, I named it Lake (real original). Anyways, click OK to accept the defaults, since I don't know what the wave parameters do yet. We'll change a couple settings in a minute.
OK, so this opened a flat plane of water which I couldn't find in the camera view, (NOTE: I do all world editing in Camera View. Hit Ctrl+TAB to toggle back and forth from player view to camera view) so I went to the upper right window (tree view) and found 4900: Lake - WaterBlock. I think the 4900 is randomly generated, so just look for the WaterBlock.
3. Then I opened the World Editor Inspector (hotKey F3). In the TRANSFORM section, I changed position to 0 0 0, but still could find the water, so I highlighted the 4900: WaterBlock in the tree view and clicked World>Camera to Selection.
Whoa. What happened. OK, I moved around a little and saw I was near a big opaque square. I found my lake, but it doesn't really look like a lake floating here in the middle of nothing. I'm not sure how to move the water other than using the TRANSFORM>POSITION section.
4. I gave up on my original volcano/lake, and used the Terrain Editor to create a rim of hills around the lake. I know it's better to bring the lake to the mountains, but we'll learn that later.
So now I have a lake in a mountain, but it doesn't quite seem right.
5. Let's go to the Inspector (F3). In the TRANSFORM section I see SCALE, so I changed the 32,32,1 to 32,32,32. Aha, I learned that the last digit (the 1) is the height of the object (water). Not how thick the water is, but how high off the ground it is. The water itself is just a flat plane (surface) with no thickness.
OK, so I mess with the numbers until I get it to fit my mountain. My end result is 40,40,3. Yours will probably be different.
6. OK, next I File>Save the mission, and File>Exit.
7. I restarted the mission, by clicking Start (from the tutorial). My world loads, and I'm back in player view. So I run around looking for my lake. Boy, it's like a million miles from the PlayerSpawn. We'll have to fix that later.
Finally I find it. (I had to cheat by switching to Mission Editor/Camera View to see where it was, then I went back tp player view).
8. The water is hard to walk through. Is is supossed to be? I don't think so, but how do I fix it. I remember something about viscosity in the Inspector. Go back to Mission Editor (F11), World Editor Inspector (F3).
Highlight Lake - WaterBlock in the tree view. In the Inspector, set FLUID> LiquidType> Water, Fluid>density>1, Fluid>Viscosity>5.
Then SURFACE>waveMagnitude>0.1
What this does is affect the physics of the water. The surface moves a little, and walking is like being in a real lake. You float a little when it gets deep. It's harder to start moving and stop moving. You aren't really swimming, as much as running/floating through deep (sometimes over your head) water. Breathing hasn't been programmed in yet, so you can't drown yet.
9. Last thing. Since we worked so hard creating the lake, highlight the Lake - WaterBlock in the tree view. Then World>Lock Selection (hotkey Ctrl L). This locks the WaterBlock so you can't accidentally delete it.
10. Finally, File>Save Mission As... gameonemission.mis
Good Luck,
Tony
#4
10/18/2006 (6:49 am)
Hehe your helping people in all threads of what youve learned infinitum ;) keep it up
#5
10/18/2006 (4:56 pm)
Thx infintum3d im really struggleing with the water thing but im gonna folow what u did and hopefully i can figure it out thx again for all the help guys!
#6
10/18/2006 (5:11 pm)
If you have problem with see the water block in the editor let me know. There is a fix for that.
#7
10/18/2006 (6:32 pm)
Awsome! i got it working with a lil help form the community of course! thx to all you guys! ya allright now the only other thing (for now lol) is that im having a rather difficult time trying to make a simple screenshot! ill search on it but if anyone knows pls help me lol and thx again! yay!!!!!!!!!!!!!!!!
Torque 3D Owner Rense
You need to add a WaterBlock. In the World Editor, go to the World Editor Creator (F4). Choose Mission Objects -> Environment -> Water. Give it a name and press OK. If you then go to the Editor Inspector (F3) you'll find your WaterBlock at the bottom of the MissionGroup-tree. Click it and change the scale to for example "1200 1200 10" (without the quotes). The last parameter isn't really a thickness parameter, it's the waterlevel-height. Fiddle around with that. You'll need some textures too obviously. There are some in a normal compile, in ~/example/[yourAwesomeGame]/data/water/*.
If you still can't see water, try unchecking the "UseDepthMask" checkbox.
HTH