• ### Popular Now

• 11
• 14
• 19
• 27
• 9

#### Archived

This topic is now archived and is closed to further replies.

This topic is 5723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi, unfortunately, for all articles i´ve read even though the one you suggested me, i have failed to understand completely to put the theory in praxis. the form factor calculation would be no problem for me, i have decided to to this using ray tracing since the explanation about hemicubes totaly confused me. but i have a problem with gathering the energy transfer. i have used some code like this, only on coplanar patches, ignoring form factors for now:

// initialize all patches, setting emission of all of them to black except for those that act as light sources. set a reflectance coefficient to some value between 0 and 1

for (each patch i )
if patch i is a lightsource then
set emission to some nonzero value
else
set emission to zero
reflectance of patch i = some value between 0 and 1
incident light = 0
excident light = 0
end

// now gather energy transfer  between patches:

while not ok
for (each patch i)
sum_excident = 0
for (each patch j != i)
add excident light of patch j to sum_excident
end
patch i incident = sum_excident
patch i excident = emission + reflectance * incident
end
end

this code works not well. actually, patches that are intially light sources become black and vice versa! and if my mesh has a greater resolution, i need more passes to get the same level of illumination. can someone aid me to get it working? i just can´t get things out since almost all articles were very opaque to me. thanks Gammastrahler

##### Share on other sites

there is all necessery information you could need for a halfway decent radiosity processor...