Portal 2 Fog Effect?

Avatar
kariko
32 Posts
Posted May 21, 2012
Hello all.

I was wondering how that blue fog effect was created in the Portal 2 campaign. What I mean is outside the test chambers, where there's huge open space and you can see kinda far, there's blue fog. The same effect is in pretty much all the Wheatley chambers as well. Its even in the community spotlight picture! How can I make this effect in a box of about 300x400?

Advertisement
Registered users don’t see ads! Register now!
Avatar
UsCobra11
272 Posts
Posted May 21, 2012
Replied 7 minutes later
This is the way I do it for small size pits.

Create a func_instance, and make the file a global_ents.vmf. Create a logic_auto, add an output targeting the global_ents, and have it trigger the Wheatley or Test chamber environment. For the pit: Make sure that minimal light reaches into it. Make the pit deep, and at the very bottom texture is with a plain black texture. If done correctly it will get a nice fog effect. If you wan't the player to die, simply add a trigger_hurt in the pit.

Avatar
Lpfreaky90
2,842 Posts
Posted May 21, 2012
Replied 37 minutes later
It's an env_fog_controller with some good parameters, the easiest way is indeed like UsCobra said the global_ents.vmf, but if you want you can create one yourself.
Avatar
kariko
32 Posts
Posted May 21, 2012
Replied 13 minutes later
Ok, I'm having some trouble here. I did what you suggested and it worked, but it doesn't look the way I want. I want the player to look into a wall after panels fall off it and see that effect, but then the wall gets covered up if they try to walk into it. So how do I make the fogcontroller make fog in a small area? Also, I'm not sure if I'm putting the skybox right. The box has one opening and has a right, left, top, bottom, and back wall textured with skybox, but then I can see through to other parts of the level. Help? Sorry that I'm slow with this...
Avatar
Lpfreaky90
2,842 Posts
Posted May 21, 2012
Replied 16 minutes later
if you want fog in your skybox you need to setup the fog parameters in your sky_camera.
Avatar
kariko
32 Posts
Posted May 21, 2012
Replied 44 minutes later
Oh God, I just read the skybox articles on the Developer Wiki and I don't get it. Ok, maybe this will help. I'm recreating the Pneumatic Diversity Vent video (www.youtube.com/watch?desktop_uri=%2Fwa ... N9FI&gl=US) and that part where the wall falls apart and he looks inside is what I'm trying to do. Maybe that'll help you guys help me easier?

Also, I don't understand skyboxes, all the maps I've made were clean with no sky. Please excuse my stupidity... :sad:

Avatar
Brainstone
401 Posts
Posted May 22, 2012
Replied 15 hours later
A list of statements that may help you:

  • In that video, there is fog everywhere, even in the testchamber itself. You can see this when looking down long corridors. It is impoosible to create areas where there is fog and areas where there is no fog simultaneously. This would also look unreal. The reason why you think the smoke was denser behind the wall, is that it is a reall large area.

  • In that video you mentioned, it looks like the global_ents were used. It is a hole, which goes really deep and after a while fog shows up. I guess your problem may be that your hole is not deep enough.

  • Another thing that could be, is that under map properties, you have set sky_black_nofog as skybox texture instead of sky_black.

  • The skybox represents an infinite area, that is what one normally understands under "sky". Therefore, you can see through it if other physical objects are behind it. You should cover the walls through which you see with another texture, probably those plastic walls.

--> create a global_ents, trigger it with one of the a_3, a_4 or bts inputs, make your hole deeper and cover several or even all walls with a solid texture.

Avatar
josepezdj
2,386 Posts
Posted May 22, 2012
Replied 1 hour later
I think Brainstone explained quite well.

Just include that Valve makes a big box around the level in some maps (not too recommended overall for new mappers) and I think that level in the video is made like that, plus a env_fog_controller. For the walls, you could use either the toolsblack_noportal texture or the tooskybox texture selecting as map/skybox (as Brainstone said) the sky_black. I'd suggest the first option though.

Avatar
kariko
32 Posts
Posted May 22, 2012
Replied 2 hours later
Thanks for all the info. I actually achieved a similar effect by using toolsblack on the floor, back panel textures on the walls and ceiling, and very dim lighting. I think I'll just keep it this way since I think it looks ok. Thanks again! ^^
Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted May 23, 2012
Replied 20 hours later
Yeah, that would be the easiest approach and also the more effective and quick... I strongly recommend you to add an env_fog_controller as well though. It will give you an awesome touch. It's a handy entity so easy to set up and the efect is very good... Go changing the fog color until you're satisfied with it.