Portal Examination Room Guide

From ThinkingWithPortals

Jump to: navigation, search

This page will discuss the development of Portal Style Lighting (Ala this page), as well as the development of an "Examination Room" to complete the lighting. Forum Page for Discussion.

This article has been abandoned by it's author.
The information here may be incorrect, invalid, or out of date. Continue at your own risk!
This article was abandoned and needs completion. If you can complete the author's work as written, great. Otherwise, feel free to start fresh.


Contents


The Room

The Completely Boring Room, No Lights
We need a test chamber, but as this is a very simple tutorial (it's about the lighting, not the playing!), our room is simply a 512x512x256 box with a short, 32 unit pedistal in the middle sporting the Portal gun. Don't add any lights to this map, we'll just use the game's ambient lighting for the first round. After developing the room (or downloading my copy), compile the level and "play" it in Portal.

The light is way too bright and garish; it doesn't fit the game at all. Instead of Nurotoxins, GLaDOS should be serving cake. But the cake is a lie! ...let's make it more obvious.

 

The Observation Room

The Completely Boring Room now has an observation bay
The lighting in Portal comes from the Observation rooms scattered around the test chambers. This hermetically sealed chamber is no different. Here I've added a 256x64x128 observation room in the top half of one of the walls. This is where those paragons of science will watch as Chell copes with being sealed in an airtight room.

The lighting is still the horridly happy pure-white ambient no-shadow-throwing lighting. As soon as we have the bay done, however, we'll be ready for some decent lighting.

For textures, I've used the Observation Room floor, an Observation Room wall, and the same Modular Ceiling as the test chamber. Next we add some GLaSS!

 

(work in progress)

The Light Tube

Creating the tube itself

1. Three steps to the basic shape of the tube

Start off with a 128x128 brush with all sides textured nodraw. The brush will have a height of 48 units. Align it on the grid (aligning it on some multiple of 128 is recommended). Use the clipping tool to cut the shape down to something in the order of 24x64 like shown to the right (pic 1).

2. Texturing the inside

Apply the settings shown on the picture (pic 2) to the right to the inner face of the newly creates object.

3. Texturing the bottom

Also apply these settings to the face at the bottom (pic 3).

4. Final arrangement

Use the copy & paste facility to create seven clones of these objects. Mirror and rotate them as needed to create the final arrangement that is shown on the image to the right (pic 4).

5. Adding the cap

Add a new 128x128 brush on top of the other brushes. It has a height of 16 units, making the whole tube a block of 64 units to sink in your ceiling. Texture it with nodraw on all sides, except the bottom one, which receives lights/white009 (pic 5).

6. Fixing stuff

When using the texture lock option (enabled by default), it can happen that the textures for the bottom faces look completely scrambled. To give you an idea, the black hole in the texture image must not leak anywhere. Easiest thing is to enter texture tool, select the eight bottom faces, select World for Align and set the Texture Shift parameters until the hole is gone. Remember, if you aligned the tube on the grid like you were told, the shift should always be something like 64, 128, 192, 256 (that's why it's easiest to work on the grid). See pic 6.

Inserting the tube into your room

7. The ceiling of the room we want to light-flood.

Now that you have a nice 128x128x64 block (if you created it around the origin, you could save it as a prefab and insert it many times) you can insert it into the observation room. See the ceiling in pic 7 - it will be the example ceiling. It is 64 units. It is actually not necessary for it to be that high, but in my maps I decided to make the eight brushes forming the tube itself detail brushes, so something was needed to mask them and the already existing wall was just fine.

8. Modify vertices

Instead of just cutting up the wall using the clipping tool, I decided to take another way of splitting up the wall. The reason is that just splitting it into four rectangular areas creates the problem of T-intersections, where a vertex that is exactly on the line between two other vertices might not actually be on this line because of small errors. These might show off as tiny cracks (or leaks) when rendered. (I don't know how prone Source is to this but it doesn't hurt to just do it.) So use the vertex tool and make the large brush to something of this shape (pic 8).

9. Clone the new brush

By now it should be clear of what type the arrangement is. Note that there are no vertices directly on the line between two others, just some sharing a single point which does not hurt at all. Of course, if your tube wasn't supposed to be in the middle of the ceiling, you have to take the vertex tool again and alter the shape of some, but the idea should be quite clear - picture 9.

10. The finished tube in Hammer.
11. The tube ingame.

Note that this quick guide describes a light tube that is best to be hidden behind a frosted glass wall. After all, this is an observation room tutorial, and in most cases they're only visible from the outside, so there is really no need to have the high-polygon models for the tubes like these used in-game.



Ack, this tube is ugly. I will be rewriting this as per this guide... Observation Room Light Tube Guide. Thanks, NocturnalGhost!

Hammer showing my light tube
The Observation Bay recieves light from (presumably) a light tube that extends to the outside world. We'll add that here.

I cheated, and will most likely be sent to the pits of the Aperture Science Enrichment Center for using the carve tool, but what I did for this was put in a 64x64 unit square brush, cut out an appropriate sized cylender out of the brush.

I then put a 32x64x64 brush on top of the hole made in the brush, and paint the bottom of the brush with the 'white' texture. This will act as a light in the room. How cool is that?

For the walls of the tube, I use a 'metal+white gradient' texture. You can find it by searching 'gradient' in the texture editor. For the base of the tube, I slapped on a similar metal texture. NOTE! This is not the correct metal texture, this one is too rusty. But I like this metal texture for my scene (and I don't want to seek the correct texture!).

So, here's a few views of the room after rendering the room. Wowsers! Now we see the power of radiosity. We can see this starting to build out.

 
Shots of Radiosity Light Bounces from the light tube.
You might need to download this image from the full size image page and tweak the levels to see details, but the point is that while the observation room is decently lit, the light bounces don't do much.
 

The Window Pane

Now we place a glass wall between the observation room and the test chamber. I filled in the hole, and made the pane of glass one unit thick (the smallest block you can make.)

Glass is boring in Hammer
But it's pretty ingame!
I now apply the glass/glasswindow_refract01 texture on only one side of the window; the side facing into the test chamber. All other faces on the brush are marked nodraw, to make the room render that much faster!
 
Left: normal solid - Right: func_brush

Do not forget to tie the created glass brush to func_brush. This sadly happens to many mappers... Why do you have to do so? The reason is that a glass window dynamically changes the way you see things, but simple brushes are not able to do this. You have to make it an entity. If you do not do this, it will result in some sort of Hall of Mirrors effect. Compare the two pictures to the right; notice how what you see through the left window does not resemble what's behind, but the right one (func_brush) does.

Why this boring checkerboard? Simple. Do you want to wait for all those special effects to run while you are desparately trying to align entities or brushes? Didn't think so. (But give it a few years and we won't have to use checkers to sidestep this!) Also, this does a good job of being non distractive. But I digress.

Also notice that the texture doesn't effect the lighting effect of the room. There you go! The Observation room is our light source. Neat, huh?

 
Comparison of single sided glass (left side), and double sided glass (right side).
Here's a tip. If the player will never enter an Examination room, you can put NODRAW textures on the inside side of the glass (and inside facing walls that the user will never see). This gives a glassy texture to the outside, while allowing the Source engine to ignore the inside triangles. Should your player be able to enter the room, you will need to put the glass texture on the inside of the window as well. (I got these by noclipping. How cool is noclip? Pretty cool.) I've also modified these pics so you can see the change.
 
No portals for you!
As you can see here here, glass textures automatically disallow portals.

Also, you can see the neat distortion effect caused by the windows, through the window, through the portal, looking at Chell. Neat, huh?

 

Additional Lights in the Examination Room (or: How to light your test chamber)

How the light looks in the editor (glass pane made transparent to allow stuff to be visible)

The official test chambers are almost always lit only by the observation rooms. This works by having enough spy rooms around and putting spotlights into them. This can completely eliminate the need for any other lightning outside the observation rooms.

Window with spotlight behind.

Just put a light_spot behind the glass pane, slightly rotated to face downwards (so it doesn't light the ceiling of your room but rather the lower areas). Fire up the object properties and assign 183 204 218 300 to Brightness, 183 204 218 150 to BrightnessHDR, 200000 to Constant.

Additional light source added to the room

See, this doesn't look too bad... however, the examination room is unlit in the rear areas. We'll fix this by placing a single light into the back half of the room, assign the same values as above to Brightness and BrightnessHDR and optionally adjust Constant to light up even further. (Shouldn't be needed in most cases however.) It also lightens up the chamber some more.

 

func_detail And The Window Frame

Adding Some Stuff To The Room

Tweaking The Room Lighting

Extra Credit: Adding A Door

Personal tools