• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
d h k

[Deferred Rendering] Complex Light Sources (ie. "Surface Lights"?)

3 posts in this topic

Hi there,

whenever I see beautiful renders like these, I wonder how complex light sources are handled within a Deferred Rendering context.

[img]http://i.imgur.com/7YqKZ.jpg[/img]

I have implemented point, spot and direction lights just fine, but look at the light source in the top right corner, how is this done? Is it just a white material that doesn't get affected by shading whatsoever (so it pretty much stays all white) and then a point light underneath to give the effect of a rectangular light source?

I've seen other games have stripes on the ground that illuminated the level, how is this done? Can all lights in real-life be simulated by just point, spot and directional lights somehow? Or is there a (set of) special technique(s) that help us out here (something like "surface lights" or illuminating materials like in 3DS MAX)?

Think of a ceiling light that is very narrow but extremely long, like this one for example:

[img]http://img112.imageshack.us/img112/91/dcp1591zh8.jpg[/img]

Is this just an array of point lights along the light source?

This is something that's been bothering me for a while, I was never able to find anything, search doesn't give results (probably due to not having the proper keywords) and I've never seen a lighting tutorial go past the point, spot and direction light types.

Please enlighten me (pun intended hur hur hur)! Thanks ahead of time!
1

Share this post


Link to post
Share on other sites
The keyword you're looking for is "area lights". Your typical point/directional/spot light sources provide a limited approximation of real world light sources, since they essentially simulate a light that has an infinitely small area from the perspective of the surface being lit. In real-life all light sources obviously have non-zero area, and the larger their area the further off you will be when you try to approximate them with spot/directional/point light sources.

The problem with area lights in real-time graphics is that they can be costly to evaluate. Calculating the contribution of any light source requires integrating over the surface of that light source and applying your BRDF. For an infinitely-small light source this is easy, since you can approximate it as a dirac delta function which means you only need to calculate incident irradiance and apply your BRDF for one direction. You can't do this for area lights, so in offline renderers they're typically handled by using Monte Carlo methods to approximate the integral (basically you shoot a lot of rays with a known probability distribution). You can use Monte Carlo techniques in a real-time shader, although in some cases to get good specular it will require a lot of samples which can get really expensive. There's also proper soft-shadowing to worry about which can be just as important as the shading, which you get "for free" if you apply visibility to your samples in a ray-tracer but it's unlikely you'll be able to do it in a real-time shader. If you look around you can find some approximations for calculating area lights in real-time, but they will vary in quality and performance.

I'm guessing that for that Killzone 2 screenshot they're using a simple emissive material on the light itself, using a point or spotlight to approximate the direction contribution (or perhaps some other approximation), and the indirect contribution is baked into their lightmap. A lot of games will just bake the direct lighting from area lights into lightmaps, for instance Half-Life 2 and other Valve games do this all over the place. Edited by MJP
2

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1342116424' post='4958498']
I'm guessing that for that Killzone 2 screenshot they're using a simple emissive material on the light itself, using a point or spotlight to approximate the direction contribution (or perhaps some other approximation), and the indirect contribution is baked into their lightmap. A lot of games will just bake the direct lighting from area lights into lightmaps, for instance Half-Life 2 and other Valve games do this all over the place.
[/quote]

Yeah, using light baking and light probes to light scenes is quite a popular way of getting nice dynamic lighting without the massive runtime cost of doing it.
0

Share this post


Link to post
Share on other sites
Thanks a ton, this greatly helped me sort this out in my head! I've often been thinking about how point/spot/directional light types are really just three simplified models, similar to how polygons are a model (ie. a simplification) to describe actual (oftentimes round) three-dimensional shapes. Edited by d k h
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0