# rendering equation

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

## Recommended Posts

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 on other sites
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 on other sites
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 on other sites
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 on other sites
If you really want to learn this stuff, the best thing you can possibly do is buy this book:

http://www.pbrt.org/

##### Share on other sites
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.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633287
• Total Posts
3011217
• ### Who's Online (See full list)

There are no registered users currently online

×