![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
DevMaster Editor
Join Date: Jan 2005
Posts: 54
|
Radiosity and BSP-Tree Rendering
Author: Samuel Ranta-Eskola Description: This article gives an overview of how the radiosity algorithm (a lightning model) works and focuses on how BSP-trees can be used to optimize the calculations. Reply to this post for any comments/suggestions/questions. |
|
|
|
|
|
#2 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Hi,
I read this tutorial and I found it very interesting. I have implemented a BSP with PVS compiler for my game engine and I was interested in adding pre-rendered lighting to it. I think I understand what I have to do to transfer the energy from one patch to another, but I'm not sure how to divide my level into patches and how to render my scene after the radiosity calculations... This really doesn't say much about rendering with the RADIOSITY changes... Code:
Is there an article on this too? I would really appreciate your help. Thanks, George Faraj FX-Legends |
|
|
|
|
|
#3 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
i don't think there is one yet. someone might start to write one now though... maybe you want to write one after you've done some research and implemented your renderer ???
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#4 | |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Quote:
|
|
|
|
|
|
|
#5 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
Samuel Ranta-Eskola obviously implemented such a renderer. i do not know if he checks the forums regulary. if so he might be willing to come up with another tutorial
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#6 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Yeah.
Samuel, on what should I base my patch divisions? I have read an article on a LOD system called ROAM and it shows how to create patches of my polygons. Could this be the same method, or is it totally different? About rendering, how are the radiosity values applied to the textures? Thanks. |
|
|
|
|
|
#7 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
probably apex still has his mail address...
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#8 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
I sent him an email through his profile and asked if he would please look at this discussion. I hope he has a chance to read it
![]() What's the difference from radiosity and shadow mapping? Is it almost the same thing? Thanks. |
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
|
Quote:
He will He is always around ![]() If you go to the article and click on the author’s name, you'll get Samuel email address... anyways here is his email; as I recall he is a member here. samme(AT)starbreeze.com ' just substitute (AT) with @ Once you email him, please kindly ask him if you could reply here in the forums instead of just emailing you the answer... There might be other people having the same question...
___________________________________________
"What ever happened to happily ever after?" |
|
|
|
|
|
|
#10 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Thanks
I already sent him an email, and would not like to get on his nerves sending him another one :P I didn't give him my email, so I'd guess he will post here. |
|
|
|
|
|
#11 | |
|
Senior Member
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
|
Quote:
No problem. FYI, if you sent him an email via the forums, whatever email you registered in here shows up in his email.
___________________________________________
"What ever happened to happily ever after?" |
|
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jan 2003
Posts: 868
|
Don't worry guys, Samuel will answer.
He always gives detail descriptions and explanations over the stuff. I've send him some questions regarding the BSPs once and he was kind enough to explain me how stuff actually are. |
|
|
|
|
|
#13 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
![]() |
|
|
|
|
|
#14 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Anyone know if Samuel knows we're asking questions?
|
|
|
|
|
|
#15 |
|
New Member
Join Date: Sep 2003
Location: Uppsala, Sweden
Posts: 8
|
Hi guys
Sorry that it took me a while before I saw this thread. I've just switched jobs and haven't been in here in a while. You are always welcome to notify me on krassa@hotmail.com if new questions has come up or if you want to ask me something ![]() Anyways, I'll do my best to answer your questions. I implemented a fully working radiosity renderer, but I found my method of approach to be rather clumpsy so I chose to not include it my article. But I can give you all a brief explanation of how I did it, and of other suggestions on how to to it. When I did the renderer the graphic cards weren't as good as they are today (surprise? , so I wanted to keep shared vertices between the polygons. This is not necessary today. That makes it a lot easier to distribute the patches in the scene. A short algorithm on how to allocate patches would look like this:Code:
In step 1 we decide how finely grained the lightning is going to be, the bigger resolution the longer time the rendering will take and the more memory the lighmaps will consume. I think I went with something like 25x25 cm. Remeber that bilinear filtering makes it better looking. Step 3 is the tricky part. How do we fit a polygon into a lightmap? When I did my renderer I unwrapped a whoole mesh onto a lighmap, that was tricky!! If you go the easy way and just consider the polygon to be twodimensional and put it on the light map it's not a big problem. Remember to write a good allocation manager for the light maps, otherwise you'll waste a lot of memory! You must also remember that bilinear filtering will filter to the next pixel in the lightmap so you must leave some room in between the polygons, otherwise you'll get strange artefacts. If you decide to use shared vertices you can save A LOT of texture memory on the lighmaps since many polygons can lie edge to edge + that you'll problably get a better lightning result. But the first test should be to alloc one polygon at the time. It's a bit hard to describe this, but I've started at least so if you ask follow up questions I think I can clarfiy some points. Step 4 is really easy when you have allocated the polygon. Just loop through the pixels in the the area the polygon covers in the lightmap. For each pixel, calculate world space coordinates of that patch (you can easily do it from the polgyons plane equation). Add the patch to node. Now you got a lot of patches in the scene, start sending energy and then convert the energy in to light values using some good algorithm. |
|
|
|
|
|
#16 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
thanks for the reply
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#17 |
|
Senior Member
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
|
Samuel, thanks for the reply. I do highly recommend that you edit your post and put some spaces between @ sign or anywhere else in your email address just to confuse spammers.
___________________________________________
"What ever happened to happily ever after?" |
|
|
|
|
|
#18 |
|
New Member
Join Date: Sep 2003
Location: Uppsala, Sweden
Posts: 8
|
That e-mail adress is already so f-cked up by spamming that I don't care anymore
![]() |
|
|
|
|
|
#19 |
|
New Member
Join Date: Feb 2004
Posts: 8
|
Samuel, thanks for the reply. I'll try to digest it more later and try to come up with new questions. Thanks a lot
![]() |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|