One of the main takeaways for me at this point is in the drastically increased rendering times for doing direct lighting on the volume. My algorithm for lighting the volume data is O(N^2) in the number of steps that are taken in marching through the volume. Most of the images I rendered for this post had to be done with no anti-aliasing and slightly larger step sizes so that I could get more than two together for the post. Next, I'll document an example of how much longer it's now taking to render a frame.
The screenshot below is a single frame I rendered at 512 x 512 pixels, with 25 rays per pixel. I also decreased the marching step size from 0.05 to 0.03 (the sphere diameter is 1.4 in the same units). This image took about an hour and a half to render. In this image, most of the rays that go out have to march through the volume, so you really get the flavor of the O(N^2) performance.
Here's a quickly rendered video of the rising smoke effect. I think because of the larger step size and single ray per pixel, you see those floating, flipping artifacts.
Below are several images I captured while playing around with the absorption and out-scatter coefficients of the volume data as well as the colors of the four lights in my scene.
Final Animation
My final video is rendered with 25 rays per pixel, and the resolution is 1024 x 1024 pixels. I rendered 1001 frames in all, and the frames took anywhere from less than a minute to over 14 minutes, depending on how many rays had to travel through the smoke volume. Still, I rendered all the frames for the final video, in just about 2 hours! This magic was made possible by using all four cores on each of 35 new computers in a brand-new computer science classroom/lab on the UNM campus for about 1 hour straight. If I hadn't been able to render 140 frames at a time, the video simply wouldn't have been possible.
Here's a link to the full-resolution video. Be warned though, it's almost 25MB.
Full resolution video: video
This video is a "Where's Waldo" of items I didn't have time to complete. Most people will notice that the smoke volume casts the wrong kind of shadow on the ground. Also, when I calculate the color of the volume for a reflection, I'm not marching through it, just treating it like a Blinn-Phong shaded object, and the default surface colors are all set to black on my volume. You can see this just about half-way through the video.
In spite of these issues, I'm pretty pleased with how the smoke looks, and with how my green dielectric sphere looks, and how nice the video looks in general.
Cheers.
No comments:
Post a Comment