Giant Fan (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(formatting)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The Giant Fan is a BTS (Behind the scene) decoration Used in the co-op built in to the game. The fan in the game is purely decorative and, is used to "push a lot of air". Use the fan with Pneumatic diversity vent, Maintenance lifts, catwalks, and test chambers for the BTS Scene.
{{Orphan|date=May 2025}}


== Creating a Giant Fan Step 1 ==
The Giant Fan is a [[Behind the Scenes (Portal 2)|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". {{portalrev|4}} uses it as a gameplay element.


1. select the new brush tool, on the toolbar on your right change Cube --> Cylinder using the drop down menu. Next set the Number below that, to 18.
== Creating a Giant Fan ==
[[File:Hammer-Howto2.png|thumb|The brush toolbar]]


== Creating a Giant Fan Step 2 ==
1. Select the brush tool, and in the object bar, change {{mono|block}} to {{mono|arch}} with the drop down menu.
:[[File:GiantFan-HowTo1.png|thumb|left|How the object bar should look like]]{{clr}}


2. Next draw a 1056 x 1056 cylinder, make it at Least; 220 thick.
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 {{ent|func_detail}}.
:{{tip|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.}}


[[File:Cylinser22.png|thumb|The cylinder]]
:[[File:GiantFan-HowTo2.png|thumb|left|The arch properties]]{{clr}}


== Creating a Giant Fan Step 3 ==
3. Place down a {{ent|prop_dynamic}} at the center, set its "World model" to {{path|icon=file|models/props_bts/huge_fan|mdl}} and set "Disable shadows" to {{mono|Yes}} ("Disable Producing Cheap Shadows" in {{TeamSpen|4}}). In the same position, create a {{ent|prop_static}} and set its model to {{path|icon=file|models/props_bts/huge_fan_rim|mdl}}.
:{{tip|You can use the shift key and the arrow keys keys together to place two point entities at the exact same position.}}


3. Push it into the wall that you want to put a fan in, the top should be flush with the wall. Right click and press carve.
4. You can now place the supports, simply place one or multiple {{ent|prop_static}}(s) with the {{path|icon=file|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 {{path|icon=file|models/props_bts/huge_fan_support|mdl}} model, make their "T-Junction part" come in the rod props.
:{{tip|You can use {{hpp|4}}'s pivot point feature to rotate these props around the rod easily.}}
:{{note|You can additionaly extend the arch and add props with the {{path|icon=file|models/props_bts/huge_fan_inner_rim|mdl}} model throughout.}}


== Creating a Giant Fan Step 4 ==
5. In order for the fan to spin, create a small brush at the center of the fan prop with the {{code|preset=1|[[Nodraw|tools/toolsodraw]]}} texture. Tie the brush to {{ent|func_rotating}} by selecting it and pressing {{key|Ctrl|T}}. In the flags tab, check {{mono|"Start ON"}} (if the fan must start enabled), {{mono|"Acc/Dcc"}} and the axis corresponding to the fan's direction (only check {{mono|"X axis"}} or {{mono|"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 : {{code|preset=2|"fan_rotator"}}).
:{{note|You can add a {{ent|trigger_hurt}} spanning across the entire fan to be certified players cannot pass through the fan.}}


4. place down three props; Three static, one dynamic. the dynamic will be the fan itself, search "Fan" in the Model browser, it is the white one. The other two parts will be the fan rims, and supports. position these in a way that you see fit.
6. In order for the blades to spin, parent them to the {{ent|func_rotating}}. Simply specify the name of the {{ent|func_rotating}} in the {{ent|prop_dynamic}}'s parent field.
:{{warning|{{ent|func_rotating}} will not rotate forever. You can use the [[Vscript]] snippet given in its dedicated page to circumvent this bug.}}


== Creating a Giant Fan Step 5 ==
7. Add an {{ent|ambient_generic}} with {{code|preset=1|World.LargeFanLoop}} as its sound name, and set the sound range to something hearable from far away (for instance, {{code|preset=1|mp_coop_fan}} uses 2348 units). Make sure to place it near the fan.
:{{tip|An {{ent|env_projectedtexture}} can be placed behind the fan to create a pretty lighting effect.}}
:{{tip|Additionaly, {{code|preset=1|mp_coop_fan}} makes green {{ent|env_sprite}}s with the {{path|icon=image|sprites/light_glow02}} material blink on a 0.5 seconds [[logic_timer|timer]].}}


5. The giant Fan can be vertical or horizontal, create a small 10 x 10 brush, (Nodraw texture), and press Ctrl + T. This will change to a entity, select Prop_Rotating. In the flags tab, check the axis box that corresponds to your fan direction. x -> horizontal y/z for vertical. Name this entity.
== Making the Giant Fan start/stop ==


== Creating a Giant Fan Step 6 ==
Making the fan start/stop is pretty straightforward, it consists of playing additional sounds and starting/stopping the {{ent|func_rotating}} used for the fan.


Parent the prop dynamic, to the prop rotating. This will cause the fan to rotate In game. place a ambient generic right next to your fan, select the fan sound that you like. In the flags section, uncheck: start silent, and the Not repeat boxes.
1. First of all, name the looping {{ent|ambient_generic}} that was created earlier (for instance : {{code|preset=2|"fan_snd_loop"}}). If the fan must start disabled, uncheck the {{mono|"Start ON"}} flag in the {{ent|func_rotating}}'s properties and set the looping {{ent|ambient_generic}} to start silent.
 
2. Create a new {{ent|ambient_generic}}s for the stop sound, it must have the same sound range as the looping {{ent|ambient_generic}} and the {{code|preset=1|World.LargeFanStop}} sound. Check the {{mono|"Start Silent"}} and {{mono|"Is NOT Looped"}} flag. Name it in a way indicating it is used to make the stopping sound effect (for instance : {{code|preset=2|"fan_snd_stop"}}).
 
3. Create a {{ent|logic_relay}} and name it in a way indicating it is used to make the fan stop (for instance : {{code|preset=2|"fan_stop_relay"}}).
Copy these outputs in it, the example names will be used here.
 
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_rotator}} || Stop ||   || 0 || No
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_loop}} || StopSound ||   || 0 || No
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_stop}} || PlaySound ||   || 0 || No
|}
 
4. Create another {{ent|ambient_generic}} with the same parameters as the previous one, with the only exception being that its sound name must be {{code|preset=1|World.LargeFanStart}}. Name it in a way indicating it is used to make the starting sound effect (for instance : {{code|preset=2|"fan_snd_start"}}).
 
5. Create another {{ent|logic_relay}} with a name indicating it is used to make the fan start (for instance : {{code|preset=2|"fan_start_relay"}}).
Copy these outputs in it :
 
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_rotator}} || Start ||   || 0 || No
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_start}} || PlaySound ||   || 0 || No
|-
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_loop}} || PlaySound ||   || 2 || No
|}
 
6. You can now trigger those 2 {{ent|logic_relay}} with any logic or testing element related entity.
 
[[Category:Portal 2]]
[[Category:Portal 2 Level Design]]

Latest revision as of 08:49, 20 June 2025

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.