POV-Ray : Newsgroups : povray.binaries.images : Multi-pass rendering and compositing in POV-Ray : Re: Multi-pass rendering and compositing in POV-Ray Server Time
31 Jul 2024 00:22:03 EDT (-0400)
  Re: Multi-pass rendering and compositing in POV-Ray  
From: Mr
Date: 9 Mar 2011 10:35:01
Message: <web.4d779d2c6b0cef9b926cc9f10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> OOC, what exactly is the ambient occlusion pass used for? After all, the
> global illumination effect should already be accounted for by the
> radiosity pass.
>
> AFAIK, in shader-based render engines, AO is used to get self-shadowing
> right, and/or to /fake/ global illumination.
>
> So I guess what you're doing there is actually just deepening the
> shadows for artistic effect, and might better be served by tone mapping.

AFAIK, Ambient Occlusion is used to gain some render time and flexibility rather
than realism. In Mental Ray for instance, Photon mapping and Final Gather are
helpful to generate faster some color bleed, and global indirect light. Yes in
theory, you get more realistic lighting if you let photon mapping do all the
job, but in practice this makes the render time too long, so it is advised, in
most Mental Ray training material, to use Both (photon mapping + Final Gather)
and Ambient Occlusion together in a synergy, using the final gathering radius to
set up some degree of smoothing that depends on your AO distance: This way,
Photons+FG generate overall lighting, whereas self shadowing which happens at
smaller scales is left out of it thanks to Gather blurring and sparser sampling
but is simulated with Ambient Occlusion, rendered much faster than photons or
gathering would require to reach. So to some it up and anyone correct me if I'm
wrong,

Final Gather (wich in mental ray can also be used without photons) takes on the
widest scale, and Ambient Occlusion takes care of much smaller shadows.

In the process, if some photons are shot, some details can be added locally with
photons targeting from lights, importance, portals, various techniques, to get
also more small scale effects like luminous caustics (whereas AO only emulates
ambient shadows.

Being a pragmatic observation rather than lab approach, I would think of AO as
the opposite approach to unbiased techniques, where instead of calculating
indirect light for unspecified times towards some configuration that is the most
specific to your scene, you start by what is common to almost every scene, and
decide that some part of the light bounces so much that it will end up
contributing to all of a set to some degree and since it can happen all over the
place it's initial directions doesn't actually matter that much, so AO focuses
on shading places where light definitely wouldn't reach, which is contact
between surfaces and very acute angles. The important thing being that you can
tweak overall contribution of that ambient light by intensity of shadows and by
distance at which it extends far from the object casting it. Once it's decided
that this contribution is not zero you switch on AO and tune the frequency and
intensity of your other indirect lighting  features accordingly. This leaves
much more sampling budget for local effects.

It is often said that AO is not phisically correct, but I'd say that for a
uniformly and very thickly overcast sky with no lights around, then only AO
would be correct. Or the light cast by surrounding sky of some clear night.

So when you consider that you actually don't use AO by itself but only to take
care of some part of the light, you realize that this lighting component is to
various degrees present in almost every scene.

There are also other uses of AO like to bake it and use as a basis for dirt
maps, mask to mix different materials and many textures to process further.

Sorry if nothing of the above answers your question or if any of it is wrong, it
mostly comes from memories of CGSociety discussions, and I'm not a hardcore
programmer/scientist.

@Robert McGregor, Even If AO does not get implemented further into POV, I'm much
interested into any tutorial you could make and would love to include pov passes
to our Blender 2.5 to Povray exporter because Blender compositing pipeline is
quite capable and that's an area where both software would best synergize.
Thanks for your efforts.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.