Please or Register to create posts and topics.

Underwater Portals?

Page 1 of 2Next

I have an idea for a portal level that utilizes swimming in clear water. Conceptually, a natural extension of this is using portals underwater. I've been doing a lot of searches to see if anyone has attempted this before. There have been a lot of discussions on water and swimming in Portal 2, and occasionally someone briefly mentions this idea, but there are never any further comments either for or against it.

The two big problems are being able to:

1) Place portals on white panels underwater,
and
2) Fire the portal gun while swimming underwater.

- Using "sv_portal_placement_never_fail 1" allows me to place portals underwater. This has the obvious problems of needing sv_cheats and also allowing portal placement on black panels. But this suggests that underwater portal placement might be workable, maybe in a material setting.
- My current workaround is having the water volume not go all the way to the bottom of the pool. By leaving even a small space of air underneath, I can place portals through water onto the bottom, and while I am standing on the bottom I can even fire the portal gun. The problem here though is that the floaty water physics changes when the soles of my feet are on the bottom dry ground under the water and I still can't fire the portal gun unless I am all the way on the bottom. Is it hard-coded into the game that you can't fire the portal gun while underwater?

Am I just getting too far in over my head? (pun intended) Or are there settings that can make these two problems work?

Hm, the physics problem should be solved if you put above the space of air you can put a playerclip, so the player touches "The bottom" in the water.

But your idea, that would look buggy, maybe you make a "fake water" material, (But when the water should be unreachable) and place that texture above, and on the bottom but reversed to the bottom.
And if you do that, the white /brush panel under the water should be max. 128 Units wide, so with a paint_sprayer and a func_portal_detector you can let spread water through the portal if you place a potal on the white panel/brush. But that doesnt work if you use "real" water, because the paint sprayer blobs are splashing "In" the water.

Hope you understand what i mean :lol:

Try if you want, but it's not a good idea. Whether you use "expensive" or "cheap" water, if you have a portal underwater and a portal above water the game will glitch out and flood the whole map with the fog color.

Falsi sumus crusto!
FelixGriffin wrote:
Try if you want, but it's not a good idea. Whether you use "expensive" or "cheap" water, if you have a portal underwater and a portal above water the game will glitch out and flood the whole map with the fog color.

This is true, but remember the portals won't actually be touching the water. Try very very thin playerclips (like 1 unit) like TheTobbell said, and the portals won't actually be touching the water, therefore I would think that the flooding thing might not happen. If it doesn't work, not to be a pessimist, but I would say what you're trying to do is over the top.

I remember playing MasterLagger's aquatic maps that were a lot like what you're doing- swimming. But I don't think there were any white surfaces in the underwater areas, so you didn't need the portal gun.

However, kudos if you can get this working. :thumbup:

Also, do you have a good system for if you have one portal "underwater" and the other above? Realistically you should have liquid flow through the portals.

VALVe didn't want to deal with this, so they made portals fizzle on contact with water and had GLaDOS warn you never to place portals in liquid.

Falsi sumus crusto!

Using portals to spray out water and fling the player is one of the goals and was the "easy" part. I used prop portals with some pushes and paint sprayers parented to them, triggered by portal detectors so that when one portal is underwater, it sprays cleansing gel out the other portal. If I can get the portals to work underwater, then I would also add in some logic and math counters to trigger different speed pushes based on depth and (just as important) to not spray when both portals are underwater.

That's actually quite a good fix. I'm not sure how realistic it would look though.

I found how underwater weapon fire is controlled in Half-Life 2 (http://www.interlopers.net/tutorials/32662), but it involves coding, which I think is beyond the scope of a Portal 2 map. (It might still be doable in a full mod of Portal 1.)

I'm going to convert this into a single-portal map and just place the orange portal projectors underwater. The first two rooms will still work with just minor changes, but the third room will need an overhaul.

In the mean time, some more sensible questions:

1) Is there a trigger condition that can detect when cleansing gel is sprayed on an object?
1b) Is there a simple way to configure turrets so they can be hit with cleansing gel? Or do I need to resort to more complicated measures?

2) I am putting some drainage gratings in my pools for visual additions. They are going to extend back into the walls and floor about 64 units or far enough that they get too dark to see the back. Can I use one Hint brush to cover all of those holes (and also the wall or floor that they are recessed into)? Or would it be better practice to plug each hole with its own Hint brush?
2b) The light entity has a value that specifies the falloff distance of the light. Is there something similar that can be used to force a shadowy dark spot in a specific area?

3) The VDC wiki says "Areaportals may never cross the water surface." Is that just referring to the top face of the water brush? Could I have a door that is underwater that passes through a water brush? Or could I just use two separate water brushes that butt up to each other on either side of the Areaportal?

Valve has not released the code for either game, so you wouldn't be able to change those variables.

1) You can't detect cleansing gel, but you can detect prop_paint_bombs with normal triggers (any paint type)
2) Probably best to just hint each individually, it wouldn't really matter how many you use.
2b) Possibly the blocklight texture could be helpful, but it would create sharp changes in lighting.
3) That would probably just refer to the top face.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
piripiago wrote:
3) The VDC wiki says "Areaportals may never cross the water surface." Is that just referring to the top face of the water brush?

This means exactly what it says, do not ever make a brush that crosses the water level line. Instead, you need to split the areaportal brush in 2: one above the water, and the other on top, and both should touch each other, meaning that you need to make the above one ends right on the upper face of the water brush, and the bottom areaportal brush should start right from there to the bottom of the pit (to the bottom face of the water brush). BUT, consequently, you need to name these areaportal brushes differently, otherwise the engine will think it's just one, not two, and you'll have compile error messages anyways.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
Page 1 of 2Next