Raytracing & Global Illumination

Started by
9 comments, last by desert-eagle 13 years, 7 months ago
Hello,

I have a "simple" raytracing program (by simple I mean direct lighting only).

I want to add Global Illumination, but I don't know where to start ?
photon mapping ? path tracing ? ...

I found some documents and discussions on other forums, but it looks difficult to understand.
I'm scared of all the integrals and other maths I saw in these documents :)

do you have any advices, or links ?

Advertisement
I would consider path tracing the easiest algorithm to start with.
(Or maybe non-recursive distribution ray tracing, but that's not really global illumination.)

I don't know any web-resources that would really explain these algorithms well, therefore I recommend you buy a good book (e.g. this one).
Conceptually all Monte-Carlo GI-algorithms are not so hard, but to get the weighting right you need the math behind Monte-Carlo integration and radiometry.
And (IMHO) this is best explained in a book.
Henrik Wann Jensens's book on photon mapping is one of my favorites. Even if you end up not using that technique, his explanation of the rendering equation is the best I've found.

Thank you,

I may buy PBRT, if you say it's a good book and path tracing is easier to start.
the other book seems to talk more about photon mapping.

There is a very simple MC pathracer in 500 lines or so of C++ here. Source and executable are linked off the page.
I agree about Path Tracing: it is often considered the easier way to add GI, because is kind of an extension of recursive raytracing, where at each intersection you randomly sample the whole hemisphere instead than sampling just the lights.
Notice that it is also the slowest algorithm, and converges very slowly in specific cases.

PBRT is a wonderful book (I have the first edition and I am considering buying the new one), but it is full of math so be warned. I have still to implement GI in my RT, but when I will add it, I will start with Path Tracing or Irradiance Caching (less 'correct', but way faster).
Existing source code are good to understand some part, but it's not enough and sometimes difficult to read.

I was more looking for a tutorial, like the other good tutorials you can found on basic raytracing.
I'm not looking at speed at the begining, I want to understand the concept of a the simplest global illumination algorithm and how to implement it in my raytracing program.

but if I have to deal with maths, I prefer to buy a good book.
PBRT explains well all that you need to implement Global Illumination ?
or it assume you already know some part of it and only explains it's own implementation of the algorithms ?
Quote:Original post by cignox1
I agree about Path Tracing: it is often considered the easier way to add GI, because is kind of an extension of recursive raytracing, where at each intersection you randomly sample the whole hemisphere instead than sampling just the lights.
Notice that it is also the slowest algorithm, and converges very slowly in specific cases.

PBRT is a wonderful book (I have the first edition and I am considering buying the new one), but it is full of math so be warned. I have still to implement GI in my RT, but when I will add it, I will start with Path Tracing or Irradiance Caching (less 'correct', but way faster).


indeed, just find a nice random-direction-in-hemisphere function, and add an average of a loop of RayTrace(Hitpoint, RandomHemi(HitpointNormal)) together. instant global illumination (well, instant in code, not in execution :))
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Quote:Original post by alvaro
Henrik Wann Jensens's book on photon mapping is one of my favorites. Even if you end up not using that technique, his explanation of the rendering equation is the best I've found.


I'm reading this book now on your recommendation, and I love it! Cheers.
Quote:Original post by YogSothoth
PBRT explains well all that you need to implement Global Illumination ?
or it assume you already know some part of it and only explains it's own implementation of the algorithms ?


It is more a reference book than an introductory guide. Actually, its chapters structire is far from what you can found in a tutorial, in that every chapter does not build up on the previous.

For example, when they describe the material concept, the first introduce their BRDF implementation. But its use is described later, in the 'Materials' chapter. In addition, some functions are left away, until the sampling chapter. So to understand the Materials you have to search all the related informations among several chapters (there are pointers on the page though).

That aside, it is a wonderful book nonetheless.

This topic is closed to new replies.

Advertisement