POV-Ray : Newsgroups : povray.advanced-users : Fake shadows in 32-bit images? : Re: Fake shadows in 32-bit images? Server Time
27 Sep 2021 10:17:21 EDT (-0400)
  Re: Fake shadows in 32-bit images?  
From: Bald Eagle
Date: 1 Sep 2021 07:00:00
Message: <web.612f5cf07599ad521f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> Hmm, I was wrong about the object pattern itself-- it *is* actually a
> 3D/volumetric pattern, of the entire object given to it. That's rather neat!

Right.  Essentially, POV-Ray just checks to see if the ray intersection point is
inside the object, and gives it the appropriate texturing.
http://www.f-lohmueller.de/pov_tut/tex/tex_560e.htm

> But
> the box object that I 'projected' the pattern onto happened to have its front
> surface exactly along the x/y plane (before I rotated it), so that's the only
> 'slice' of the pattern visible as the 'shadow.'
>
> So I attempted to 'squash' the object pattern in z by scaling it-- to try and
> get a more complete representation of the original object as the 'shadow'-- but
> that produced no useful result. Seems that an 'infinitely thin' box surface
> would require an infinitely-tiny depth-scaling of the object pattern, for the
> *entire* object to show up there.

What you can do is take the object and make it into an isosurface, then use that
function like: function {Object (x, y, 0)} which will scale the object
infinitely in the z direction.
But wait - there's more!
Now use that function in a pigment pattern, and you get a silhouette (shadow) of
the object.

Easy to do for cardinal axis aligned shadows, takes a little bit more to do
off-axis either by pre-rotating the object and then rotating the pattern back,
or maybe by doing some vector normal to a plane type stuff...


Post a reply to this message

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