POV-Ray : Newsgroups : povray.general : silly features : Re: silly features Server Time
12 Aug 2024 01:32:02 EDT (-0400)
  Re: silly features  
From: Ron Parker
Date: 10 Jun 1999 14:07:21
Message: <375ffed9@news.povray.org>
On Thu, 10 Jun 1999 13:50:46 -0300, Robert Dawson wrote:
>    (1) Create a very small copy [say exactly 1/1000 scale] of your object.
>If necessary change the texture to make it opaque and remove any no_shadows.
>
>    (2) Translate it 999/1000 of the way towards the light-source that you
>would like to block.

What if my object has something else between it and the light source?  
For example, say I want to make a ripoff of the SW:TPM poster that shows 
Anakin casting Vader's shadow, but I want Anakin illuminated
in blue and the cliff face in red.  Then I'd put an "invisible
Vader with shadow" (see below) and an "Anakin" model at the same place, 
then add two light sources: A blue one that interacts only with Anakin, 
and a red one that interacts only with Vader and the cliff face.

>The same trick without the first object will cause a shadow to be cast
>without anybody to cast it.

It won't always work.  If part of the first object would usually penetrate 
or go behind the surface on which the shadow is being cast, you might get 
the wrong shadow.  Let's say my client makes network security that's 
supposed to be omnipresent but invisible to trusted users, so I'm coming 
up with a fancy animation sequence to get the idea across.  I have a cool 
artifact in the center to represent your network, surrounded by castle 
walls with fancy turrets and battlements.  A huge gold key flies into the 
scene, unlocks the walls, and they dissolve (invisible) while still casting 
a shadow on the central artifact (omnipresent).  The turret that was behind 
the artifact shouldn't cast a shadow on the artifact, right?  It will.

Anyway, there's an easier way to get that effect:

  #declare LightPos=<...>;
  #declare ShadowOnlyObject=...

  light_source { LightPos rgb 1}
  object { ShadowOnlyObject bounded_by {sphere { LightPos .001 }}}

This might not work exactly right if the light source is between the camera
and the object, but you usually wouldn't do that anyway.


Post a reply to this message

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