Real-time global illumination (PRT lighting)

Started by
13 comments, last by circlesoft 17 years, 10 months ago
I've been considering implementing a real-time global illumination I have an indoor/outdoor scene (like a city model), the geometry is static. but I need the lights to be dynamic, and I don't care so much if the lights are low-frequecy and have very soft shadows. it has to be fast and just give decent results in both mixed indoor/outdoor scenes I've checked out SH PRT lighting, which I think is the most popular of all and easier to implement on D3D, but does that method have great limitations in indoor scnenes, does it support point lights in general ? is the PRT suitable for my purpose ? if it's not, is there any other method that can run pretty fast on current hardware ? thanks

dark-hammer engine - http://www.hmrengine.com

Advertisement
the only limitation of PRT is the static geometry i think. It should work for all kind of lights.

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
thanks for the input
but I've heard from different sources, that SH is not very well suitable to indoor scenes and near-distant lights.
and I was checking out the dx-sdk for the functions of SH evaluation for different light sources, and there was :

D3DXSHEvalDirectionalLight
D3DXSHEvalSphericalLight - Approximates local spherical light sources. (Note that PRT only works with distance lighting environments.)
D3DXSHEvalConeLight
D3DXSHEvalHemisphereLight

is Spherical light actually a point light ?

there is also a paper here :
http://www.ati.com/developer/gdc/Oat-GDC04-SphericalHarmonicLighting.pdf
which addresses this problem and has a wierd method of indoor/outdoor lighting, by manually selecting blockers for each mesh in the scene, and grouping lights.
and I didn't really understand it's concept, because actually, every static object inside a room must cast shadows and lighting on to it's suroundings, no matter it's indoor or outdoor light, doesn't it ?

dark-hammer engine - http://www.hmrengine.com

SHL in its classic form does not support local lights. The point and spot lights are statistical approximations, and at short range they do not look particularly good. This, unfortunately, is an area which has not yet been adequately solved for current hardware.

What sort of dynamic lighting will there be? Attached to the viewer, switched on/off, swinging from a chain,...?
You might look into "Ambient Occlusion". It really depends a lot on exactly what you trying to light, how fast things move, etc. In the end, you may be able to opt for a much simpler light model depending on the constraints you can impose on your environment

tj963
tj963
Quote:What sort of dynamic lighting will there be? Attached to the viewer, switched on/off, swinging from a chain,...?

every kind of dynamic like, the only limitation is that the scene is static, but the lights has to be fully dynamic in every way, and the quality does not need to be perfect afterall, in my case, performance is more important.
so what you mean is, SH lighting for indoors is not worth it at all ? even with a lesser quality ?

Quote:you might look into "Ambient Occlusion".

thanks, could you comment on some differences between AO and SH ?
all I know as a newbie is, ambient occlusion does not represent light Interreflections, and we have to do direct lighting and shadowing on the entire scene for any number of lights, so it has a major performance drawback compared to SH , doesnt it ?

dark-hammer engine - http://www.hmrengine.com

Quote:Original post by sepul
Quote:you might look into "Ambient Occlusion".

thanks, could you comment on some differences between AO and SH ?
all I know as a newbie is, ambient occlusion does not represent light Interreflections, and we have to do direct lighting and shadowing on the entire scene for any number of lights, so it has a major performance drawback compared to SH , doesnt it ?


All I can say is that 'any number' could be an awful lot of lights, and the more lights you have the worse the performance, no matter what method you use.

I s this for a general purpose engine, or a specific type of game?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:I s this for a general purpose engine, or a specific type of game?

it's actually urban kind of environment, for example a small city model with mixed indoor/outdoor scenes.

and as for the performance issues, what I thought I can do is, seperate outdoor/indoor areas in the editor, and compile PRT for outdoor scenes, and make occlusion maps for indoors, and do a seperate lighting.
the engine uses occlusion culling, and as the outdoors are more geometry intensive, I can use SH lighting for outdoors which is faster and more suitable, and do AO with conventional lighting for indoors, how about that ?

are there any other GI methods that can be applied, and not as expensive as Ambient occlusion ?

foretunately, I'm targeting for GF7+ generation cards, cuz the engine is not gonna be done anytime soon.

dark-hammer engine - http://www.hmrengine.com


You might want to look into this:

http://graphics.ucsd.edu/papers/plrt/

It's a PRT extension that appears to do a great job supporting dynamic lights in static environments. The preprocessing is pretty blasted expensive though. They compute a full GI solution for a giant grid of light positions, apply lots of fancy compression tricks to it, and then interpolate between stored SH coefficients at run-time. It's probably still a memory hog, despite the compression.

I haven't tried to play with it, but it seems like it's along the same lines as what you want.
Joshua Barczak3D Application Research GroupAMD
Quote:Original post by sepul
and make occlusion maps for indoors

You may also want to look at making radiosity lightmaps. They are cheap and look good, especially if you use a good generation tool. For example, in 3ds Max, you can generate the radiosity solution, and then do a Render-To-Texture on the lighting maps. Even better is using Mental Ray to do it, but that takes quite a while.

You can also do directional radiosity lightmapping, where you make three lightmaps, each on a different directional basis so you can do normal mapping as well. Check out the HL2 slides for info on that, if you are interested. Unfortunately, the convienient tools like Mental Ray don't support this, so you would need to write a plugin or something.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement