Giant Fan (Portal 2)

From Valve Developer Community
Revision as of 08:49, 20 June 2025 by Le Glaconus (talk | contribs) (formatting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Giant Fan is a Behind the Scenes decoration used in the co-op campaign. The fan is meant to be purely decorative and is used to "push a lot of air". Portal: Revolution Portal: Revolution uses it as a gameplay element.

Creating a Giant Fan

1. Select the brush tool, and in the object bar, change block to arch with the drop down menu.

How the object bar should look like

2. Next create a 1280 x 1280 brush and make it at least 96 units thick. Replicate the properties from the screenshot. Remember to tie it to a func_detail.

Tip.pngTip:If the fan is supposed to be vertical, you can temporarily check "Reorient primitives on creation in the active 2D view" in the 2D view options.
The arch properties

3. Place down a prop_dynamic at the center, set its "World model" to Filemodels/props_bts/huge_fan.mdl and set "Disable shadows" to Yes ("Disable Producing Cheap Shadows" in TeamSpen's Hammer Addons TeamSpen's Hammer Addons). In the same position, create a prop_static and set its model to Filemodels/props_bts/huge_fan_rim.mdl.

Tip.pngTip:You can use the shift key and the arrow keys keys together to place two point entities at the exact same position.

4. You can now place the supports, simply place one or multiple prop_static(s) with the Filemodels/props_bts/huge_fan_rod.mdl model, and make them come from the center of the fan model. You can then place other props with the Filemodels/props_bts/huge_fan_support.mdl model, make their "T-Junction part" come in the rod props.

Tip.pngTip:You can use Hammer++ Hammer++'s pivot point feature to rotate these props around the rod easily.
Note.pngNote:You can additionaly extend the arch and add props with the Filemodels/props_bts/huge_fan_inner_rim.mdl model throughout.

5. In order for the fan to spin, create a small brush at the center of the fan prop with the tools/toolsodraw texture. Tie the brush to func_rotating by selecting it and pressing Ctrl+T. In the flags tab, check "Start ON" (if the fan must start enabled), "Acc/Dcc" and the axis corresponding to the fan's direction (only check "X axis" or "Y axis" if the fan is vertical, if it's horizontal, don't check any axis flag). Set the maximum rotation speed to 400, the friction to 18 and the blocking damage to 1000. At last, name this entity in a way preferably indicating that it is used to make other entities rotate (for instance : "fan_rotator").

Note.pngNote:You can add a trigger_hurt spanning across the entire fan to be certified players cannot pass through the fan.

6. In order for the blades to spin, parent them to the func_rotating. Simply specify the name of the func_rotating in the prop_dynamic's parent field.

Warning.pngWarning:func_rotating will not rotate forever. You can use the Vscript snippet given in its dedicated page to circumvent this bug.

7. Add an ambient_generic with World.LargeFanLoop as its sound name, and set the sound range to something hearable from far away (for instance, mp_coop_fan uses 2348 units). Make sure to place it near the fan.

Tip.pngTip:An env_projectedtexture can be placed behind the fan to create a pretty lighting effect.
Tip.pngTip:Additionaly, mp_coop_fan makes green env_sprites with the 🖼Imagesprites/light_glow02 material blink on a 0.5 seconds timer.

Making the Giant Fan start/stop

Making the fan start/stop is pretty straightforward, it consists of playing additional sounds and starting/stopping the func_rotating used for the fan.

1. First of all, name the looping ambient_generic that was created earlier (for instance : "fan_snd_loop"). If the fan must start disabled, uncheck the "Start ON" flag in the func_rotating's properties and set the looping ambient_generic to start silent.

2. Create a new ambient_generics for the stop sound, it must have the same sound range as the looping ambient_generic and the World.LargeFanStop sound. Check the "Start Silent" and "Is NOT Looped" flag. Name it in a way indicating it is used to make the stopping sound effect (for instance : "fan_snd_stop").

3. Create a logic_relay and name it in a way indicating it is used to make the fan stop (for instance : "fan_stop_relay"). Copy these outputs in it, the example names will be used here.

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger fan_rotator Stop   0 No
Io11.png OnTrigger fan_snd_loop StopSound   0 No
Io11.png OnTrigger fan_snd_stop PlaySound   0 No

4. Create another ambient_generic with the same parameters as the previous one, with the only exception being that its sound name must be World.LargeFanStart. Name it in a way indicating it is used to make the starting sound effect (for instance : "fan_snd_start").

5. Create another logic_relay with a name indicating it is used to make the fan start (for instance : "fan_start_relay"). Copy these outputs in it :

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger fan_rotator Start   0 No
Io11.png OnTrigger fan_snd_start PlaySound   0 No
Io11.png OnTrigger fan_snd_loop PlaySound   2 No

6. You can now trigger those 2 logic_relay with any logic or testing element related entity.