Rotating water

Avatar
KFredje
55 Posts
Posted Feb 18, 2013
Hi,

I want to try and make some gravity confusing map. My goal is to make a little room with water on the floor and rotate the entire room including the water so it is on the ceiling. I have been trying to do this but if I make a func_brush out of my water it doesn't work anymore.

What can I do to reach my goal or is this impossible?

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Feb 18, 2013
Replied 18 minutes later
That's impossible with normal water. You'll have to fake it. Sorry.
Avatar
josepezdj
2,386 Posts
Posted Feb 18, 2013
Replied 30 minutes later
Use worldportals and make 2 different rooms, thus faking it, as Felix said :biggrin: Don't think there's other way...
Avatar
KFredje
55 Posts
Posted Feb 18, 2013
Replied 1 hour later
aw k :sad: change of plans then..tnx for the replies
Avatar
lordkerward
4 Posts
Posted Feb 18, 2013
Replied 6 minutes later
Nice goal you were seeking sir KFredje, though a little bit hardness for your confusing map...
It could be possible sir,
Avatar
BenVlodgi
633 Posts
Posted Feb 18, 2013
Replied 5 minutes later
shouldn't water stay at the bottom anyway?
Avatar
Gemarakup
1,183 Posts
Posted Feb 19, 2013
Replied 6 hours later
Gravity in action affects water too.
Avatar
josepezdj
2,386 Posts
Posted Feb 19, 2013
Replied 10 minutes later

BenVlodgi wrote:
shouldn't water stay at the bottom anyway?

Yes, I meant 2 rooms, one with the water at the bottom of course; the worldportals at the ceiling of both rooms and connected. This way there could be the 'illusion' of water at the ceiling. The rotation effect is the difficult part, maybe this idea should be changed...

EDIT
I thought of a solution for the rotation effect :biggrin: It can be faked with a point_viewcontrol tied to a func_door_rotating (or maybe a func_rotating) this way:

  1. You have the "normal" room (brushes, props, details, and whatever water at the bottom)
  2. You have the 2 alternate rooms connected by worldportals. These rooms should be like this:

  3. room 1 is half the 'normal' room of point 1, for example the upper half, but turned 180 degrees (what's on the ceiling in the normal room will be here at the floor level)

  4. room 2 is the bottom half of the 'normal' room of point 1, and of course it keeps the orientation.
  5. each of these 2 rooms will have a linked_portal_door at their ceilings linked together, and their width and height values will be the size of the rooms' ceiling.

  6. A point_viewcontrol entity at the entry to the normal room or wherever. This will be triggered as soon as the player enters the room and will become the player's eyes. It will also be triggered the func_door_rotating that the viewcontrol is tied to and the player "will see" the room rotating 180 degrees.

  7. The player, in the meantime the rotation is having place, could be teleported to the fake couple of rooms. Specifically to the one which is now the bottom part, that is, room 1. This way the player will be in a room where he'll see at the floor level all stuff of first "normal" room's ceiling, and above him there will be water, the water of the "normal" room :biggrin:

NOTE: the point_viewcontrol can only be parented to certain entities; I haven't tried the func_door_rotating but I tried a func_door and it works. In the case of any issue, try parenting the viewcontrol to the func_door and then this latter one to the func_door_rotating* :wink:

Avatar
KFredje
55 Posts
Posted Feb 19, 2013
Replied 11 hours later
Quote josepezdj
||> josepezdj wrote:

BenVlodgi wrote:

shouldn't water stay at the bottom anyway?

Yes, I meant 2 rooms, one with the water at the bottom of course; the worldportals at the ceiling of both rooms and connected. This way there could be the 'illusion' of water at the ceiling. The rotation effect is the difficult part, maybe this idea should be changed...

EDIT
I thought of a solution for the rotation effect :biggrin: It can be faked with a point_viewcontrol tied to a func_door_rotating (or maybe a func_rotating) this way:

  1. You have the "normal" room (brushes, props, details, and whatever water at the bottom)
  2. You have the 2 alternate rooms connected by worldportals. These rooms should be like this:

  3. room 1 is half the 'normal' room of point 1, for example the upper half, but turned 180 degrees (what's on the ceiling in the normal room will be here at the floor level)

  4. room 2 is the bottom half of the 'normal' room of point 1, and of course it keeps the orientation.
  5. each of these 2 rooms will have a linked_portal_door at their ceilings linked together, and their width and height values will be the size of the rooms' ceiling.

  6. A point_viewcontrol entity at the entry to the normal room or wherever. This will be triggered as soon as the player enters the room and will become the player's eyes. It will also be triggered the func_door_rotating that the viewcontrol is tied to and the player "will see" the room rotating 180 degrees.

  7. The player, in the meantime the rotation is having place, could be teleported to the fake couple of rooms. Specifically to the one which is now the bottom part, that is, room 1. This way the player will be in a room where he'll see at the floor level all stuff of first "normal" room's ceiling, and above him there will be water, the water of the "normal" room :biggrin:

NOTE: the point_viewcontrol can only be parented to certain entities; I haven't tried the func_door_rotating but I tried a func_door and it works. In the case of any issue, try parenting the viewcontrol to the func_door and then this latter one to the func_door_rotating* :wink:

||Thank you for the detailed description. I might try this out somewhere this week. I'm also having another problem when compiling the map if my water is on the ground:
error: material WATER/WATER_WELL_BENEATH doesn't have a $bottommaterialThis is a transparent water texture and I don't know how to get this one fixed and the texture appears black in the map.

Avatar
josepezdj
2,386 Posts
Posted Feb 19, 2013
Replied 2 hours later
That means that your water material hasn't got a bottom material :biggrin: LOL

Check one of the simple stock water textures:

Water
{
$forceexpensive 1
$normalmap "liquids/water_river_normal_sharp"
$flowmap "liquids/toxic_rep_flowmapr"
$flow_normaluvscale 160.0
$flow_worlduvscale 4
$flow_timeintervalinseconds 0.63 
$flow_uvscrolldistance 0.1 
$flow_bumpstrength 1.0
$flow_noise_texture "liquids/water_noise"
$flow_noise_scale 0.00082
$flow_debug 0
$basetexture "liquids/toxicslime_color"
$color_flow_uvscale 276
$color_flow_timeintervalinseconds 4.0
$color_flow_uvscrolldistance 0.11
$color_flow_lerpexp 0.98 
$color_flow_displacebynormalstrength 0.007 
$reflecttexture _rt_WaterReflection
$reflectamount "0.1"
$reflecttint "{ 190 205 205 }"
$reflectskyboxonly 0
$reflectonlymarkedentities 1




$abovewater 1
$bottommaterial "nature/toxicslime002a_beneath"
$fogenable 1
$fogstart 0
$fogend 100
$lightmapwaterfog 1

$fogcolor "{ 58 35 20 }"
$flashlighttint 1
"%compilewater" 1
"%tooltexture" "nature/water_frame01_normal"
$surfaceprop slime
}

There's a line with that parameter:

$bottommaterial "nature/toxicslime002a_beneath"

It's a required one. Put that same one: it's the typical browny fluid you see when you fall into the goo (that's the bottom material, the one that you see underneath the water surface when you sink in :wink:)

Anyway, what's the rest of the content in your .vmt water material? There are required parameters... try to tweak a stock one so you don't miss any.

Avatar
KFredje
55 Posts
Posted Feb 19, 2013
Replied 24 minutes later
How can I edit a .vmt file? I downloaded the water texture from a site, so it isn't one I made myself.

EDIT: Fixed everything myself for now :smile:

Avatar
josepezdj
2,386 Posts
Posted Feb 19, 2013
Replied 10 minutes later
  1. First of all, you have all of them into a packed file called pak01_dir.vpk located into portal 2/portal2 folder.
  2. That kind of files can be opened using GCFScape... Look into materials/nature (there you'll find all "toxicslimes" you see into your texture browser)
  3. You can extract the files you want from the .vpk file into a folder of your choice by right-clicking and then "Extract"
Avatar
msleeper
4,136 Posts
Admin
Posted Feb 19, 2013
Replied 27 minutes later
Maybe I'm misreading something, but func_water_analog?
Avatar
josepezdj
2,386 Posts
Posted Feb 19, 2013
Replied 10 minutes later
Well, sleeper, I don't think you can rotate the func_water_analog. Normally you use it to make a water level go up and down, like filling a pool or emptying it. It can be opened/closed like a func_door following up a straight direction, right?
Avatar
msleeper
4,136 Posts
Admin
Posted Feb 19, 2013
Replied 7 minutes later
You can parent the analog to a rotating entity, though.
Avatar
josepezdj
2,386 Posts
Posted Feb 19, 2013
Replied 8 minutes later
Yeah I guess. I haven't tried that ever before though and checked the water reflections... I don't think they're good enough. The func_water_analog has got kind of odd water reflections already (they're not real-time reflections), so it would be needed to check this option... I think my workaround could look good, if done properly :wink:
Avatar
KFredje
55 Posts
Posted Feb 20, 2013
Replied 18 hours later
@josepezdj: I managed to add a point_viewcontrol in my map but when I parent it to something like my func_door_rotating my screen is blacked out and I don't hear any sound anymore. I assume my view got ported somewhere or something like that. I can see again after the viewpoint returns to the player.

The func_door workaround doesn't work either.

Avatar
josepezdj
2,386 Posts
Posted Feb 20, 2013
Replied 27 minutes later

Hmmm... let's check step by step:

  1. I assume you can see what the point_viewcontrol shows if you don't parent it to anything, right?

  2. Have you set anything to "look at" in the point_viewcontrol entity's properties? If not, add an info_target enmtity, name it and make the viewcontrol look at it.

  3. Also let me know what flags are checked and which ones are not in the viewcontrol. Unchecked "Start at player" and "Follow player". Check "Freeze player" (you can still teleport him but he won't be able to break the sequenze you're creating).

  4. Check how your func_rotating is working. For example, texture it (instead of using nodraw or invisible textures) so you can see what it does. Also try parenting a simple brush to it in order to trace its movement.

Avatar
KFredje
55 Posts
Posted Feb 20, 2013
Replied 2 hours later
I found the problem. Unchecking the "Start at player" flag fixed my problem.
So thank you for the tip.

Now, when I run in the trigger, the screen got 'teleported' to the point_viewcontrol. Is it possible to make this smoother in any way?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Skotty
671 Posts
Posted Feb 20, 2013
Replied 2 hours later
Thats the "start at player" flag you have to check. Probably you need to set a path_track path to the position where the viewcontrol should be, if it doesn't move the player's view to there already (haven't worked with viewcontrol for years).