|
|
Hello,
An idea popped into my head about implementing a simple toon shader in
POV-Ray (actually, just outlining the object in the scene with a black
outline).
What I was trying to do was the same thing scanline renderers do when trying
to fake this effect - take an object, translate the vertices along the
normals a bit, then apply a black diffuse- and specularless texture to it.
This makes only the interior (or backside) of the object visible and
transparent while looking at it square-on.
So I thought I'd write up a simple scene, containing an outlined sphere,
using something like this:
[...]
sphere {0, 1
texture {pigment {color red 1}}
}
sphere {0, 1.05
texture {pigment {color rgbt 1}}
interior_texture {pigment {color rgb 0}}
no_shadow
}
[...]
Intiutively, this means that the front side of the outer hull would be
totally transparent while the interior would be completely black. The only
problem is, when i added a pure white background, the radiosity calculation
skipped the whole of the inner sphere when calculating ambient lighting -
resulting in the very same rendering as without radiosity.
Anyone know how to modify the textures in this scene to make radiosity work?
I tried raising the recursion_limit, but i guess it only handles reflections
and doesn't take transmitted rays into account.
Thanks,
-Klemen
Post a reply to this message
|
|
|
|
Hi Klemen,
The problem is that the interior texture isn't transparent at all (at least
to POV-Ray...if you change it to:
interior_texture {pigment color rgbt <0, 0, 0, .5>}
then your radiosity will show through. The PROBLEM is, then your black
outline doesn't really work.
I did try translating the "inner" sphere by <0, .06, -.06> (i.e., towards
the camera) and it looks good, but that might not be the best solution. It
works for the sphere, with this particular camera, at least. Maybe a macro
to move things toward the camera would make it a viable answer?
Good luck!
~Dale
"Klemen" <She### [at] emailsi> wrote:
> Hello,
>
> An idea popped into my head about implementing a simple toon shader in
> POV-Ray (actually, just outlining the object in the scene with a black
> outline).
>
> What I was trying to do was the same thing scanline renderers do when trying
> to fake this effect - take an object, translate the vertices along the
> normals a bit, then apply a black diffuse- and specularless texture to it.
> This makes only the interior (or backside) of the object visible and
> transparent while looking at it square-on.
>
> So I thought I'd write up a simple scene, containing an outlined sphere,
> using something like this:
>
> [...]
> sphere {0, 1
> texture {pigment {color red 1}}
> }
>
> sphere {0, 1.05
> texture {pigment {color rgbt 1}}
> interior_texture {pigment {color rgb 0}}
> no_shadow
> }
> [...]
>
> Intiutively, this means that the front side of the outer hull would be
> totally transparent while the interior would be completely black. The only
> problem is, when i added a pure white background, the radiosity calculation
> skipped the whole of the inner sphere when calculating ambient lighting -
> resulting in the very same rendering as without radiosity.
>
> Anyone know how to modify the textures in this scene to make radiosity work?
> I tried raising the recursion_limit, but i guess it only handles reflections
> and doesn't take transmitted rays into account.
>
> Thanks,
>
> -Klemen
Post a reply to this message
|
|