POV-Ray : Newsgroups : povray.general : Shadows without Objects Server Time
12 Aug 2024 17:09:11 EDT (-0400)
  Shadows without Objects (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
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

From: Lars W 
Subject: Re: Shadows without Objects
Date: 17 Feb 1999 16:43:28
Message: <36CB3848.B14FBA5D@snafu.de>
Yes i read all this, and i tried TGA and PNG, both deliver only a 1 bit
palette, and i don't know why.

can anybody confirm that he has a more than 1 bit Alpha with POV 3.1 ?

Spider schrieb:

> 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

From: Ron Parker
Subject: Re: Shadows without Objects
Date: 18 Feb 1999 08:38:20
Message: <36cc17cc.0@news.povray.org>
On Wed, 17 Feb 1999 22:44:41 +0100, Lars W. <lar### [at] snafude> wrote:
>
>Yes i read all this, and i tried TGA and PNG, both deliver only a 1 bit
>palette, and i don't know why.
>
>can anybody confirm that he has a more than 1 bit Alpha with POV 3.1 ?

I do when I output it as an 8-bit PNG and load it into Photoshop.
Perhaps the problem lies with DTA?


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Shadows without Objects
Date: 18 Feb 1999 10:43:36
Message: <36cc3528.0@news.povray.org>
In article <36CB2CB3.1D9C7925@snafu.de> , "Lars W." <lar### [at] snafude>
wrote:

> 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 ).

The alpha channels should be eight bit for all true color images. If you use
16 per color PNG images you should even get a 16 bit alpha channel. To see
the difference, change the transmit value of the second sphere to something
else, i.e. 0.5. However, the sphere is still a real object for POV-Ray and
it will start calcualtiong all the standard effects for it, so you will see
a high-light in the alpha channel in this case, and the first sphere will
change its color, too.  If you need different alpha channel values for the
easiest way to go might be to simply render the image several times with
different objects being invisible just to get more than one alpha channel.
Adjust the alpha channels and combine them to get one alpha channel.
However, you might need a more powerful tool to do this, a lot of programs
only allow one bit alpha channels.


    Thorsten


Post a reply to this message

From: Psychomek
Subject: Re: Shadows without Objects
Date: 19 Feb 1999 04:45:13
Message: <36CD3235.AC9477A3@cyberhighway.net>
Ron Parker wrote:

> On Wed, 17 Feb 1999 22:44:41 +0100, Lars W. <lar### [at] snafude> wrote:
> >
> >Yes i read all this, and i tried TGA and PNG, both deliver only a 1 bit
> >palette, and i don't know why.
> >
> >can anybody confirm that he has a more than 1 bit Alpha with POV 3.1 ?
>
> I do when I output it as an 8-bit PNG and load it into Photoshop.
> Perhaps the problem lies with DTA?

When ever i try and load a PNG file from PovRay to Paintshop it says
unrecognized color or something to that effect......  but i use a different
program to convert PNG to JPG then use paintshop to resize, resample, then
resave in a slightly higher compression rate... (Usually about 5-10% higher).


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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