Radiosity : Form Factor Calculation

Started by
6 comments, last by VladR 19 years, 10 months ago
The time has come to start working on Radiosity for our latest RPG game to enhance graphics of the levels. I have read several tutorials/papers regarding this matter and would like to know this: Standard Form Factor equation looks like this: F i,j = ((cosQ * cosR ) / (PI*r2 )) * H i,j * dA j Since all of my patches are rectangular and of same size, can I simply take for granted that Differental Area dA j is equal to 1.0f (dA j = 1.0f) ? VladR Avenger 3D game (Last update MAR-26) [edited by - VladR on May 28, 2004 4:28:36 AM]

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

Advertisement
Probably. Try it, and you''ll see if it works. =)

LizardCPP
No. Just because all of the areas are the same does not make them all 1.

The area needs to be calculated. When it is divided by r^2 (in your formula), this normalises the form factor by removing dependency on your units of area.
hi..

This simplification of the formfactor(btw: its not a standard)
Its easy because you treat the areas as really small, compared to distance (your ''r''). And dA means deltaA and its no more differential! So yes, it should be one. I guess H_ij means visibility.

If your areas have all the same size you can use a interessting proberty: F_ij*Ai = F_ji*A_j ...so F_ij = F_ji, dont know if this holds for the simlification.. you sould try...

And dont forget to clip the formfactor to 1 !!!! Thsi is essential!

Im currently trying to get my hemicubes solver running.

regard.. tobes
quote:Original post by bakery2k1
No. Just because all of the areas are the same does not make them all 1.

The area needs to be calculated. When it is divided by r^2 (in your formula), this normalises the form factor by removing dependency on your units of area.

OK, so I`ll just replace dAj with the area of the quad then ? Now I think I understand it - if I take a look at the equation again, square units of area (dAj) are divided by r*r (also in square units). Then I finally get the dimensionless form-factor ! Had I written it down on a paper, I might have realized it sooner (that I`m left with square units of r*r if dAj=1.0f), but thanks for clarification ! I was mistaken by article "Radiosity in English II - Form-Factor calculation" where the author indicated that if patches are of same area, dAj = 1.0f. Nevermind, I understand this now.

quote:Original post by gsus
And dont forget to clip the formfactor to 1 !!!! Thsi is essential!
Hm, I don`t understand why. I thought that all form-factors related to any patch should sum up to 1.0f. Shouldn`t all form-factors be very small, like 0.0001f ?

VladR
Avenger 3D game (Last update MAR-26)

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

quote:Original post by VladR
quote:Original post by gsus
And dont forget to clip the formfactor to 1 !!!! Thsi is essential!
Hm, I don`t understand why. I thought that all form-factors related to any patch should sum up to 1.0f. Shouldn`t all form-factors be very small, like 0.0001f ?



I´ve forgott to think about it before writing. But take the cornell box for example.. one box stands near the floor.
lets say d=0.5 or even smaller. Your patches are above each othera and the are is 1.

your F_ij will become 1/(0.25*pi) which is greater one!
Yes formfactors should be sum to one... but in this case only one is greater than 1. And if d is nearly zero (if you want to place the box really close to the ground) F will go to infinity!
Thats the problem with simpification: its faster but introduces some errors.. if you clip, you´ll get good results either.

AFAIK the standard hemicube solver doesn''t involve form factors in any way: you simply compute patch radiosities (ie. the amount of light arriving at a patch) iteratively on each patch. Or in English, you render a hemicube view from each patch, multiply each hemicube pixel with a corresponding factor (based on the hemicube resolution, too, of course) and sum them up.

Of course one *can* extract form factor data out of the hemicubes, but I see no (trivial) use in it.

- Mikko
quote: ..multiply each hemicube pixel with a corresponding factor...


This is the formfactor with spherical normalisation, which is easy to calulate for an hemicube. And you only have to calc it once!
You also could estimate the FF by storing the poly ID aswell and accumulate the precomputed FF`s by poly id''s. ...if you want.

I hope to get this running soon. Currently thers nothing too see...

This topic is closed to new replies.

Advertisement