Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University...

51
Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém [email protected]

Transcript of Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University...

Page 1: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

Lights and Colour in VR

Cecília Sik LányiUniversity of Pannonia

Veszpré[email protected]

Page 2: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

2

Content• First part

– Definitions (virtual reality, light …)– Light types in VR– Some examples of these lights

• Second part– Colour temperature of the light– Different light sources in VR– Radiosity– Some practical advice

• Third part– Videos– Conclusion

Page 3: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

3

Motivation• What motivated me to teach VR and

multimedia?• Not the fact that I have to spend sometimes 14

hours a day glued to my computer screen.• The real motivation for me is for example when I

get a message from a low-vision child’s parentfrom somewhere around the world saying thatthis game what we developed is the child’sfavourite game.

• I have always been impressed by 3D artists whohas taken the time and energy to ensure theirimages were truly photorealistic.

• Today we will deal with the most important basicknowledge about making lights in the VR.

Page 4: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

4

Definition of Virtual Reality• Virtual Environment (VE): A synthetic, spatial (usually

3D) world seen from a first-person’s point of view. Theview in a VE is under the real-time control of the user.Virtual Reality (VR) and Virtual World are more or lesssynonymous with VE.

• Multi-sensory VEs are closed-loop systems comprised ofhumans, computers, and the interfaces through whichcontinuous streams of information flow. Morespecifically, VEs are distinguished from other simulatorsystems by their capacity to portray three-dimensional(3D) spatial information in a variety of modalities, theirability to exploit users’ natural input behaviour forhuman-computer interaction, and their potential to“immerse” the user in the virtual world.

Page 5: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

5

What is light?We can read in the Bible:

• In the beginning God created the heaven andthe earth.

• And the earth was without form, and void; anddarkness was upon the face of the deep.

• And the Spirit of God moved upon the face ofthe waters.

• And God said, Let there be light: and there waslight. And God saw the light, that it was good:and God divided the light from the darkness.(The First Book of Moses: Called Genesis,Chapter 1. 1-4.)

Page 6: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

6

Definition of the light

• Visible light is really a very small portion in a range ofelectromagnetic radiation.

• This radiation travels in waves of different wavelengths.• The difference in wavelengths (the “tops” of each wave) is

what makes the difference between blue, red, gammarays, x-rays, radio waves etc.

Page 7: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

7

„White light”• “White light” is a combination of all colours in the

visible spectrum. When we perceive an object asred for example, what really happens is thatwhite light falls on a red surface, and all thewavelengths except those that give red light areabsorbed by the material. Only the red portion ofthe spectrum is reflected back.

• We are going to discuss the colour of lights later,but first I would like to present you with somelighting basics and types of lights in a 3Dprofessional modelling software, for example inMaya.

Page 8: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

8

Lighting concepts• The basic premise of good lighting is appropriate

design.. Light gives objects or characters“meaning” in their surroundings. It also providesan appropriate and intentional atmosphere thatwill be logically interpreted by the viewer.

• The design potential of light is inherent in itsphysical characteristics. By controlling itsintensity, colour, and direction, light becomesa key factor in creating a scene. Lighter anddarker areas help to compose the frame andguide the eye towards certain objects andactions.

Page 9: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

9

Choosing light types

• Once we have determined the direction anddistribution of lights on a scene, we will alsoneed to consider the type of light source.

• Light types:– Directional lights– Point lights– Ambient lights– Spot lights– Area lights– Volume lights

Page 10: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

10

Directional Lights

Page 11: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

11

Point Lights

Page 12: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

12

Ambient Lights

Page 13: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

13

Spot Lights

Page 14: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

14

Area Lights

Page 15: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

15

Volume Lights

Page 16: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

16

Default Lights, Light intensity

• If there is no lights in a scene for example, Mayacreates a Directional Light when the scene isrendered. This light is parented to the renderedcamera and illuminates the scene regardless ofwhere the camera is facing.

• Intensity can be defined as the actual orcomparative brightness of light. Like most otherrender attributes, it can be modified either byusing the slider or by mapping a texture to thechannel.

Page 17: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

17

Decay Rates• No Decay: Light reaches

everything.• Linear: Light intensity

decreases in directproportion to distance(I=1/d)

• Quadratic: This is howlight decays in real life(I=1/d*d)

• Cubic: Light decays fasterthan real life (I=1/d*d*d)

Page 18: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

18

Bike examples togetherupper row: Directional-, Point-, Ambient-,lower row: Spot-, Are-, and Volume Light.

Page 19: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

19

Lighting the models byupper row: Directional-, Point-, Ambient-,lower row: Spot-, Are-, and Volume Light.

Page 20: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

20

Geometry primitivesDefault-, Directional-,

Point-, Ambient-,Spot-, Area-, Volume

Light.

Page 21: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

21

Next topic: the colour of light

Do we really know howwonderful light is?

Page 22: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

22

The colour temperatures of light

Page 23: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

23

ActualLight

Coloursand their

3DEquivalent

Page 24: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

24

Always use the proper lightcoloration when creating

photorealistic light!• Every light source emits a different color

so if you want to create realistic lightingyou will need to use the appropriate lightcolour.

• In fact, you should avoid using white lightssince they don’t exist in reality.

• You would be surprised at how realisticyour scene becomes when you use thecorrect light colour.

Page 25: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

25

The impact ofdifferent light

sources.

• It is easy to see howthe light colour playsa major role in thecredibility of thescene: different lightsources producedifferent colours.

Page 26: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

26

Creating Realities with Radiosity• Radiosity is the indirect light that is distributed

between objects. Most real-world objects reflectlight, which means the light is bounced back andforth between the objects in the environment.This reflected light is responsible for most of theillumination in the environment.

• The actual light source illuminates only a specificpoint in the environment, whereas radiosity lightsup the majority of the space. Reflected light iscommonly referred to as indirect lighting, and isthe most common form of lighting in reality:Natural light is primarily indirect lighting.

Page 27: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

27

What happens to the light colour?

• The light that bounces off an object actuallychanges its colour.

• In fact, it assumes the colour of the object that isreflecting it. This effect is referred to as colourbleeding, which means the colour reflectedbetween surfaces.

• This becomes an important factor to considerwhen lighting our scenes.

• If we don’t accurately compensate for colourbleeding, our scenes will end up looking veryartificial.

Page 28: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

28

The effects ofcolour bleeding.

• The light that reflectsoff the walls hasassumed its creamcolour, which tends toneutralize a greatdeal of the colour tintthat was created bythe light source.

• We now have a verynatural lightingscenario for all fourlight sources.

Page 29: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

29

More colour bleeding

Page 30: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

30

How do we add radiosity lighting toour images, scenes?

• The very professional 3D programs haveradiosity lighting features.

• The mathematics for creating radiosity is verycomplex. Although, radiosity is a complexlighting formula, it can be simulated withsuccess.

• Of course, the lighting won’t be nearly asaccurate as radiosity but it will certainly besignificantly better than simply using directlighting.

• In order to simulate radiosity we need to do twothings: Add additional lights round the scene andgive them colour bleeding.

Page 31: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

31

The difference between direct andsimulated radiosity.

Page 32: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

32

Always remember to create colourbleeding with your radiosity lights!

• When light is bounced off an object itassumes the colour of the object.

• If you don’t reflect this colour in yourradiosity lights, you’ll end up with a veryartificial looking image and scene.

Page 33: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

33

It is obvious that simulated radiosityis much better than the directlighting but how exactly do we

create it?• Place several point lights around the scene to

simulate the places where the light wouldbounce.

• It’s very important that you use a point light andnot a distant light or spotlight since we want thelight to travel in all direction, which is whathappens in reality.

• The placement of the light is determined by thelight reflectivity of the object in the room.

Page 34: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

34

Wire frame model ofthe rabbit sitting in

the armchair.

• Proper placement ofsimulated radiositypoint lights.

• The verticalplacement of theradiosity lights

Page 35: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

35

Always turn off specularity whensimulating radiosity!

• Specular highlights can be created only bythe light source, not by indirect lighting.

• Therefore, if you don’t turn off thespecularity for your indirect lights you’llend up with far too many specularhighlights on your surfaces, making themappear very unnatural.

Page 36: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

36

Diffusion and Radiosity• When you start adding lights to a

scene to simulate radiosity yourun into the problem of surfacecolour saturation, which is wherethe surface actually shows toomuch of its own colour.

• Most surfaces in reality show onlya small fraction of their owncolour since they ray on the lightaround them to bring out theircolour.

• When you have a surface with100 percent diffusion, and youadd radiosity lights, you end upshowing more than 100 percentof the surface’ colour.

Page 37: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

37

Never use 100 percent diffusionlevels when simulating radiosity!

• You should never use 100 percent diffusionlevels under any circumstances, but definitelynot when simulating radiosity.

• Light acts as a colour amplifier, so if you use 100percent diffusion levels your surface will end upwith colour saturation, which is completelyunnatural. Newer use 100 percent diffusionlevels any circumstances.

Page 38: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

38

What’s the solution to surfacecolour saturation?

• Lower the diffusion ofthe surface to a pointwhere the saturation nolonger occurs.

• This may require someexperimentation at firstbut in time you will beable to predict thediffusion levels youneed to use.

• In the case of ourphone image, the tableshould have a diffusionof around 70 percent,which is typical for mostsurfaces.

Page 39: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

39

Using light gels

• Lighting gels is very helpful for creatingcomplicated lighting effects in our images.

• A lighting gel gets its name from the filmindustry where they are used to changing thelight colour and creating shadow maps.

• Lighting gels, also commonly referred to asshadow maps, are used to enhance our lightswith colour filters and custom shadows.

Page 40: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

40

Using lighting gelsto create shadow

effects

Page 41: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

41

Using lighting gels to projectstained glass images

Page 42: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

42

Let us sum up what we have dealtwith on a specific example.

• Here you can see real toy furniture on thetable.

• It was modelled by my students last yearin class, the subject was called “VirtualReality and it’s application.”

Page 43: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

43

Two ill examples

Page 44: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

44

Let us try with other simulated lightsources!

Page 45: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

45

2700 K (100 watt lamp) spot 2, 2700 K (100 watt lamp) spot 3,4700 K (daylight flood lamp) area 1, 4700 K (daylight flood lamp) area 2

Page 46: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

46

10000 K (light from clear blue sky) ambient 2, 10000 K (light from clear blue

sky) ambient blue, 2200 K (incandescent lamp) directional 2,6000 K (daylight fluorescent lamp) directional 2

Page 47: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

47

This model was rendered by differentlight sources by Maxwell render engine

Page 48: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

48

Videos (10-12 minutes)• Toy furniture (living room and dining room)• University street• Castle in Veszprém• Ags+ml• h264_lan• Demoreel-2005• Kitchen-multi.• Lightingdemo• mx_teaster

Page 49: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

49

References• Berndt C., Gheorghian P., Harrington J., Harris A., McGinnis C.,

(2004) Leraning Maya 6, Rendering, Alias Systems• Birn J., (2000) Lighting & Rendering, New Riders Publishing• Bowman, D.A., Kruijff, E., Laviola Jr., J.J., Poupyrev, I. (2004),

3D User Interfaces. Addison-Wesley• Fleming B., (1998) 3D Photorealism Toolkit, John Wiley &

Sons, Inc.• Maxwll Render: http://www.maxwellrender.com/• Sik Lányi C., (2006) Virtual Reality in Healthcare, Intelligent

Paradigms for Assistive and Preventive Healthcare,Ichalkaranje, A., et al. (Eds.), Springer-Verlag, pp. 92-121.

• Stanney, K.M. (2002), Handbook of virtual environments, ed.by: Stanney, K.M. editor, Handbook of Virtual Environments:Design, Implementation and Applications. Mahwah, N.J.:Lawrence Erlbaum Associates, Inc.

• http://science.howstuffworks.com/light3.htm• http://users.design.ucla.edu/~cariesta/MayaCourseNotes/html/

Page 50: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

50

Summary

• Today we covered some basic examples of howlights are used, and the light types fordeveloping realistic virtual reality scenes.

• Until next time, I hope I will have the opportunityto share some practical advices too, so until nexttime, good luck, and remember:

• No detail is too small!• And do not believe everything what you see! The

films and VR scenes are always manipulated!

Page 51: Lights and colour in VR.ppt [Read-Only] · Lights and Colour in VR Cecília Sik Lányi University of Pannonia Veszprém lanyi@almos.uni-pannon.hu. 2 Content ... • Most surfaces

51

It is not manipulated! You can believe me!

Cecília Sik LányiUniversity of Pannonia, Veszprém

e-mail: [email protected]