Pages

Wednesday 8 June 2016

Switches And Lights Pack Usage Guide

Using the assets in the Switches And Lights pack

This pack contains models and Blueprints for adding lights and electrical fittings to your scene. Not only do these decorative items add finishing details to your scene, the lights can be wired to the switches to make them functional.

All the assets are constructed at high detail in real world sizes primarily to fit architectural visualisation scenes. However, for this reason the items may seem small for game environments. All the assets can be scaled and adjusted to fit such applications with no ill effects on the operation of the items.

For a preview, take a look at the video here.

Quick Start Guide

The lights and switches have been constructed to make placing, connecting and editing of their appearance as simple as possible. They should be able to be placed and used with little or no set up or adjusting, other than to suit your own visual preference.

Simply follow these steps to see how to place a light in the scene and to make it function by flipping a switch.

1. Load the tutorial map

Go to SwitchAndLightPack>Maps and load TutorialMap. This gives a good starting scene for placing and testing lights, as well as a basic on-screen walk through.


2. Place a light object

Go to the folder SwitchAndLightPack>Blueprints to find BP_Light-Lamp. This is a good all-round light to get started with. Drag it from the browser window onto the ceiling to place it. It should snap to the surface of the ceiling.


3. Adjust the light settings

Once in place, you can change the light's appearance. Material instances for the shade and fittings can be found in the folder SwitchesAndLightsPack>Materials>LampMaterialInstances. Turn on the light to see the effect of altering the colour, range and intensity settings. Also feel free to scale the light if it looks too small in the scene.


4. Place a switch

Go to the folder SwitchAndLightPack>Blueprints to find BP_Switch-x1_, which is a basic single light switch. The trailing'_' in the name is to avoid confusion when Unreal appends numbers onto individual actor instances in the World Outliner. Drag it from the browser on to a wall where you can still see the light you placed earlier (just to make it easy to see the effect the switch has).


5. Adjust the switch appearance

Like the light, the switch has a wide range of material instances included. Apply a material instance from the folder SwitchesAndLightsPack>Materials>SwitchMaterialInstances and make any other visual changes via the details panel you require. If you set the light to start on, maybe you'd prefer the switch to be in the down 'on' state initially. Again, if the switch appears too small, it can be freely scaled without adversely affecting the functioning of the switch.


6. Connect the switch to the light

With the switch selected in the window, find the 'Target Lights' setting in the details panel and click the '+' icon. This will turn the switch into an interactive item and open a slot for the light you wish to control. In the new array element slot that has appeared under the setting, click on the eye dropper icon and then use it to click on the light you previously placed in the scene. If you prefer, you can choose the light by name in the drop down list in the details panel instead.


7. Play!

Once the light is assigned, hit the Play button and find your way to the light switch. Once in range, you can aim at the switch to interact with it. A glowing highlight should appear around the switch when it's ready for input. At this point, hit one of the default controls - F on the keyboard, left mouse button or top gamepad face button (eg, the yellow Y button on an Xbox controller). You should see the light toggle off or on whenever you hit the switch.


8. Add more lights and switches

Once you've got the hang of this combination, add more lights and switches to the scene and wire them up in different combinations. If you want to remove lights from a switch control, click the arrow next to the light name and select 'Delete'. To clear them all, click the trash icon next to the Target Lights setting. If you want to delete a light from the scene, you may get an Unreal warning saying that there are other actors that refer to it. Don't worry, it will just mean that those switches that operate it will have an empty entry in the Target Lights setting, but this won't adversely affect the operation of the lights.

Scene and example maps

Along with the overview scenes containing the mesh and material variants, the package contains a folder of example scenes to both demonstrate the object usage in situ and provide tutorials for using objects in conjunction.

All the example files are found in: Content>SwitchAndLightPack>Maps

ExampleMap

This scene features a series of rooms with different examples of lights in each. The lights are wired to a switch for each room to demonstrate how user interactions work.


LightAndSwitchLibrary

This scene features the switch and light actors placed along a display wall along with short descriptions of the objects.


TutorialMap

This is a scene set up to allow the user to practice using the lights and switches in conjunction.

One area has step-by-step instructions on setting up a light and switch and there are other empty rooms for practicing and testing other lights in the same way.


Actor assets


Lights

There are four light types: a ceiling lamp, a pendant light, a wall light and an adjustable downlighter. These are all provided as blueprint actors in the folder SwitchAndLightPack>Blueprints

Ceiling lamp

BP_Light-Lamp

This asset is a lamp-type ceiling light consisting of a ceiling rose, wire, fitting, shade and bulb. The actor also has a point light for illumination. It has been built with the pivot at the top so that it can be placed directly on to a ceiling by dragging into the scene from the browser.

The lamp has the following settings:

Light Settings

  • Light state: Sets default illumination state.
  • Light colour: Sets the illumination colour.
  • Light intensity: Brightness of the light.
  • Light range: Illumination distance.
  • Fade time: Time in seconds of how long the light fades on or off when toggled with a switch.
  • Wire length: Length of the wire. Adjusting this causes the fitting, bulb and shade to adjust position accordingly.

Material settings

  • Wire material: Defaults included - grey, white or black. These are found in the SwitchesAndLightsPack>Materials>WireMaterials folder or via the drop-down menu.
  • Fitting material: Sets the material instance of the ceiling rose, fitting and frame. These are found in the folder SwitchesAndLightsPack>Materials>LampMaterialInstances.
  • Shade material: Sets the material of lamp shade. These are found in the folder SwitchesAndLightsPack>Materials>LampMaterialInstances.

Automatic Shadow Toggle

  • Auto shadow toggle: In order to avoid shadowing artefacts from the fitting and shade when using the lamp's dynamic light, shadows are turned off whenever the light is illuminated. You can override this with the Auto shadow toggle switch. NOTE: This may cause shadows to look incorrect, but if you need shadows to be cast all the time, then you can do so here.

Downlighter

BP_Light-Downlight

This represents a recessed downlight consisting of a collar, and lamp fitting which can be angled to point in multiple directions. The actor also has a point light for illumination. It has been built with the pivot at the top so that it can be placed directly on to a ceiling by dragging into the scene from the browser.

The downlighter has the following settings:

Light Settings

  • Material: Sets the material instance of the lamp and collar. These are found in the folder SwitchesAndLightsPack>Materials>DownlightMaterialInstances.
  • Light state: Sets default illumination state.
  • Light colour: Sets the illumination colour.
  • Light intensity: Brightness of the light.
  • Light range: Illumination distance.
  • Fade time: Time in seconds of how long the light fades on or off when toggled with a switch.
  • Light X-Angle/Light Y-Angle: Adjust these to point the lamp component in the required direction. It may be helpful to turn the light on to see where it will end up pointing!

Automatic Shadow Toggle

  • Auto shadow toggle: In order to avoid shadowing artefacts from the fitting and shade when using the lamp's dynamic light, shadows are turned off whenever the light is illuminated. You can override this with the Auto shadow toggle switch. NOTE: This may cause shadows to look incorrect, but if you need shadows to be cast all the time, then you can do so here.

Pendant light

BP_Light-Pendant

This represents a modern, teardrop-shaped pendant light consisting of a ceiling rose, fitting and opaque shade. The actor also has a point light for illumination. It has been built with the pivot at the top so that it can be placed directly on to a ceiling by dragging into the scene from the browser.

The pendant light has the following settings:

Light Settings

  • Light state: Sets default illumination state.
  • Light colour: Sets the illumination colour.
  • Light intensity: Brightness of the light.
  • Light range: Illumination distance.
  • Fade time: Time in seconds of how long the light fades on or off when toggled with a switch.
  • Wire length: Length of the wire. Adjusting this causes the fitting, bulb and shade to adjust position accordingly.

Material settings

  • Wire material: Defaults included - grey, white or black. These are found in the SwitchesAndLightsPack>Materials>WireMaterials folder or via the drop-down menu.
  • Fitting material: Sets the material instance of the ceiling rose and fitting. These are found in the folder SwitchesAndLightsPack>Materials>PendantMaterialInstances.
  • Shade material: Sets the material of lamp shade. These are found in the folder SwitchesAndLightsPack>Materials>PendantMaterialInstances.

Automatic Shadow Toggle

  • Auto shadow toggle: In order to avoid shadowing artefacts from the fitting and shade when using the lamp's dynamic light, shadows are turned off whenever the light is illuminated. You can override this with the Auto shadow toggle switch. NOTE: This may cause shadows to look incorrect, but if you need shadows to be cast all the time, then you can do so here.

Wall light

BP_Light-WallLight

A sconce-type wall light with an opaque cover and a translucent shade. The shade is white, but takes on the colour of the light as determined in the user settings. The actor also has a point light for illumination. It has been built with the pivot at the back so that it can be placed directly on to a wall by dragging into the scene from the browser..

The wall light has the following settings:

Light Settings

  • Material: Sets the material instance of the fitting and collar. These are found in the folder SwitchesAndLightsPack>Materials>WallLightMaterialInstances.
  • Light state: Sets default illumination state.
  • Light colour: Sets the illumination colour.
  • Light intensity: Brightness of the light.
  • Light range: Illumination distance.
  • Fade time: Time in seconds of how long the light fades on or off when toggled with a switch.

Automatic Shadow Toggle

  • Auto shadow toggle: In order to avoid shadowing artefacts from the fitting and shade when using the lamp's dynamic light, shadows are turned off whenever the light is illuminated. You can override this with the Auto shadow toggle switch. NOTE: This may cause shadows to look incorrect, but if you need shadows to be cast all the time, then you can do so here.

Switches

There are 12 switch and panel actors included as blueprint actors in SwitchAndLightPack>Blueprints. The actors fall into two functional types:

Working switches and sockets

Any switch, panel or socket that has a physical switch as part of the object can be assigned to control lights. Although visually different, all these actors share a common set of controls to determine their visual appearance and functionality.

BP_Switch-Dimmer BP_Switch-Fused BP_Switch-Socket-Kitchen

BP_Switch-Socket-x1_ BP_Switch-Socket-x2_ BP_Switch-x1_

BP_Switch-x2_ BP_Switch-x3_ BP_Switch-x4_

The switches have the following settings

Light settings

  • Material: Sets the material instance of the panel and switch. These are found in the folder SwitchesAndLightsPack>Materials>SwitchMaterialInstances.
  • Switch On?: Sets the toggle position of each switch in the actor. That is that a panel with three switches will have three instances of this setting. NOTE: The dimmer switch has no control here, since the switch does not visually change position when used.
  • Target Lights: This is an array of lights in the scene that are to be controlled via the switch actor.
    To place a light under the control of a switch. Click the + next to the Target Lights control. At this point the light will become an active controller, adding an activation region and a target area allowing the player to interact with the light switch. An array element will appear in the panel ready to accept a light. To assign a light, select one from the drop down list by the array element or use the eye dropper icon next to the entry to pick one from the scene. You can assign as many lights in the scene as you want to a single switch and any mumber of switches can control a single light. So, for example, you can control a whole set of downlighters with one switch or have a landing light controlled by a switch downstairs and another upstairs. If you add multiple instances of the same light in the array, they will remain in the list, but will have no additional effect in the scene.
    NOTE: The switch will only work when you press Play. It won't function when in edit mode.
  • Separate Switch Material [Advanced Parameter - click arrow to open]: A second material instance can be assigned to the actor to alter the appearance of the switch components. If this metting is empty, the switch will take on the material instance assigned tot he whole actor.

Highlight

  • Highlight material: When the switch is in range and being targetted by the player, a glow as added around the object. The appearance of this glow is determined by the highlight material instance. By default, it is a green glow and alternative material instances are included in orange and with an animated 'pulse'.

Advanced note

Each interactive switch has a set of default input trigger events in its Event Graph. If you have a game mode set up with bindings, just add the input event at the same point to add your own input control and remove any unwanted inputs. A game mode binding was not included by default to stop the system being limited to a particular Game Mode or predetermined project setting.

Decorative panels

These are placed as actors and can have their materials set via the details panel. However, since they have no switches, they cannot be assigned to control lights. NOTE: The highlight material setting has no effect since the items are not interactive.

BP_Switch-Socket-Aerial BP_Switch-Blank BP_Switch-Socket-Phone

No comments: