POV-Ray : Newsgroups : povray.general : Shadows without Objects Server Time
15 Nov 2024 09:18:39 EST (-0500)
  Shadows without Objects (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Lars W 
Subject: Shadows without Objects
Date: 15 Feb 1999 14:35:18
Message: <36C87745.5713B049@snafu.de>
Hi

I am trying to combine real Images, and POV-Images, and for that i need
to know
how to create Objects, that make shadows, but are not seen, i mean they
must be
100 % transparent, but the shadows must be dark.

Does anybody know if such things are possible with POV-Ray ?
or maybe knows some alternatives ?

greetings Lars Wolter

E-Mail : lar### [at] snafude
Homepage : www.snafu.de/~larts.wolter


Post a reply to this message

From: Stephen Lavedas
Subject: Re: Shadows without Objects
Date: 15 Feb 1999 17:19:29
Message: <36C89D8D.18407460@virginia.edu>
Well, I'll give you the hint on where to find the message, Ken will give
you the link soon enough.  I'm not sure if this is exactly what you
want, but Dan Connelly posted an image in which he had a sphere casting
a square shadow.  It was several months back, but I remember it
distinctly and wondering if I would ever find a use for his method.  Ken
will know more.

Steve


"Lars W." wrote:
> 
> Hi
> 
> I am trying to combine real Images, and POV-Images, and for that i need
> to know
> how to create Objects, that make shadows, but are not seen, i mean they
> must be
> 100 % transparent, but the shadows must be dark.
> 
> Does anybody know if such things are possible with POV-Ray ?
> or maybe knows some alternatives ?
> 
> greetings Lars Wolter
> 
> E-Mail : lar### [at] snafude
> Homepage : www.snafu.de/~larts.wolter


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Shadows without Objects
Date: 15 Feb 1999 19:33:52
Message: <36c8bcf0.0@news.povray.org>
In article <36C87745.5713B049@snafu.de> , "Lars W." <lar### [at] snafude>
wrote:

> I am trying to combine real Images, and POV-Images, and for that i need
> to know
> how to create Objects, that make shadows, but are not seen, i mean they
> must be
> 100 % transparent, but the shadows must be dark.
>
> Does anybody know if such things are possible with POV-Ray ?
> or maybe knows some alternatives ?

Yes, there is a trick. Combining the filter and transmit color components
will do it. Then make sure you render _with_ alpha channel to a format that
supports alpha channels (e.g. PNG). All you need now is a program that can
use this alpha channel to mix the two images (Photoshop and some shareware
programs can do it).
Now here is the sample:

// *****************

camera
{
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0,  0.0>
}

// you need skysphere not background
sky_sphere
{
  pigment
  {
    color blue 1.0
  }
}

// some light
light_source
{
  <-30, 30, -30>
  color rgb 1.0
}

plane { y, -1 pigment { color green 1.0 } }

// the object
sphere { 0.0, 1 texture { pigment { color rgb 1.0 } } }

// the "hole", just a bit larger than the original object
sphere { 0.0, 1.0001 texture { pigment { color filter 0.0 transmit 1.0 } } }

// *****************

So all you need to do is to create the object twice. Make one (the second
one in the example above) of them a bit larger and set its texture to
"texture { pigment { color filter 0.0 transmit 1.0 } }". Note that just
"color filter 0.0 transmit 1.0" (the direct color option) won't work, you
need a complete texture. The filter makes the object invisible and the
transmit make the "hole" in the alpha channel.
In the example the first object creates the shadow and when you render with
preview you won't see a difference (except on Macs where you can see the
alpha channle during rendering).


    Thorsten


Post a reply to this message

From: Thomas Willhalm
Subject: Re: Shadows without Objects
Date: 16 Feb 1999 07:52:28
Message: <qqmaeyepl38.fsf@goldach.fmi.uni-konstanz.de>
"Lars W." <lar### [at] snafude> writes:

> Hi
> 
> I am trying to combine real Images, and POV-Images, and for that i need
> to know
> how to create Objects, that make shadows, but are not seen, i mean they
> must be
> 100 % transparent, but the shadows must be dark.
> 
> Does anybody know if such things are possible with POV-Ray ?
> or maybe knows some alternatives ?

If you don't find any alternatives, contact me. I have hacked the source
code of POV-Ray to allow just what you want: Completely transparent objects
casting black shadows. Additionally, if have created a possibility to 
completely avoid shadows on an object. (This is different from the no_shadow 
keyword. In the latter case, the object doesn't cast shadows, whereas my 
addition removes the shadows from the object.)

I have used these modifications to create my image "twklein"
http://www.fmi.uni-konstanz.de/~willhalm/graphics/tracegallery/index.html

Unfortunately, my hack doesn't work anymore with POV-Ray 3.01, and I guess
that this is also true for the upcoming version 3.1. So you have to stick
with 3.0, if you want to use my modifications. I could provide you binaries
for Solaris, Linux, or SGI, or I can send you the source code.

Thomas

-- 
http://www.fmi.uni-konstanz.de/~willhalm


Post a reply to this message

From: PoD
Subject: Re: Shadows without Objects
Date: 16 Feb 1999 11:19:35
Message: <36C99A99.FB@merlin.net.au>
Lars W. wrote:
> 
> Hi
> 
> I am trying to combine real Images, and POV-Images, and for that i need
> to know
> how to create Objects, that make shadows, but are not seen, i mean they
> must be
> 100 % transparent, but the shadows must be dark.
> 
> Does anybody know if such things are possible with POV-Ray ?
> or maybe knows some alternatives ?
> 
> greetings Lars Wolter
> 
> E-Mail : lar### [at] snafude
> Homepage : www.snafu.de/~larts.wolter

How realistic does the shadow have to be?
You can create a 'shadow' by using a light_source with a negative colour
value.
eg. point a spotlight with a colour of rgb -1 at the ground and you'll
get a dark 
circle.  As for real shadows from invisible objects, sorry no ideas.

Cheers, PoD.


Post a reply to this message

From: Robert Dawson
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 10:18:44
Message: <01be5a89$51b94bb0$1c8eb88c@rdawson>
> Lars W. wrote:
> > 
> > Hi
> > 
> > I am trying to combine real Images, and POV-Images, and for that i need
> > to know
> > how to create Objects, that make shadows, but are not seen, i mean they
> > must be
> > 100 % transparent, but the shadows must be dark.
> > 
> > Does anybody know if such things are possible with POV-Ray ?
> > or maybe knows some alternatives ?

	One idea: if you have one predominant light-source, put a very, very tiny 
version of your object [sub-pixel-sized] very close to it.  As the light
source is a point, a .01mm object .02mm away from the light will cast just
as good a shadow as a 1m object 2m away. This has the advantage that it
allows an actual POVthing to cast a shadow w/o being seen. It won't work if
there are several strong light sources, unless you get the proportions and
positions just right.
(If you *do*, though, there is no reason that you could not get [say] a
human figure that appears only by casting *correct* shadows in several
intersecting spotlights. Spooky!) I don't think it will work at all with
linear or area lights.

	Another possibility is to create a darklight [=negative intensity light
source] in a "magic lantern" [= opaque box with a shaped cutout or
transparent "dianegative"] and, again, shrink it to speck size. With this,
I imagine that you could even cast colored shadows [think a shadow with
colored eyes?]  This will work against any available light but has the
disadvantage that it may interact oddly with other shadows - it may look
more like a dark stain than a shadow, as it will interact independly with
shadows from every source.

	-Robert Dawson


Post a reply to this message

From: Roland Mas
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 13:00:51
Message: <m3soc6cne0.fsf@clodomir.rezel.enst.fr>
PoD <pod### [at] merlinnetau> writes:

> You can create a 'shadow' by using a light_source with a negative
> colour value.  eg. point a spotlight with a colour of rgb -1 at the
> ground and you'll get a dark circle.  As for real shadows from
> invisible objects, sorry no ideas.

Still thinking...

Two light sources...  One coloured +1 is normal, one coloured -1 is
shadowless...  No, that won't work.

And with negative transparency...  Won't work either.

I'm sure the solution is lurking around those two themes.  Just cannot
find it right now.

Roland.
-- 
Roland Mas


- Genki desu, ture en zinc.


Post a reply to this message

From: Lars W 
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 15:48:26
Message: <36CB2B62.7636E0D0@snafu.de>
Hi

Thanks for all your responses, i think i use the trick with the alpha
channel, cause i have to use the alpha
anyway. The trick with the negative Light is good too, but i need shadows
from 3D-Objects, and developing
an Projektor image that looks like 3d is a bit complicated.

greetings Lars


Post a reply to this message

From: Lars W 
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 15:53:58
Message: <36CB2CB3.1D9C7925@snafu.de>
Thanks for the tip,

by implementing this into my scene i recogniced another problem, maybe you can
help me with this one too.

Does POV-Ray only supports 1 bit Alpha Channels, or is there a Trick to use more
then 1 bit, maybe 8 or 16
or am i so blind, and it has more than one bit, cause the compositing Programm
DTA ( Daves Targa Animator 3.0 beta ) converts
the alpha channel only to an black and White image, even when there are
transparencies in there ( i removed any Skyspheres for
testing that ).

greetings Lars


Thorsten Froehlich schrieb:

> In article <36C87745.5713B049@snafu.de> , "Lars W." <lar### [at] snafude>
> wrote:
>
> > I am trying to combine real Images, and POV-Images, and for that i need
> > to know
> > how to create Objects, that make shadows, but are not seen, i mean they
> > must be
> > 100 % transparent, but the shadows must be dark.
> >
> > Does anybody know if such things are possible with POV-Ray ?
> > or maybe knows some alternatives ?
>
> Yes, there is a trick. Combining the filter and transmit color components
> will do it. Then make sure you render _with_ alpha channel to a format that
> supports alpha channels (e.g. PNG). All you need now is a program that can
> use this alpha channel to mix the two images (Photoshop and some shareware
> programs can do it).
> Now here is the sample:
>
> // *****************
>
> camera
> {
>   location  <0.0, 0.5, -4.0>
>   direction 1.5*z
>   right     4/3*x
>   look_at   <0.0, 0.0,  0.0>
> }
>
> // you need skysphere not background
> sky_sphere
> {
>   pigment
>   {
>     color blue 1.0
>   }
> }
>
> // some light
> light_source
> {
>   <-30, 30, -30>
>   color rgb 1.0
> }
>
> plane { y, -1 pigment { color green 1.0 } }
>
> // the object
> sphere { 0.0, 1 texture { pigment { color rgb 1.0 } } }
>
> // the "hole", just a bit larger than the original object
> sphere { 0.0, 1.0001 texture { pigment { color filter 0.0 transmit 1.0 } } }
>
> // *****************
>
> So all you need to do is to create the object twice. Make one (the second
> one in the example above) of them a bit larger and set its texture to
> "texture { pigment { color filter 0.0 transmit 1.0 } }". Note that just
> "color filter 0.0 transmit 1.0" (the direct color option) won't work, you
> need a complete texture. The filter makes the object invisible and the
> transmit make the "hole" in the alpha channel.
> In the example the first object creates the shadow and when you render with
> preview you won't see a difference (except on Macs where you can see the
> alpha channle during rendering).
>
>     Thorsten


Post a reply to this message

From: Spider
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 16:39:00
Message: <36CB35A5.1A0EC9E6@bahnhof.se>
POV-help is here !

Output_Alpha=bool	Sets alpha output on/off
Bits_Per_Color=n	Sets file output bits/color to n
The default type of image file depends on which platform you are using.
MS-DOS and most others default to 24-bit uncompressed Targa. See your
platform-specific documentation to see what your default file type is.
You may select one of several different file types using
Output_File_Type=x or +Fx where x is one of the following...

+FN	New PNG (portable network graphics) format
(this isn't very interesting)
Most of these formats output 24 bits per pixel with 8 bits for each of
red, green and blue data. PNG allows you to optionally specify the
output bit depth from 5 to 16 bits for each of the red, green, and blue
colors, giving from 15 to 48 bits of color information per pixel. The
default output depth for all formats is 8 bits/color (16 million
possible colors), but this may be changed for PNG format files by
setting Bits_Per_Color=n or by specifying +FNn, where n is the desired
bit depth.

-------(THIS IS INTERESTING)
Targa format also allows 8 bits of alpha transparency data to be output,
while PNG format allows 5 to 16 bits of alpha transparency data,
depending on the color bit depth as specified above. You may turn this
option on with Output_Alpha=on or +UA. The default is off or -UA. See
section "Using the Alpha Channel" for further details on transparency.

all this from the doc's -


-- 
//Spider 
( spi### [at] bahnhofse ) [ http://www.bahnhof.se/~spider/ ]
#declare life = rand(seed(42))*sqrt(-1);


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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