250 likes | 386 Views
Eighty-color-channel lighting. Zoltán Márton marton.zoltan@grandpace.com Cecília Sik Lányi lanyi@almos.uni-pannon.hu University of Pannonia Egyetem u. 10. 8200 Veszprém Hungary. Overview. What’s wrong with the 3 color channel methods ? Methods for lighting simulations
E N D
Eighty-color-channel lighting Zoltán Márton marton.zoltan@grandpace.com Cecília Sik Lányi lanyi@almos.uni-pannon.hu University of Pannonia Egyetem u. 10. 8200 Veszprém Hungary
Overview • What’s wrong with the 3 color channel methods? • Methods for lightingsimulations • Lighting in today's games • Colorimetrybasics • Phong shading • Eighty-color-channel lighting • Comparing with today’s real-time computer graphics
What’s wrong with the 3 color channel methods? • Less accuratelighting even with HDR • This can create unrealistic lighting and shading
Methods for lightingsimulations • Global Illumination • Ray trace/Photon trace
Lighting in today's games • HDR • Ambient Parallax Occlusion • Parallax mapping • Bumpmapping • Specular highlight • Dynamic Ambient Occlusion • But all those are still in 3 color channels
Phong shading • It’s one of the most common used, and well known shading • It’s the base of bumpmapping N L Surface
Eighty-color-channel lighting • We have to use: • Phong shading • The approximation shown in the colorimetry basics • Colorspace transformation • Overlit detection to avoid the distortion of the colors
Eighty-color-channel lighting • To do all those calculations we need to use shaders • The per-pixel based calculations run on the pixel shader units • There are some setups and basic transformations which have to be done in a vertex shader program
Basic transformations, Light vector calculation Vertex Shader XYZ coefficients Texture 0 Phong shading Texture 1 ... Light spectrum distribution 80 color channel calculations Light intensity & attenuation coefficient Texture 19 XYZ to RGB matrix Surface reflexion coefficients Color space transformation Gamma correction coefficients Over lit detection Pixel Shader Eighty-color-channel lightingdataflow Light source position Post processing
Eighty-color-channel lighting • On Shader Model 3.0 and Shader Model 2.0 we have 16 texture units per-pass under OpenGL. • We need to split the color calculation into two parts • In this case we have to use High Dynamic Range
Phong shading + remaining 4 textures Phong shading + first 16 textures in the colorimetry calculation Textureno blendings with write to Z-Buffer enabled Textureadditive blending with write to Z-Buffer disabled Transform to RGB and over lit detection Pass 1 Pass 2 Post processing Eighty-color-channel lightingdataflow
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Comparing with today’s real-time computer graphics 3 color channel 80 color channel
Summary • We have shown the method how to calculate 80 channel lighting on colorimetry base • We have compared the „traditional” 3 color channel lighting with the 80 color channel lighting • The program is capable to run in real-time even on older DX9 video cards
Future plan Modelling the real world: Puppet furniture: sitting- and dining room Wine-glasses and coloured boxes Comparing the real LED lights with the lighting in VR
Contact Zoltán Márton marton.zoltan@grandpace.com Cecília Sik Lányi lanyi@almos.uni-pannon.hu