Archived

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

Gammastrahler

Radiosity question

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 this post


Link to post
Share on other sites
Guest Anonymous Poster
have you already read

http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm

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


Share this post


Link to post
Share on other sites