Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Func areaportalwindow explained

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Func_areaportalwindow Explained

By: expert

An area portal at work
Enlarge
An area portal at work

Areaportals are used to block vis in maps. This tutorial will cover the func_areaportalwindow entity, which will blur anything viewed through the window from a distance, and cause these areas of your map not to be rendered.



Step 1. First you will need to create a window; I will use models/props_building_details/building_tem002_window01.mdl (prop_static) for the frame and models/props_building_details/building_tem002_window01_bars.mdl (prop_dynamic) for the bars.


Step 2. (Optional) Next we will make the glass inside the window. Create a brush (1w 38l 72h) textured on all sides but one with tools/toolsnodraw. For the glass I will use glass/glasswindowbreak070a. Tie this brush to entity (Ctrl+T) and select func_breakable_surf.


Step 3. Create another brush (1w 38l 72h) textured in tools/toolsnodraw and place it 1 unit in front of your func_breakable_surf. Texture the front side of this brush with dev/dev_windowportal and tie it to entity (Ctrl+T). Select func_illusionary and make sure both Disable Receiving Shadows and Disable Shadows are set to 'yes'. Give this entity a name i.e. window_01_fading_part.

Note: If you are going to make multiple windows in your map, give each func_illusionary a different name.


Step 4. Now we will make our func_areaportalwindow brush. Create a brush (2w 38l 72h) textured on all sides with tools/toolsareaportal. Place this brush so that it encloses both the func_breakable_surf and the func_illusionary entities. Tie this brush to entity (Ctrl+T) and select func_areaportalwindow. In the Rendered Window field, enter the name of your func_illusionary entity (window_01_fading_part).

Note: Feel free to edit Fade Start/End Distance (self explanitory), but for this tutorial we will leave them at 128 amd 512.


Step 5. Now add an env_cubemap about 16 units away from the func_breakable_surf. You should now have a working areaportal.

Note: When you run your map, be sure to type buildcubemaps in the console so your portal will fade correctly.


Credit to VALVe for this tutorial - I didn't figure this out myself.

Personal tools