In this week-end, while I was waiting for Matt’s photon mapper refinements in order to avoid code duplication, I also started to code another extension to the Render Internal: Bidirectional Monte Carlo Path Tracing that will allow, for the most exigent users to fully resolve the rendering equation with a controlable error bound :), that’s pretty similar at
what Indigo and Kerkythea do.
Fig. 1 – Path traced image generated in blender internal
The world of CG is very complex and broad, and that ‘s good , because it aims to model both the reality and the surreality. For that reason there’s no single render set up that works for all cases you want to make, that ‘s why having a full featured render at hand is very important.
Many times I’ve found in the topics (though some hate them, they are by no means useless, people always need to compare, and things always change): Speed vs Accuracy vs Quality vs Realism vs NPR vs Biased vs Unbiased vs Tools vs Artists and so. All of them are terms in the life equation and together form a balance: In spanish language there ‘s a phrase named the BBB phrase:
“ Bueno, Bonito y Barato no existe ”
“Good, Beautiful and Cheap don ́t exist together”
(like “Cheap, Fast and Good, pick two”)
While in real life there are lots of examples of the contrary (Linux is BBB , and of course our beloved Blender is BBB and have done a BBB movie 🙂 ), the deep meaning of that phrase is that in all the cases of correlated variables, as you gain in one value you loose in the opposite. In order to gain Speed you need to sacrifice Quality and Accuracy. Realism is not always a goal but has driven the CG industry and is the engine of its development. NPR are free expressions in CG, they allow the artist to express himself the way he/she want or only represent the essential of a thing like cartoons (Freestyle is a big plus for Blender)
Many artist subvalorate the so-called Intelligent renderers, like photorealistic ones (VRay, Mental Ray,Final Render, Brazil,Indigo,Kerkythea and so) saying that those renderers accommodate artist to not learn the foundations of illumination and composition since the must dumb set-ups look cool on them. That ‘s not necessarily true, intelligent renderers free the artist of low level tasks and instead they could focuse themself on the real artistic side. Everytime men are freed of low level task, higher arts and sciences could be done. Of course, foundations will always be valid, and smart tools in wrong hands will do less than dumb tools in experts hands. But there ‘s a subtle detail often forgotten: the tools do matters in the artistic expression, one idea will be differently expressed with different tools and materials and will have different impact on the receptor according with that (my father is an oil painter, my sister is a skilled drawer). It’s the artist who creates the masterpiece and with same widespread general tools the final result will depend on the artist only, but it’s the tool that time-wise limits/casts the artist expression capability (doing the joconde with paint instead of gimp or photoshop is indeed possible for an real artist, but how long does it take and how constraining is it (no layers for precise control, no gradient system > very rigid)?)
Biased vs Unbiased renderers: Here I will make a little stop because there ‘s a lot of confusion about those terms: Simply put, unbiased means that on average, the results of the render will converge to the correct solution (averaging any number of 1 sample per pixel, unbiased renderings will converge to the correct image), that ‘s why unbiased renderers are always taken as references for quality control because their results will tend to the correct solution if the inputs are correct or at least the same as the other compared rendering methods. Unbiased renderers try to fully solve the rendering equation, a very intuitive equation but is a monstrosity that involves infinities at whatever side you look at because nature is unlimited 🙂
And the better way to solve with a desired accuracy such equation are through Monte Carlo methods. So typically the error in those renderers are bound to noises. On the other hand, biased renderers make a series of simplification to the rendering equation to gain speed: deterministic raytracing (Blender already has one) doesn ́t account for diffuse interreflection effects (GI), caustics and so. Deterministic Raycasting (Volumetrics) , in development for Blender adds another term of the rendering equation to the simplificated raytracing equation, Photon mapping (In development for Blender 🙂 further extend the capabilities of deterministic raytracers to include GI and caustics in a biased way: averaging any number of low resolution photon map renderings of caustics will not converge to a sharper correct caustic .
The advantages of Intelligent designed biased renderers are that pushes the speed without loosing to much in accuracy nor in quality. But the brute force unbiased renderers will always be the rule to measure them as raycasting is the rule to measure all the others volumetric rendering methods (Shear warp,splatting,3d texturing and so) and always will bring up at no cost all the real life behavior of the light.
So this weekend, for learning purposes, in order to stress the flexibility of Blender render design and trying to set up a comparison rule for the photon mapper since I have found some artifacts derived from the biased nature of it:
Fig. 2 – deterministic artifacts of caustics in photon mapping
I started the implementation of a Bidirectional Monte Carlo Path Tracing inside Blender, and I was happily surprised how “easily” blender can be extended with it. Of course, currently blender doesn ́t have any physically correct material type (perhaps soon will have it) so putting the wrong input lead to “A correct answer to a wrong problem”.
But still, as a proof of concept and as a future possibility it will be useful to have integrated in Blender a Path Tracer, those kind of renderers have their own user base that currently blender lacks and also the Path Tracer fully complete the missing terms of the rendering equation so there will be minor features that blender Render Internal will not have compared to ANY renderers over there . One of the good things of being a CG programmer is that once you know a little about the underlyings of how CG work you realize that many of the marketing features that sell a product come at a very little cost (I don’t mean they were trivial to program, sometimes the simplest of the algorithm involves years of research/development !! ). Here is a small list of the features that came for “free” in Monte Carlo Path Tracing
rendering algorithms simply by performing random samplings and recursions:
• Sampling a pixel over (x, y) prefilters the image and reduces aliasing.
• Sampling the camera aperture (u, v) produces depth of field.
• Sampling in time t (the shutter) produces motion blur.
• Sampling in wavelength λ simulates spectral effects such as dispersion
• Sampling the reflection function produces blurred reflection.
• Sampling the tranmission function produces blurred transmission.
• Sampling the solid angle of the light sources produces penumbras and soft
shadows.
• Sampling paths accounts for interreflection.
(All of them are the flashy features of any unbiased renderer 😉
So, Imagine the day when you could fully solve the rendering equation in Blender without going out 🙂 ! Off course, none of these are finished in a few days, remember the BBB phrase, and also I’m currently on Volumetrics (priority) and Photon mapping, I can’t promise anything yet , I’m just giving some advances of my development line in the Render module that will be toward fully resolve the rendering equation with Blender render internal.
This is also an ambitious project like volumetrics so help is very welcome, I have a lot to learn in the process and as always my main slowdowns are the unknowns of Blender inners that hope will be less and less over time . In the process many subgoals should be met (some of them by me, some of them by others). I just coded a draft for test viability and here are some renderings showing only GI, the main use case of unbiased renderers are Archiviz, stills, referencing, etc.
Note: these pictures are direct output of the Path Tracer, no previous render algorithms or filters were performed
Fig. 3 – 10 samples per pixel (spp) – render time: 4.35 s
Fig. 4 – 100 spp – 34 s
Fig. 5 – 1000 spp – 5 min 34 s
Fig. 6 – 4000 spp – 22 min
Fig. 7 – 10000 spp – 56 min
Fig. 8 – 100 spp – 44 s
Fig. 10 – 4000 spp – 28 min
As always I hope you like it
Raúl Fernández Hernández (Farsthary)
Leave a comment