Jump to content
  • Advertisement
Sign in to follow this  
VadimT

Ray Tracer - Sampling area light & pixels

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello to everyone. The question of the topic is how to better sample pixel locations(pixels) and area lights. Say for example we've got a spherical area light source and we sample it with , say, 32 samples, and this number proves to be sufficient enough. Now I render the image using 4 primary rays per pixels => 4 pixel samples. Thus, 4 * 32 shadow ray will be spawned. thats ok, but when I use 256 area light samples and 128 pixel samples (depth of field), that will give you 32K shadow rays per pixel - that's an astronomical number for one pixel! The second idea is to use same number of samples, namely say 4 primary rays and four area light samples. Then each location of primary ray intersection will spawn just one shadow ray. This method will also affect the way radiance from the light source is samples. The second idea looks preferable until you end up with a large area light, then you have too many primary rays, that should intersect the geometry, for almost no additional quality. Guys, I'm stuck here, I can't choose how to ammend my ray tracer now. Currently it has a nice, transparent sampling architecture, but probably not handling that well in some situations. What are your thoughs on the topic?

Share this post


Link to post
Share on other sites
Advertisement
Well in a raytracer the user has to adjust for these things himself.

A method to make this more intuitive is to allow adaptive sampling of the light source.

The user specifies a min and a max sample rate. Then for each shading sample you fire the min number of rays, and assess the variance. If the variance from those samples is below some user-defined threshold, then you stop shooting. Otherwise you carry on firing rays until the variance is low enough, or you reach the max sample level.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!