Lambda Spectral Path Tracer

Started by
14 comments, last by Bacterius 11 years, 5 months ago
Amazing!!!

So, could you get a rainbow by shooting a ray of light through a prism?
Advertisement
@slayemin: Essentially, yes. But there are some problems, in particular the light beam must be very small to clearly see the rainbow, and since right now the path tracer only supports forward rendering (from the eye) it is too difficult to deal with small light source. Using bidirectional path tracing, it will work (when I get time to implement it).

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

The other fun part is decomposing light into its components so that you can apply Snells law of refraction. It's would increase your rendering time by a lot, but that can be alleviated by running mulitple threads or distributing the render jobs across multiple computers.

When I wrote my proof of concept, I defined light as a series of wavelengths and then looped through each wavelength and matched it to a color table. Thus, you could have pure white light, use chemical light sources like an argon, neon, or sodium, and simulate the spectral diffusion. Cool stuff! I can send you details if you're interested.
@slayemin: it's what the code is doing, actually smile.png the color-matching curve is in cie.cpp and for each sample I iterate over every wavelength in the visible range at 5nm intervals.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Looks very good. :) How many samples did you use for those images? Hours seems a tad long, even for those BRDFs; are you using explicit light paths? How many rays/s?
@Guest: 512/1024 samples were used for each of those, and each sample includes 81 wavelength samples. I do not use explicit light paths yet (which explains the high sample count), only implicit ones. As for rays per second, I never really measured them, it really only makes sense when you are targetting realtime I guess, but you can measure it from the time taken. For instance for the cup picture, I averaged approximately 1.15M rays/s (i.e. ~300k per thread). Not very optimized yet..

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement