Feature Request: Raytracing Radiosity?!

Blender's renderer and external renderer export

Moderators: jesterKing, stiv

Post Reply
f22.raptor
Posts: 0
Joined: Wed Jan 04, 2006 12:59 am

Feature Request: Raytracing Radiosity?!

Post by f22.raptor » Tue May 23, 2006 8:15 am

I was sitting around waiting for a model to finish raytracing, when i had an idea: What if raytracing could do the job that radiosity does?

Instead of having it calculate the faces individually, the faces would act like radiosity lamps! There could be a window in the texture menu (like the ramps menu) with options like "blend" for how sharp, or soft the face's beam would be, or "degrees" for how wide the light would be cast. It would still apply to all the Shadow, or other texture options that raytracing applies to, but since raytracing already applies to lights, and facing with relfectings etc... why not tie them together? With raytracing being such a powerful engine, and cutting the time it took to render shadows by a huge ammount, i thought it would be a very useful and cool idea to have it apply to radiosity as well :D

Let me know what you guys think :wink:

eric.m.forsythe
Posts: 0
Joined: Thu Jun 23, 2005 3:26 pm

Post by eric.m.forsythe » Tue May 23, 2006 5:44 pm

I am not 100% sure that I understand what you mean, but it sounds like you are talking about a Monte Carlo (Photon Mapping, Bidirectional Path Tracing, etc) renderer.

A surface doesn't reflect a "beam" light, but rather distributes the incident light according to a function called the Bidirectional Reflectance Distribution Function (BRDF). A typical radiosity algorithm (which I assume Blender uses) simplifies this so that a surface reflects all incoming light uniformly. Monte Carlo techniques allow for non-uniform distribution of incoming light and, yes, they use a “ray-tracing” like algorithm.

Monte Carlo techniques such as Bidirectional Path Tracing (BPT) extend the idea of ray-tracing. In BPT, rays are cast from the light source(s) as well as from the camera. The rays meet somewhere in the middle to form a path from the light source to the camera. The rays are reflected according to BRDF (or adjoint BRDF) of the surface that they encounter. This allows for the radiosity effects with non-uniform scattering of light. This method can be extended to handle transmitted light as well. It’s a more realistic, but slower algorithm.

Sorry, this probably somewhat confusing.

f22.raptor
Posts: 0
Joined: Wed Jan 04, 2006 12:59 am

Post by f22.raptor » Tue May 23, 2006 9:21 pm

its a bit off my level, im not that far into the coding or programming :P

i guess to simplify it, i can say:

Faces acting as lamps. instead of having to use the radiosity settings, just have the faces act as a lamp. the face would act as the emittor (mabey based on the normals?) and have it react, and create shadows as a "spot" type lamp would.

Image

mabey this helps :P ... i just jurry-rigged this, but its kind of what im talking about. using ray-tracing, or a "lamp" function to have actual FACES emit the light, rather than doing a whole radiosity simulation. then possibly even have the light able to be reflected like a raytracing mirror.

does this help any?

eric.m.forsythe
Posts: 0
Joined: Thu Jun 23, 2005 3:26 pm

Post by eric.m.forsythe » Tue May 23, 2006 11:31 pm

That's what I thought you were saying...

The first thing is that light doesn't generally reflect off a surface in that "beam-like" manner. It scatters the incoming light in all directions of the upper hemisphere. For example, some light coming in along the surface's normal might be reflected at an angle that is 80 degrees from the normal. So, in your example, the reflected beam would always have to be 180 degrees wide. That basically what a standard radiosity algorithm does (it assumes that the surface is perfectly diffused). Of course, you can always scrap the physics of the real world and do whatever you want, but the results are going to be more aesthetic than realistic.

As far as ray-tracing that type of scenario... It might be something like this... Cast a ray from the camera in some direction and get the intersection with the closest surface on that ray. Then, cast a ray from that surface point to every other patch (polygon) in the scene to determine which ones cast light on the surface. The summation of reflected/emitted light of all the visible patches would be the light incident on the surface. To calculate the reflected light of patch you have to cast a ray to every other patch in the scene to determine which ones cast light on that patch, and so on… This is basically backwards from what a standard radiosity algorithm does.

I think what you are trying to do is to put reflected portion of the rendering equation in with the emitted portion. Which you can do if you want, but then you are basically just painting the scene. You don’t need a renderer.

This is probably pretty confusing if you are just starting out. Ray-tracing can do just about everything you could ever want (in geometric optics) if you have enough time and computing power. Hope this make some sense.

f22.raptor
Posts: 0
Joined: Wed Jan 04, 2006 12:59 am

Post by f22.raptor » Wed May 24, 2006 11:22 pm

I dont use a whole lot of raytracing, as i do a lot more modeling than rendering stuff. that does make sence, i guess i was just thought raytracing might speed the process up, as it did shadows, or reflections etc...

thanks for the imput tho :wink:

masterhoshi
Posts: 0
Joined: Sun Jul 09, 2006 1:55 am

Photon lighting

Post by masterhoshi » Sun Jul 09, 2006 1:57 am

This is what Yafray does. This would require a lot of computation I would think and I image it's much slower than radiocity.

Toon_Scheur
Posts: 0
Joined: Sat Nov 06, 2004 6:20 pm

Post by Toon_Scheur » Sun Jul 09, 2006 4:01 pm

I think what f22.raptor means is faking radiosity method. Instead of having the faces emit light, just place a dim light in front of that face. I you want color bleeding, give the different lamps a color. This is done manualy of course....

cessen
Posts: 109
Joined: Tue Oct 15, 2002 11:43 pm

Post by cessen » Fri Jul 21, 2006 3:12 am

I think f22.raptor is just talking about raytraced area lights. Except he wants to be able to make any mesh an area light.

f22.raptor: although you can't make area lights of arbitrary geometry in Blender, you can make rectangular area lights, and the shadows are calculated with raytracing.

Kram1032
Posts: 0
Joined: Thu Aug 17, 2006 10:58 am
Location: Austria (NOT AustrALia)

Post by Kram1032 » Thu Aug 17, 2006 4:24 pm

If you could choose between face-light, dge-light and vertex-light, you could render real bulb light from the right direction... It would be fine, if the amount of Energy was splitted so that it doesn't emit too much...

You could make a filament witch causes light, a glassy blub witch reflects the light and let it through and disort it the right way.... Indoor renderings at night would be more realistic... (the filament would be made from very small edges.)
________________________________________
wild-card character for my future signature!
:D

Post Reply