Going Native 2012 videos are now up!
I was looking to see if there were any new books out based on C++11. I didn’t find any, as its still early (Guess we’ll have to give it a year or two), but I did find these coming out next year. Thought I’d share.
Effective Concurrency in C++ – Herb Sutter – 28 June 2012
Speaking of C++ – Herb Sutter – 28 June 2013
C++ Programming Language – Bjarne Stroustrup – 28 January 2012
C++ Templates – David Vandevoorde & Nocholai Josutti – 28 August 2012
The C++ Standard Library – Nocholai Josutti – 28 April 2012
( Dates retrieved from www.BookDeposity.co.uk )
I’m personally looking forward to the new editions of the “The C++ Standard library” and “C++ Programming language”. Going by this though, I wonder just how much code will actually compile in VS when they do come out ( assuming they are using C++ 11 )
Today I added photon tracing. Its only Caustic photons at the moment, but the improvement in speed and visual quality is much better now, and I’ve still yet to thread the 1st pass photon generation stage. As mental ray does, I only trace photons at geometry in the scene that reflect or refract, to save on wasted caustic photons. This is done by querying for all geometry with a specular type material, retrieving their AABBs and then shooting photons from the lights at these boxes. A lot of geometry really doesnt get bounded very well by AABBs, such as the teapot below, so I also added the option to keep shooting photons until the target count is matched, as opposed to just storing the ones that do hit. This takes a little longer, but it means less fiddling with the multipliers to get descent results.
The images below all use point lights.
Update to FG. I decided to use the noisy AO results of computing the FG points after all, its not that bad when I also include the view/ray intersection points. The image below shows this update. The scene is from a Digital Tutors tutorial DVD.
Update to FG. The sample points are now based not only on view ray intersecitons, but also points layed out on the geometry (back face culled). This produces nice results as you get more points in complex areas, and the distribution increases as the rays form more grazing angles to the geometry. There are still some artifacts though, and this is based on the points being uniformly placed, and patterns can be seen in the interpolation. Hopefully some randomness will sort this out. I also tried using ambient occulsion to create a buffer which can be used to distribute points. It worked great, but is just very slow to compute. If I reduce the samples, then a get a more noisy buffer, if I reduce the resolution of the buffer then I get other artifacts showing up. Im still going to play around with it some more and try to reach a good compromise.
Some early renders using my Final Gather implementation. The first shot is of just the indirect illumination with no interpolating. The second shot is with interpolation of 3 points, and the third shot with 10 points. The final shot is with the direct illumination too. You can see the FG points Im sampling in the the top viewport (the green points), which currently are uniformaly sampled at across the viewing plane (using a ration of 1/5 to pixels in the shots below). Unfortunatly, even with many FG points and a lot of interpolation the results still contain noticeable low frequency noise. Hopefully this will be reduced by importance sampling the FG points as opposed to unformly distributing them.
Added environment maps to be using as enviroment lights. Again, without enough samples, the results are quite noisy. Once way around this could be to use a blurred version of the map, such as using a lower level mipmap, another way is to importance sample the image, but this only seems to work well for low frequency maps. However, it does produce more interesting and realistic lighting, especially with reflective materials.
I added the functionality to bring in meshes using my 3ds Max exporter to render more interesting objects. This also meant introducing an acceleration structure due to the number of triangles. I implemented both an Octree and a kd-tree, both work well but the kd is more efficient and renders slightly faster, as its nodes are implemented using only 4 bytes, in a fixed array, as opposed to a linked list, so they’re a lot more cache friendly. I also implemeted the recursion using a while loop instead of stack recursion which provided a little improvement too.