POV-Ray : Newsgroups : povray.newusers : double_illuminate coefficient Server Time
24 Nov 2024 08:47:06 EST (-0500)
  double_illuminate coefficient (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Mr
Subject: double_illuminate coefficient
Date: 9 Aug 2009 03:55:01
Message: <web.4a7e80d16beb157a30316e610@news.povray.org>
Is there a way to cheaply tune the amount by which the light brought by
double_illuminate can be added? I'm thinking like an amount of translucency,
without changing anything to transparency nor having to use media.


Post a reply to this message

From: Warp
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 05:48:30
Message: <4a7e9b6e@news.povray.org>
Mr <nomail@nomail> wrote:
> Is there a way to cheaply tune the amount by which the light brought by
> double_illuminate can be added?

  Knowing a bit how the povray engine has been implemented, it wouldn't be
a trivial change. Every object would have to internally carry the factor
and some flag which tells whether the normal has been inverted or not.

> I'm thinking like an amount of translucency,
> without changing anything to transparency nor having to use media.

  I think clipka is working on a patch for 3.7 which does exactly that,
and even better.

-- 
                                                          - Warp


Post a reply to this message

From: Mr
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 06:15:00
Message: <web.4a7ea16dd27ecd66ab3838b90@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Mr <nomail@nomail> wrote:
> > Is there a way to cheaply tune the amount by which the light brought by
> > double_illuminate can be added?
>
>   Knowing a bit how the povray engine has been implemented, it wouldn't be
> a trivial change. Every object would have to internally carry the factor
> and some flag which tells whether the normal has been inverted or not.
>
> > I'm thinking like an amount of translucency,
> > without changing anything to transparency nor having to use media.
>
>   I think clipka is working on a patch for 3.7 which does exactly that,
> and even better.
>
> --
>                                                           - Warp

If you're thinking about the SSLT, it's much heavier in computation. But maybe
he has plans for implementing translucency too... Anyway He's doing a great job
already. And Im sure there is a way by mixing several materials when I'm more
familiar with that.


Post a reply to this message

From: Warp
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 07:21:42
Message: <4a7eb145@news.povray.org>
Mr <nomail@nomail> wrote:
> If you're thinking about the SSLT

  I'm not.

http://news.povray.org/povray.binaries.images/thread/<web.4a71339a7f799d0174340c00%40news.povray.org>/

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 11:22:37
Message: <4a7ee9bd@news.povray.org>
Warp schrieb:
> Mr <nomail@nomail> wrote:
>> Is there a way to cheaply tune the amount by which the light brought by
>> double_illuminate can be added?

Not yet, but...

>   Knowing a bit how the povray engine has been implemented, it wouldn't be
> a trivial change. Every object would have to internally carry the factor
> and some flag which tells whether the normal has been inverted or not.

You're pretty much mistaken this time: It turned out to be a piece of 
cake, actually. (Though I didn't extend the existing double_illuminate 
mechanism, but rather added a parallel one. Extending double_illuminate 
to accept float values would have been not so easy indeed, and would 
also have broken scenes where it's used just as a kludge to get rid of 
mesh artifacts.)

>> I'm thinking like an amount of translucency,
>> without changing anything to transparency nor having to use media.
> 
>   I think clipka is working on a patch for 3.7 which does exactly that,
> and even better.

Done already, and it seems to work like a charm. Just waiting for 
beta.34 to be released.


Post a reply to this message

From: clipka
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 11:44:28
Message: <4a7eeedc$1@news.povray.org>
Mr schrieb:
> And Im sure there is a way by mixing several materials when I'm more familiar with
that.

Probably not. To my knowledge, even POV-Ray gurus tried and failed. The 
best approach I've seen so far required adding extra geometry, to create 
a "sandwich" of surfaces: A plain-white double-illuminated inner core, 
between two colored, filtering outer surfaces; the outer surfaces' 
filter value would then be used to tune down the double_illuminate 
effect. As you can imagine, this is prohibitively complex for anything 
but the most simple geometry. It is also bound to be problematic with 
radiosity and photons.

It would probably be possible to achieve the same with layered textures 
if the double_illuminate was a property of the texture - but alas! it is 
an object property.

... thinking about it, I'm just having another idea right here that 
might work: Place two identical copies of the object in a union, at 
exactly the same spot - except that you add double_illuminate to one of 
them but not the other. POV-Ray should then interpolate between the two 
objects, so that you should get a 50% double-illuminate effect. For 
other ratios, you'd have to add more copies of the object though.


Post a reply to this message

From: Warp
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 11:55:47
Message: <4a7ef183@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Extending double_illuminate 
> to accept float values would have been not so easy indeed, and would 
> also have broken scenes where it's used just as a kludge to get rid of 
> mesh artifacts.)

  Why would it have broken anything? A float parameter can be made
optional, so if it isn't specified a default is used.

  And btw, I think that the view that "double_illuminate is used as a kludge
to get rid of mesh artifacts" is a bit simplistic of a view.

  The fact is that double illumination (of smooth meshes) existed way before
the 'double_illuminate' keyword was introduced. Smooth meshes were by default
double-illuminated, I assume precisely because it avoided many of the
artifacts. At some point (maybe because people complained about it), they
were changed to be normally-illuminated, which introduced the artifacts.
Some time later the 'double_illuminate' keyword was introduced which could
be used to make smooth meshes double-illuminated again, as they have always
been. (I'm not 100% if 'double_illuminate' was introduced precisely because
of this smooth mesh issue, but it could at least partially be the reason.
I probably read all the related discussion, but I don't remember it anymore.)

  I'd even go as far as to say that, in fact, double_illuminate exists
precisely to reduce artifacts in smooth meshes, and any other use is the
"kludge", ie. trying to achieve some illumination effects which are not
physically correct.

  Thus the approach you took with your patch is, in fact, the correct one:
Keep 'double_illuminate' as the fix for smooth mesh artifacts, and instead
create a better solution for back illumination.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: double_illuminate coefficient
Date: 9 Aug 2009 12:21:33
Message: <4a7ef78d$1@news.povray.org>
Warp schrieb:
> clipka <ano### [at] anonymousorg> wrote:
>> Extending double_illuminate 
>> to accept float values would have been not so easy indeed, and would 
>> also have broken scenes where it's used just as a kludge to get rid of 
>> mesh artifacts.)
> 
>   Why would it have broken anything? A float parameter can be made
> optional, so if it isn't specified a default is used.

I soon found out that I also wanted the effect to apply to photons as 
well - and radiosity. The latter would have been devastating to any 
mesh-artifact-elimination use of double_illuminate in a mult-bounce 
radiosity scene, as this would have caused radiosity to carry 
illumination through the object's volume.

>   And btw, I think that the view that "double_illuminate is used as a kludge
> to get rid of mesh artifacts" is a bit simplistic of a view.

Well, it *is* used in this manner, isn't it? Whether the kludge was 
originally applied automatically, or was introduced for a totally 
different thing, doesn't change that fact. And I'd guess being the 
"official kludge" for getting rid of mesh artifacts, its use in this 
role is frequent enough to avoid breaking this use case.

>   Thus the approach you took with your patch is, in fact, the correct one:
> Keep 'double_illuminate' as the fix for smooth mesh artifacts, and instead
> create a better solution for back illumination.

I never said anything else :P


Post a reply to this message

From: Mr
Subject: Re: double_illuminate coefficient
Date: 10 Aug 2009 05:55:00
Message: <web.4a7fee4cd27ecd66e3f0b2880@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Mr schrieb:
> > And Im sure there is a way by mixing several materials when I'm more familiar with
that.
>
> Probably not. To my knowledge, even POV-Ray gurus tried and failed. The
> best approach I've seen so far required adding extra geometry, to create
> a "sandwich" of surfaces: A plain-white double-illuminated inner core,
> between two colored, filtering outer surfaces; the outer surfaces'
> filter value would then be used to tune down the double_illuminate
> effect. As you can imagine, this is prohibitively complex for anything
> but the most simple geometry. It is also bound to be problematic with
> radiosity and photons.
>
> It would probably be possible to achieve the same with layered textures
> if the double_illuminate was a property of the texture - but alas! it is
> an object property.


> ... thinking about it, I'm just having another idea right here that
> might work: Place two identical copies of the object in a union, at
> exactly the same spot - except that you add double_illuminate to one of
> them but not the other. POV-Ray should then interpolate between the two
> objects, so that you should get a 50% double-illuminate effect. For
> other ratios, you'd have to add more copies of the object though.

I get the problem, thanks for warning me and thanks for the CSG idea, it can
probably help in another situation if it works but I won't event try because
what I was asking it for was hair, so already a lot of geometry... I guess such
a solution would saturate the memory of my poor machine, would'nt it?
I can start tweaking the translucency when the next beta is out.


Post a reply to this message

From: Kenneth
Subject: Re: double_illuminate coefficient
Date: 12 Aug 2009 00:10:00
Message: <web.4a823facd27ecd66f50167bc0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> ... thinking about it, I'm just having another idea right here that
> might work: Place two identical copies of the object in a union, at
> exactly the same spot - except that you add double_illuminate to one of
> them but not the other. POV-Ray should then interpolate...

That's downright clever!  (I had always assumed that such an 'overlapping
objects' trick would introduce coincident-surface problems--so I never tried
it.) Thanks for the experimental idea.

Ken


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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