wiki.sine.space | sinespace

Difference between revisions of "Lighting an Interior"

From wiki.sine.space
Jump to: navigation, search
(Emissive surfaces)
 
(One intermediate revision by the same user not shown)
Line 67: Line 67:
 
The Ambient light has no source in the scene and is modified via Window / Lighting from the top menu bar.
 
The Ambient light has no source in the scene and is modified via Window / Lighting from the top menu bar.
  
In this scene the ambient source is the skybox; the color range of the skybox informs the color range of the ambient light in the scene.
+
In this scene the ambient source is the skybox; the color range of the skybox informs the color range of the ambient light in the scene. You can also use either a flat colour source, or three gradient options. The skybox option works well in the Mirage region but doesn't always look good, depending on the skybox itself.
  
  
 
[[File:Ambientlight.jpg]]
 
[[File:Ambientlight.jpg]]
 
 
  
 
==Adding lights to a scene==
 
==Adding lights to a scene==
Line 143: Line 141:
  
 
This can be very good for LEDs and small light piping. It also contributes to light bounce off shiny surfaces.
 
This can be very good for LEDs and small light piping. It also contributes to light bounce off shiny surfaces.
 +
 +
Emissive surfaces are only applied to static objects, and only for baked lighting.
  
 
''NOTE''
 
''NOTE''
Line 150: Line 150:
  
 
[[File:Emissivesurfaces.jpg]]
 
[[File:Emissivesurfaces.jpg]]
 
 
  
 
==Light probes==
 
==Light probes==

Latest revision as of 18:51, 7 November 2016

Interiorlightingbanner.jpg


The space platform provides virtual world creators with lighting tools that can create a huge variety of amazing, atmospheric spaces.


Mirage Scene Download

There is no one right way to light a region. Getting the right lighting can take a few attempts. This How To looks at the combination of different light types, both realtime and baked, in the Mirage demo scene.



Baking and lightmaps

Each light in a scene is either baked or realtime. Most light types (with the exception of Area lights) can be either.

Realtime influences inworld performance. Baked increases upload size.

In the Mirage demo scene the creator has used a combination of real-time and baked lighting.


Lightmap.jpg


Ambient and directional light

When you create a new scene in unity it will have two light sources by default;

  • Directional light
  • Ambient light


Directional light

A directional light which is an object in the scene you can rotate like any other object.

The directional light will cast shadows in the direction you rotate it.

For the Mirage scene in this How To the directional light has been deleted from the scene. Directional light is often used as the source of sunlight in an exterior scene. In the Mirage scene shadows are cast by the point lights in each room.


Directionallight.jpg


Ambient light

The Ambient light has no source in the scene and is modified via Window / Lighting from the top menu bar.

In this scene the ambient source is the skybox; the color range of the skybox informs the color range of the ambient light in the scene. You can also use either a flat colour source, or three gradient options. The skybox option works well in the Mirage region but doesn't always look good, depending on the skybox itself.


Ambientlight.jpg

Adding lights to a scene

You can add lights and light probes to a scene by clicking create / light in the scene hierarchy window. Leaving light in the name of all your lights will allow you to search for them in the hierarchy.


Createalight.jpg


Area lights

Area lights are used in this scene to project different tinted light from a plane into each room.

Area lights are very efficient but do not cast shadows. They are baked only.

The direction of the light from the plane is indicated by the yellow line.


Arealight.jpg


Point lights

The hanging lights in the Mirage scene are mesh lamps, on the walls and ceilings, with point lights attached to them.

Point lights emit light in all directions at once over an area visible as a wire-frame sphere.

The point lights in this scene are set to real-time and are the source of dynamic shadows on avatars and other non-static objects in the scene.

The hanging lights also have a halo component added to give a simple visual indication of their status as light source.

The Mirage scene also contains one baked point light, called “CenterLight.”

The creator used a wide area baked point light here because an area light on ceiling would have undermined the shadows cast by the other ceiling and wall lights in the scene.


Pointlight.jpg


Spot lights

Spot lights project light from a cone point and are used in this scene to illuminate the NPCs showcasing clothing items. They are set to realtime and project the shadows of the NPCs onto the back wall.


Spotlight.jpg


Emissive surfaces

The Light Circle in the centre of the main room has meshes where the Standard Shader is set as Emissive; the mesh radiates light.

If the emission value is between 0 and 1 the mesh surface will appear to be a light source but does not actually emit light.

If the emission value is set above 1 for one or more color channel the mesh suface will emit a faint HDR light.

This can be very good for LEDs and small light piping. It also contributes to light bounce off shiny surfaces.

Emissive surfaces are only applied to static objects, and only for baked lighting.

NOTE

Emissive surfaces may generate some artefacts on materials with detail maps when viewed in webgl.


Emissivesurfaces.jpg

Light probes

Light probes sample the combination of light sources in the scene and allow moving objects in the scene; most obviously visiting avatars; to be well lit by the baked light sources that otherwise would only have an impact on in the static components of the scene itself, via the lightmap textures.

You can lay out as many or as few light probes as you want. You should aim to place light probes at the places in the scene where different light sources obviously overlap.

In this scene the creator has focused on light probes at head height, with a particular grouping around the intense light conditions of the fashion studio.

NOTE

You can toggle the light probes to be visible nor not via the Gizmo menu above the scene window.


Lightprobes.jpg


Baking the scene

Once all your light sources and light probes have been laid out and all the static objects that will form the fabric of the scene are in place, your final act before submitting the scene to the server is to bake.

This function is a once click process, triggered from the Build button at the bottom of the Lighting window.

It may take a while for the bake to complete. It will take longer the higher the baked resolution you set. Unity defaults to 50 texels per unit but this scene was run at 20 and could probably have come down to 10 without any significant change in the result.

Once the bake has completed you will have lightmaps for your scene which will automatically be uploaded when you submit to the server.

The lightmaps are then blended with the textures in the scene to give you the look and feel you have created.


Baking probes

When you bake the scene Unity will also apply the light information to the light probes and the reflection probes in the scene.

You can also bake ambient occlusion and reflection probes as part of the same process.


Bakinglights.jpg