Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unreal Lighting Clark Kromenaker. Unreal Lightmass UE3’s new lighting system is called Lightmass. Simulates bouncing light in an environment.

Similar presentations


Presentation on theme: "Unreal Lighting Clark Kromenaker. Unreal Lightmass UE3’s new lighting system is called Lightmass. Simulates bouncing light in an environment."— Presentation transcript:

1 Unreal Lighting Clark Kromenaker

2 Unreal Lightmass UE3’s new lighting system is called Lightmass. Simulates bouncing light in an environment.

3 Unreal Lighting is Complicated Many optimizations to improve performance. But this means you need to know what you’re doing to get good-looking light. Lighting and shadows are two separate things! – Lightmapping: process of calculating static light. – Shadowmapping: dynamic shadows in-game.

4 LET’S TALK ABOUT LIGHTS

5 Two Types of Lighting Vertex Lighting – fast, but inaccurate. Lightmapping – slow, but very good-looking. Which lighting is used on a mesh depends on the mesh’s settings.

6 Vertex Lighting When a mesh has an invalid lightmap or a lightmap resolution of 0, it uses vertex lighting. Terrible for tiling geometry. But great for detailed, nontiling geometry.

7 Lightmapping Each mesh instance has a light-map. And each light-map has a resolution (i.e. 64x64, 256x256) The light-map stores static lighting information for the mesh. The mesh’s light-map needs to be created by the artist in Maya or Max. Given a valid light-map and a resolution greater than 0, meshes will use Lightmapping instead of Vertex Lighting.

8 Lightmapping Example

9 Good Lightmap, Bad Lightmap BAD!GOOD! A lightmap that gives more space to important surfaces will give better results!

10 Good Lightmaps Improve Lighting Quality and Performance A good lightmap can look good at smaller resolutions. Old Lightmap, 512x512 Lightmap = Mediocre New Lightmap, 64x64 Lightmap = Excellent

11 Lightmap Comparison Good Lightmap, 64x64 Bad Lightmap, 512x512

12 Light-map Resolution Problem Use Texel Density view to visualize light-map size. If there is a discrepancy in size between tiling meshes, this will cause visible lighting problems.

13 Three Basic Light Classes Point Light – A small, spherical light source. Spot Light – Exactly what you think. Directional Light – Light from infinite distance in a certain direction (like the sun).

14 Static Lights Generates mesh light-maps. Must rebuild lighting. Static lights affect static meshes. Can only create cheap dynamic shadows. Static lights DO NOT affect Movers/InterpActors, KActors, or DynamicSM Actors (by default)

15 Dynamic/Static Lights Generates lightmaps. Also does on-the-fly dynamic lighting for Kactors/Movers. Can be configured to use cheap or expensive dynamic shadows.

16 User-Selected Lights Catch-all for any other lighting settings. Dynamic Lights w/o Static Lighting fall in this category.

17 Dominant Lights Used to add realistic shadowing to Dynamic Actors. Limitations – only 1 directional dominant light per level. – For point and spotlights, only 1 dominant light can be affecting a surface at one time.

18 No Dominant Light

19 With Dominant Light

20 LET’S TALK ABOUT SHADOWS

21 Dynamic Shadows KActors and Movers cast dynamic shadows. Two types of dynamic shadows – Modulated (Faster, Cheaper, Less Accurate) – Normal (More Expensive, Much Better In Some Situations)

22 Modulated Shadows Cheap Shadows Look a little strange? – Don’t blend well with static shadows. – Shadows go through objects! Used when: – Light is using modulated shadows. – Actor is using a light env.

23 Why would you want this? Because sometimes, it just doesn’t matter. Small objects. Nothing behind it.

24 Normal Shadows Bit more expensive. Look much more realistic in some scenarios. – Blend well with static shadows. – Do not bleed through objects. Used when: – Light is not static. – Light is using “Normal” shadows. – Actor has light env. disabled.

25

26 Transparent Meshes

27 Lightmass Settings Global Lightmass Settings in World Properties. – Light Bounces: how many surfaces light bounces off of during computation. – Environment Color/Intensity: Color/Intensity of shadows areas; most useful for making shadows lighter.

28 Pipeline Challenges Artists will need to understand how to create light-maps that maximize lighting quality. Designers/Engineers will need to understand how to efficiently and effectively light scenes. – Use static lights whenever possible. – Use modulative shadows when possible. – Reduce lightmap resolution when possible.

29 Tile Seams are Visible 1.Make sure the light-map was laid out correctly by an artist or engineer. 2.Make sure the seam is not a result of preview lighting. 3.Increase light-map resolution by power of two. In most cases, if you go over 128, there is some other problem!

30 Mesh Edges Bleeding Caused by overlap on lightmap. Solutions: 1.Modify mesh’s lightmap to have more space. 2.Increase lightmap resolution by power of two.

31 Dynamic Shadows Look Wrong or Visible Through Walls You are using modulative shadows – need to switch to normal. 1.Don’t use static lights for these shadows. Use either a modified moveable light or a dominant light. 2.Ensure the light’s shadow mode is set to Normal. 3.Turn off the mesh’s light env. and turn on precomputed shadows.

32 Dynamic Shadows Fade Away Dynamic shadows may fade as you walk away. Fix this in the light’s properties. Shadow Fade Resolution – Smaller Value = Fade occurs farther. Min Shadow Resolution – Set between 0 and ShadowFadeRes. – Shadow fades instead of disappearing.


Download ppt "Unreal Lighting Clark Kromenaker. Unreal Lightmass UE3’s new lighting system is called Lightmass. Simulates bouncing light in an environment."

Similar presentations


Ads by Google