From Classical Radiosity to ...

Started by
114 comments, last by HellRaiZer 20 years, 9 months ago
Hello to everyone... Few days ago i finished my first radiosity calculator. I don''t know if my approach is good or how much good it is, but it works for now. In fact, i made it using only the general knowledge a novice, on the subject, programmer can get by reading papers on radiosity. I mean the general idea is that every point in a 3d world is an emitter and a receiver of light!!! That''s my approach. And the implementation is done using raytracing. From every lumel in the world, that has some amount of light to give, shot to every other visible lumel. The amount of light transfered from lumel to lumel is computed using form factors (this is the radiosity part!!!). I know this is not the classical matrix solution radiosity, but this is how i did it. Know, i want to know, if there is any tutorial, or detailed paper on more advanced radiosity techniques, such as hemicubes, or Monte Carlo raytraycing, for speeding up the whole process. And something i read all over the net(!!!). Is real-time radiosity possible????? I saw a course on gameversity (nice name!!!), and some papers on the subject, but no source or implementation on that. So, i must say that i''m a little suspicious on that. I mean, how much real-time, can radiosity calculations be??? Real-time means 30-60 FPS??? And then where someone can put AI, or simple animation, if the most time i spent on lighting calculations??? And in what kind of cpu, can it be real-time??? I mean there is no GPU specific stuff that can help radiosity (i think), so all the work must be done by the cpu!!! Thanks in advance... HellRaiZer
HellRaiZer
Advertisement
First: please stop using so much exclamation (!!!) and question (???) marks :D

>I know this is not the classical matrix solution radiosity, but >this is how i did it.

Not many radiosity algorithms try to *directly* solve the matrix (because the memory consumption can be overly large). But the popular "refinement" kind of algorithms solve this matrix equation, although iteratively instead of directly.

>And in what kind of cpu, can it be real-time??? I mean there is >no GPU specific stuff that can help radiosity (i think), so all >the work must be done by the cpu!!!

To be realistic, you can''t do radiosity in real-time on current machines. Simple scenes (cornell box) might be possible but don''t even dream about processor time left for physics or AI.

Search google for "hugo elias radiosity". Hugo Elias''s article explains the hemicube algorithm for computing the form factors. All it requires is basic scanline rasterizer, so you *can* optimize radiosity using GPU. I haven''t tested that method, but it might be the fastest method around.

- Mikko Kauppila
quote:Original post by HellRaiZer
Is real-time radiosity possible?????

You can use radiosity to precompute the lighting in the scene. Then use this information (lightmaps, just a texture really) to draw the lighted scene. I think Quake2 lighting was calculated using radiosity.
edit: this only works for static lighting.



[edited by - Koen on June 4, 2003 7:35:00 PM]
For "realtime global illumination style images", this might help

http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.pdf

Even though they claim realtime performance, I sure would like to see a demo of this algorithm before becomming a beliver.
Thanks for the link.
I already read it. And despite the fact, that i had no problem with the maths (maybe a little!!!), i didn''t understood the main principles of it. So i can''t use it. And, if i remember right, it can be used for self shadowing only. It doesn''t produce shadows and other stuff. It just lights the model!!!! And if you want a demo, try playing Unreal 2. I nearly sure that it use this technique, for lighting animated models!!!

HellRaiZer
HellRaiZer
Ludde,

http://www.donw.co.uk/shl_exe.zip (5MB)
http://www.donw.co.uk/shl_readme.txt

My Ivanic/Ruedenbuerg SH rotation code isn''t working despite it being what I believe to be an exact implementation of their 1996 (plus 1998 corrections) paper.

When that''s fixed, I''ll upload the source.
Please if you have code, the upload it. I''m very curious to see it. Btw, the demo was impressive. Good job.

HellRaiZer
HellRaiZer
Perhaps I should just add one little note: although SH lighting is currently the new hype technique, and often praised as the ultimate solution for lighting, it is in fact far from that. SH lighting research is still at the very beginning, one have to keep that in mind.

Besides it being a very interesting technique, it has a lot of nice advantages, that''s for sure: implicitly encoding light transfer functions of individual lightsources allow (unlike traditional radiosity *) a fully dynamic light environment with all the nice additions we know from global illumination: interreflections, soft shadows, colour bleeding, etc.

But that''s pretty much where the advantages stop. It has many drawbacks: the most obvious being, that it is a static model technique. It is not applicable on dynamic, moving objects. Yes, you can interpolate (and also rotate) the transfer functions, but the visual results of that are generally bad, especially if complex shadows are involved. So, this limits you to static models - just as traditional radiosity. Compared to traditional progressive refinement or Monte Carlo radiosity, spherical harmonics tend to have much worse quality. The transfer functions just can''t capture the details needed to accurately represent hard and complex shadow boundaries.

That said, research on SH lighting is advancing every day, so those limitations might eventually fade away. Especially the dynamic model issue is under heavy investigation. But with the currently available models, you should ask yourself, if an implementation is really worth it - especially if you already have a working traditional HDRI/radiosity solver. Not to say that SH lighting is bad, there are lots of interesting applications for it. But it is not the miracle solution some people think it is.

*) Note: It is also possible to encode per-vertex or even per-pixel incident-direction dependent transfer coefficients using a traditional radiosity approach. This will also allow a dynamic lightscape, similar to SH lighting, although more limited (and at a higher memory cost). But OTOH, the quality will also be much better. You decide.
Thaks for the demo, very impressive.

One question. Since it only works for static geometry, what about using it to dynamicly light static world geometry?
Wow, I wasn''t expecting many downloads of that thing. I''ve had to take down the original download since you guys were bleeding my bandwidth dry I''ve re-uploaded a 2MB version of the same name but this time it''s without the file-cached SH co-efficients so you''ll have to sit twiddling your thumbs for 30 minutes when it runs the first time. Sorry about that.

HellRaiZer,

I''ll upload the source code in a couple of days on the main page as I''ve just managed to get the Ivanic SH rotation code working. As ever it was an idiotic bug slapping me in the face, I just need to clean the code up now.

Ludde,

yep - that''s one of the ideas: use SH as your first pass (per-vertex or per-pixel) and then do your local lighting for subsequent passes using the regular lighting methods.

Static geometry really isn''t that much of a problem if you take into consideration games like Jak & Daxter: nearly everything in that game is fixed to the ground or walls and it doesn''t bother the player one bit. Neighbourhood transfer and baking of physically modelled movement are now pretty hot research areas (e.g. imagine being able to bump into a tree and have it react accordingly - http://www-2.cs.cmu.edu/~djames/) so they''ll improve the situation somewhat. Skinned characters however are a big problem - you might be able to rotate the SH co-efficients on a per-vertex basis with your bones but it just doesn''t work for the shadowing and inter-reflectance terms.

It''s still incredibly early to see if SH methods will actually turn out to be the next big lighting model to use, but it''s got a lot of people excited. I''m a bit wary of Epic''s recent announcement that they''re using it in their next technology, seems a bit premature. But I do know other companies who''ve been using this technology for the last year and they seem to be running with it.

In short, SH lighting has lots of problems. But it sure as hell impresses to show "real-time global illumination" with dynamic lighting for a relatively simple method (SH rotation excepted .

btw, if you can''t download or run the EXE, here''s a screenshot: http://www.donw.co.uk/dir.jpg

This topic is closed to new replies.

Advertisement