Easy questions about raytracing (lighting/texture filtering)

Started by
4 comments, last by zurekx 15 years, 9 months ago
Just a few simple questions about raytracing. Right now I use Phong in my ray tracer. I'm thinking about using area light sources instead (to get soft shadows). If I use area sources, I don't need the specular term in Phong right? Since that part will be taken care of by the reflections? Secondly, what kind of texture filtering should I use? I don't need mip-mapping right, since I use super sampling? But should I have bilinear filtering?
Advertisement
You'll need phong specular highlight even though you'll use reflection ... because it's highligth, not reflection.

Texture filtering - surely do bilinear texture filtering, then do some mip-mapping and you may try some anisotropic filters, or SAT filtering. If you'd like to do no mip mapping you have to do cone-tracing to solve correctly aliasing of textures and edges.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Thanks!

But isn't highlighting reflections of the light source? I mean I have area light sources, and rays can intersect them, wouldnt that work?

Okey thanks! But doesn't supersampling solve the minification problem? If I send 100 rays through each pixel, would that be kind of "mipmapping" since I would get the average of the texels?
Quote:Original post by zurekx
Okey thanks! But doesn't supersampling solve the minification problem? If I send 100 rays through each pixel, would that be kind of "mipmapping" since I would get the average of the texels?

It helps but it doesn't solve it in the general sense, in that to get the "equivalent" of mipmapping, you'd potentially be needing to send a number of rays through each pixel equal to the number of texels of resolution in the maximum sized texture in the scene. i.e. if you use a 1024x1024 texture, you need to be sending at least 1024x1024 rays per pixel in the worst case to avoid aliasing from texture mapping... ouch!

The general case is not this catostrophic, but it remains true that texture filtering is *much* more efficient than general super-sampling, and thus it is used in almost every high quality renderer.
Quote:Original post by zurekx
Thanks!

But isn't highlighting reflections of the light source? I mean I have area light sources, and rays can intersect them, wouldnt that work?


In the end it is all about reflections and luminaires. What is known as "reflection" in raster-graphics is specular reflection in Realistic Image Synthesis (e.g. Monte Carlo Ray Tracing). What is known as non-reflecting surfaces in raster, is diffuse reflection in RIS.

Perfect specular reflection scatters a light particle of a given incoming direction into just one outgoing direction, while diffuse reflections scatter a particle of incoming light over the whole hemisphere 2*PI*r^2.

Furthermore, in the real world there are no point light sources, they are a hack, have zero area and are thus singularities, emitting no light because of no mass that yields to no energy, and emitting an infinite amount of light at the same time.

If you do Realistic Ray Tracing for quite a while, then you will recognize how much equivalence is in all that stuff. And how many hacks are in Raster Graphics. You will see that Phong is a hack as well (it is non-symmetric, i.e. the incoming amount of light is another than the outgoing amount, which clearly breaks the law of energy conservation).


While I probably haven't given you an answer to your question, maybe the information can help you in general; I am really talking too much. But if you're interested in more, I could invite you too my old blog, which has some links (http://greenhybrid.net/archive) and to the Famous http://ompf.org/forum, a community of beginners and experts (actually many researchers) in Ray Tracing.

Some names to be googled: Eric Veach, Peter Shirley, Ingo Wald, Thierry Berger-Perrin (tbp), Thomas Ludwig (lycium) ... many more (look at ompf)
Thanks for your answers!

AndyTX: Thanks, probably should use it, right now the situation isn't that bad, since I have fairly small textures and all objects are pretty large.

greenhybrid: Thanks :) I know Phong is a hack, right now Im only using the diffuse part of Phong(Lambertian). But suppose I have a (partially)reflective polygon. I also have a spherical light source. I give the light a very very high intensity (not when I calculate the diffuse light, but when a ray intersects (i.e. is reflected) to the spherical light. Isn't this "real" specular highlighting? That the light source is perfectly reflected in the object?

This topic is closed to new replies.

Advertisement