POV-Ray : Newsgroups : povray.general : Shadow_darkness - feature suggestion Server Time
14 Nov 2024 23:20:41 EST (-0500)
  Shadow_darkness - feature suggestion (Message 1 to 9 of 9)  
From: Przemek Loesch
Subject: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 04:55:00
Message: <web.41f0cfca1f682f95b0aac12c0@news.povray.org>
I have an idea of adding "shadow_darkness" keyword into the light_source
block, for example:

light_source {
  <0,0,0>
  rgb 1
  shadow_darkness 0.5
}

It would be a factor of light amount which comes from this light source to
an object in shadow. Although I'm not familiar with POV source code I think
it should be relatively easy to implement. It is probably a matter of
multiplying light value by a fraction after the "object-light visibility
test" when it indicates that object is in shadow.
This keyword would be useful feature when shadows in a scene
are to dark or their geometric shape is too strong. Of course we could use
area light, shadowless light or radiosity but shadow darkness will allow to
control the shadows smoothly, without increasing rendering time too much (I
hope).
It may also be usefull to create some urealistic effects like shadows
brighter than surfaces not in shadow - assuming that negative values for
"shadow_darkness" will be translated to factor greater then 1.
What do you think about it?

Przemek


Post a reply to this message

From: Tim Nikias
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 05:12:09
Message: <41f0d579@news.povray.org>
Interesting idea, though you can do the same by using projected_through with
a lightsource less powerful light_source than the current one. Look it up in
the docs, it does just about what you wants, although it will cast shadows
when other objects are in the way. Using "shadowless" would cure that
problem as well.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Przemek Loesch
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 10:15:00
Message: <web.41f11b5238e7ee1db0aac12c0@news.povray.org>
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote:
> Interesting idea, though you can do the same by using projected_through with
> a lightsource less powerful light_source than the current one. Look it up in
> the docs, it does just about what you wants, although it will cast shadows
> when other objects are in the way. Using "shadowless" would cure that
> problem as well.
>
> --
> "Tim Nikias v2.0"
> Homepage: <http://www.nolights.de>

You're right - it can be done by projected_through but it requires further
operations:
- you have to put second light in the scene - less powerfull one
- declare the whole scene as the object to projected_through statement
- remember to make the second light shadowless
And raytracing time will probably increase, because you have two lights
instead of one so each test for lighting will be done twice.
I think the "shadow_darkness" keyword would be more comfortable and obvious
for users.

Greetings
Przemek


Post a reply to this message

From: Le Forgeron
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 10:29:29
Message: <Xns95E5A7C24361jgrimbertmeandmyself@203.29.75.35>


> "Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote:
>> Interesting idea, though you can do the same by using
>> projected_through with a lightsource less powerful light_source than
>> the current one. Look it up in the docs, it does just about what you
>> wants, although it will cast shadows when other objects are in the
>> way. Using "shadowless" would cure that problem as well.
>>

> 
> You're right - it can be done by projected_through but it requires
> further operations:
> - you have to put second light in the scene - less powerfull one
> - declare the whole scene as the object to projected_through statement
> - remember to make the second light shadowless
> And raytracing time will probably increase, because you have two
> lights instead of one so each test for lighting will be done twice.
> I think the "shadow_darkness" keyword would be more comfortable and
> obvious for users.
> 
> Greetings
> Przemek

What about simply putting a negative light colour for the light source,
and then some positive ambient light.
Then play with diffuse/ambient of the texture of the object.




-- 
This is an unauthorized cybernetic announcement.

When someone says "I want a programming language in which I need only
say what I wish done," give him a lollipop.


Post a reply to this message

From: Maurice
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 12:08:21
Message: <41f13705@news.povray.org>
Przemek Loesch wrote:
> I have an idea of adding "shadow_darkness" keyword into the light_source
> block, for example:
> 
> light_source {
>   <0,0,0>
>   rgb 1
>   shadow_darkness 0.5
> }
> 
do you know about the "ambient" keyword?


Post a reply to this message

From: Przemek Loesch
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 13:00:01
Message: <web.41f142c938e7ee1db0aac12c0@news.povray.org>
Maurice <cel### [at] nospamhotmailcom> wrote:
> Przemek Loesch wrote:
> > I have an idea of adding "shadow_darkness" keyword into the light_source
> > block, for example:
> >
> > light_source {
> >   <0,0,0>
> >   rgb 1
> >   shadow_darkness 0.5
> > }
> >
> do you know about the "ambient" keyword?

Yes, I've heard something about it some time ago ;-)
Ambient will make all surfaces brighter - both shadows and illuminated ones.
And the idea is to play with the balance between light and shadow. Also,
with ambient you are not able to control shadows of different light sources
independently. All the shadows will be brighter or darker. When you use
high ambient values the scene will lose its contrast at all. Besides you
have to tune this value in many places - in each finish block.
I'm thinking about something different. Sometimes you have your light source
very close to an object what causes very big shadow areas what optically
distorts geometry of the model. If you could make shadow of this light a
little brighter the scene will look better. There are many situations where
one may want to make a shadow brighter. For example a bulb in a lamp - when
it is not a spotlight it produces bright circle of light and dark
surroundings.

Is this what I am talking about really so strange and hard to understand? Or
my English is so bed?
We have "shadowless" keyword in Povray. The idea is to make this feature
work in a smooth way from 0-1. That's all.

Greetings!

Przemek


Post a reply to this message

From: Mike Williams
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 15:19:29
Message: <PxDwjFACPW8BFwcr@econym.demon.co.uk>
Wasn't it Przemek Loesch who wrote:
>
>Is this what I am talking about really so strange and hard to understand? Or
>my English is so bed?
>We have "shadowless" keyword in Povray. The idea is to make this feature
>work in a smooth way from 0-1. That's all.

Do you mean like placing a normal light and a shadowless light at the
same location, adjusting the brightness of each light and keeping the
sum of their brightness constant?

Consider this, and try different values of Shadow_Darkness:


camera {location  <0,5,-10> look_at <0,-1,0> angle 30}

#declare Shadow_Darkness=0.5;
light_source {<-30, 100, 0> colour rgb 1*Shadow_Darkness}
light_source {<-30, 100, 0> colour rgb 1*(1-Shadow_Darkness) shadowless}

plane {y,-2 pigment {rgb 1}}
sphere {0,1 pigment {rgb 1}}


This even works for values greater than 1.0 (really dark shadows even on
high-ambient surfaces) and values less than 0.0 (bright anti-shadows).

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 16:24:23
Message: <41f17307@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message
news:PxD### [at] econymdemoncouk...
> Wasn't it Przemek Loesch who wrote:
> >
> >Is this what I am talking about really so strange and hard to understand? Or
> >my English is so bed?
> >We have "shadowless" keyword in Povray. The idea is to make this feature
> >work in a smooth way from 0-1. That's all.
>
> Do you mean like placing a normal light and a shadowless light at the
> same location, adjusting the brightness of each light and keeping the
> sum of their brightness constant?
>
> Consider this, and try different values of Shadow_Darkness:
>
>
> camera {location  <0,5,-10> look_at <0,-1,0> angle 30}
>
> #declare Shadow_Darkness=0.5;
> light_source {<-30, 100, 0> colour rgb 1*Shadow_Darkness}
> light_source {<-30, 100, 0> colour rgb 1*(1-Shadow_Darkness) shadowless}
>
> plane {y,-2 pigment {rgb 1}}
> sphere {0,1 pigment {rgb 1}}
>
>
> This even works for values greater than 1.0 (really dark shadows even on
> high-ambient surfaces) and values less than 0.0 (bright anti-shadows).

This will not work as expected, since shadowless light_sources don't create
specular highlights.

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

From: Przemek Loesch
Subject: Re: Shadow_darkness - feature suggestion
Date: 21 Jan 2005 16:30:00
Message: <web.41f173ed38e7ee1db0aac12c0@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Do you mean like placing a normal light and a shadowless light at the
> same location, adjusting the brightness of each light and keeping the
> sum of their brightness constant?

O.K. This is the effect which I need and actually the similiar way which I
use currently to brighten shadows. I know it is easy to achieve this now
with existing Povray features, but the above method requires to double a
count of light sources and it is not so obvious and easy like writing one
additional keyword.
Anyway - all I want is to propose new feature. Maybe someone will find it
enough useful to implement it in the next version of Povray- unfortunately
my knowledge of Povray source code is not sufficient.

Greetings!

Przemek


Post a reply to this message

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