Sign in to follow this  
danca

rendering equation

Recommended Posts

danca    122
Hi. There are some fundamental concepts that i can't figure out... I'm working on a raytracer and the geometric part i understand but when it comes to implementing lightning i'm stuck. I've done phong but now i want to move on to more realistic rendering. From what i've understood I need to somehow approximate the value of the rendering equation by some numerical method. Part of the equation is a BRDF. But what i don't know is how the value of the equation gives me the final pixel color? And what is the BRDF returning? A float, rgb, spectrum? And is there one BRDF for every object or several? Suppose i calculate the rendering equation and it returns the radiance, how do i get the final pixel color? I feel quite comfortable with the math i just don't know how to bring it all together... Thanx / Daniel

Share this post


Link to post
Share on other sites
timw    598
the rendering equation is for monocromatic light. thus you evaluate it once for the red green and blue components. it is a vector integral equation. the BRDF is the bidirectional reflectivity of the surface at the wavelength you're evauluating. so it usually has 3 scaler components

BRDFred, BRDFgreen, BRDFblue so you'd need to evaluate the rendering equation for each component. and of course the radiance has three components R,G,B in essance

Lred(x,w) = INTEGRAL(BRDFred(x,w,w')*(n^w')*Lred(x,w')dw') where n is normal and w' is the incoming direction and the integration variable.

it's the same for green and blue.

to make complete clear,
Lred(x,w) is the radiance leaving surface point x in direction w
Lred(x,w') is the randiance entering the surface at x from direction w'

Tim

Share this post


Link to post
Share on other sites
danca    122
Thanks for the reply, now i understand a little more but still there are some things...

Let's say i have a BRDF that i can evaluate and the surface normal at some point and the incoming/outgoing directions. How do i get the radiance entering the surface (Lred(x,w'))? Is that a light property?
And suppose i calculate the radiance leaving the surface at some point how do i compute the pixelcolor at that point?

Share this post


Link to post
Share on other sites
timw    598
hmm lol you hit it on the nail lol. evaluating that is the heart of lighting. there are many ways. path tracing is one. Lred(x,w) can have within it light coming directly from the light, and also light bounced other surfaces. the stuff coming directly from the light is called direct lighting. and it is usually evaluated seperatly. commonly monte carlo integration techniques are used to solve it. path tracing and the like. direct light is usually evaluated seperatly using a surface area paramaterization. look up direct lighting, and accurate integration of diffuse area lights. I'd explain more, but I think if I tried the post would explode. it's probably better learned in a book. definitly look up:


monte carlo integration
path integrals, path tracing
photon mapping
importance sampling


the surface area paramaterization works kinda like this

dw' = dA*(n^-w')/r^2

you're converting an integral across the hemisphere to an integral across the surface of the light. this is commonly solved with monte carlo integration. this would give you direct lighting. but you can also integrate the thing using the original hemisphere form, but it's better to treat direct and indirect light seprate. it's more efficent.

Tim

Share this post


Link to post
Share on other sites
danca    122
And here i was thinking that this was something i could easily implement over night...

The pbrt book does look really good. I'll be visiting amazon shortly.

Well, thank you guys for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this