Giant Fan (Portal 2)

From Valve Developer Community
Revision as of 08:11, 10 May 2025 by Le Glaconus (talk | contribs) (finished rewriting the page)
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 draw 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 temporarly 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 "models/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 models/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 models/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 models/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 models/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 fan prop with the tools/toolsodraw texture. Tie the brush to func_rotating. 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.

Making the Giant Fan start/stop

Todo: todo, it should be as simple as deactivating/activating the func_rotating, disabling the loop sound's ambient_generic and playing the start/stop sounds.