• Home
  • Gallery
  • Projects
  • Blog and Tutorials
  • Contact and Biography

Quicksilver Assignments 2-5 post mortem

6/23/2011

0 Comments

 
I’ve been attempting to apply CG315 to the new Quicksilver rendering engine.  Here are my findings so far.
MY GOALS:

1) To go beyond each assignment in some way visually or technically.
2) To build each project around Quicksilver from the ground up, whenever possible.
3) To be sure items 1 and 2 do not conflict, falling back to Mental Ray where necessary.
4) To be able to use Quicksilver as a production renderer for PRJ from this experience.

So why Quicksilver?  Mostly just because I can, but also because I hate Mental Ray with a passion.  It’s slow as a turtle and finicky.  The beautiful images that result from it are not worth the painful iteration stage of Mental Ray projects.  Even draft quality images have been known to take over 10 minutes each on my very modern rig, whereas Quicksilver can do the same scene loaded with every fancy effect in 3 seconds.  Every minute I waste in Mental Ray is a minute I should be animating or polishing.

But if I am to achieve goal 4 I have to work around Quicksilver’s limitations:
1) Quicksilver is feature incomplete and still very young.  In fact the version in Max 2011 is almost entirely unusable.
2) Therefore, I am consigning myself to Max 2012 if I am going to go through with this.  DigiPen does not have x2012 installed as of this writing.
3) There is no raytracing.  At all.  Reflections have to be instanced as dynamic cube maps.  This also limits the number of material types and lighting I may use to achieve certain effects.  Several Mental Ray materials are already emulated pretty well.

-----

Assignment 2: Snowcapped Mountain
Picture
Fairly straightforward with a nice end result.  Two things to note here are the shadows and depth of field in the image.  The deep ridges and subtle shading are the result of screen-space ambient occlusion.  Whereas Mental Ray would require a separate pass or a special material, Quicksilver has a universal dial for it in Render Settings. 

Depth of field is listed just beneath it and is a HUGE strength of Quicksilver.  Mental Ray achieves DOF by re-rendering the scene about 20 times and blurring the results together… very very slowly.  Quicksilver tackles the problem in the same way, but 256 times (by default) at a fraction of a second each pass.  To decrease render time, you can reduce the number of passes.  The above image used forty.

-----

Assignments 3 and 4: Hotsprings
Picture
I did not use Quicksilver for these assignments.  There is a bug in QS regarding material IDs.  Instead of referencing the material ID number, it appears to reference n++ of the sub-object slots in your materials.  This is evident both at render time as well as in the new viewport system.  As I built the file in Max 2011 at school, I ended up shuffling some material IDs around in my sub-object slots.  Max 2012 then produced the result as a garbled mess of material references.  Corners became sides, sides became 4-ways, etc.  At this point I considered it lesson learned.  As QS is still new and buggy, my only protection is to build in x2012 from the ground up.

The QS-powered viewport still came in handy, though.  The Mental Ray lighting system was very easy to preview as I went along instead of waiting over and over again for low resolution drafts.

-----

Assignment 5: Forest
Picture
I am really happy with this result.  This approaches the quality I can get with Mental Ray with only a few renderer-related artifacts and bugs.

As of x2012, Quicksilver DOES have rudimentary support for blend materials (but not composite materials at this point).  There is also pretty good emulation of Mental Ray daylighting systems.  I ran into a problem, however, where the daylight system would break the blend shader for no apparent reason.  The shader would revert to ambient color and stop displaying the textures, although it was obviously still calculating the blend between the sub-materials.  I have not determined why this happens, especially since the mountain assignment used the exact same techniques and systems.  The only work around is to use standard lights when this happens.
Picture
There is a similar issue concerning blend materials and multiple lights.  If using a blend material, shining more than one light also breaks the shader.

In creating the initial ground plane, I found another benefit to Max 2012’s new viewport.  Even though x2011 had hardware shading, it was slow and awful.  In 2012, I can set my viewport shadows and ambient occlusion to exactly that of my final render.  This saved me a LOT of render time when I was using the relax modifier on the displaced mesh as I could see the shading changes in real time.

There appears to be a severe penalty in Quicksilver when rendering a spherified cube.  This is unfortunate, as it is the fastest, cleanest way to make a passably UV’d sphere that I know of.  Quicksilver treats the seams as barriers, causing severe artifacting.  I had to use standard spheres and cover up the polar distortion when making rocks in the scene.
//UPDATE: Fixed as of x2013.
Picture
Upon final rendering, I found what appeared to be stuck pixels on my screen.  They were actually artifacts in the image.  I am in contact with Autodesk to determine the cause.  My theory is it’s inherent to GPU rendering in general.  To go through the pipe as fast as possible, hardware makers allow for an amount of error confident that at most each artifact would appear on screen for 1/60th of a second.  In Quicksilver, these become apparent as multiple passes can hit multiple errors and dump them into compositing.

This was also my first chance to REALLY test Quicksilver as an ambient occlusion renderer.  It’s to be expected that screen space ambient occlusion is inferior to physically based models.  In this case I found out that there is more to Quicksilver’s AO engine than I expected, but there is a bit of weirdness.  On any targets with normal maps, the AO is calculated differently than from diffuse-only.  This works very, very well in screen space with the rest of the scene, but makes Quicksilver fail as an AO-only option against Mental Ray.  Traditionally, we would composite the AO on top of the diffuse render ourselves.  With Quicksilver, the AO and diffuse may not exactly match when rendered separately from each other.  Of course, Quicksilver is built for screen space AO anyway… but this does mean I have to throw out my idea of having fast, cheap AO passes for compositing with Mental Ray renders.  My method of AO-only in Quicksilver is flawed anyway.  Since it does not support self illumination, my AO-only passes contain a small amount of blinn shading that I don’t know how to effectively negate.

BUT!  Mental Ray has an Achilles’ heel.  Take a look.  Can you guess which of the two AO passes goes with each renderer?
Picture
It may surprise you to know that Quicksilver is the top image, and that these were both rendered using analogous settings.  Even though it can support transparency in AO (the tree limbs, grass cards, etc) Mental Ray does not pass that transparency through geometry.  What does this mean?  In Mental Ray, if you have an alpha mapped card near your geometry, you’ll tarnish the AO pass with a square shadow and waste five minutes of rendering time.

It helps to understand how ambient occlusion is handled in each engine.  Mental Ray’s AO is physically based.  It takes your image pixel by pixel and shoots a cluster of test rays out in every direction from the geometry there.  Rays that make it to infinity (or a max distance you define) contribute positively to the brightness of that pixel.  Those that collide take away from that brightness.  In the case of alpha mapped cards, Mental Ray sees the plane and stops without knowing the transparency of the texel it hit, rendering the geometry behind it erroneously darker.

Quicksilver does not support ray tracing and therefore cannot do this form of AO.  It uses screen space ambient occlusion, which is an approximation of physically based AO.  For every pixel on the screen it samples an area of the depth buffer around it.  With a little math, it pieces together how much light-blocking geometry is nearby and from what direction, translating that into how much shadow it needs to place on that pixel.  Because the depth buffer accounts for your alpha maps, your cards do not incorrectly affect the AO render.

In short, for my forest scene Quicksilver has the more accurate AO pass.  And because it is calculated as part of the main render, I do not have to waste time compositing it in an image editor.  Additionally, this method of AO is so fast it adds imperceptively little time to the render, which took five seconds at 1080p.

-----

That’s all for now.  If there is anyone interested in what I’ve provided here that wants to know more on any part of it, just ask.  Thanks for reading!
0 Comments
 





Leave a Reply.

    Archives

    October 2013
    November 2012
    September 2012
    July 2012
    May 2012
    April 2012
    February 2012
    June 2011

    Categories

    All
    Cg
    Digipen
    Quicksilver

    RSS Feed


Powered by Create your own unique website with customizable templates.