POV-Ray : Newsgroups : povray.general : Transparency color disappearance Server Time
25 Nov 2024 08:25:13 EST (-0500)
  Transparency color disappearance (Message 1 to 9 of 9)  
From: Anne Courtois
Subject: Transparency color disappearance
Date: 2 Aug 2015 15:05:00
Message: <web.55be68e05b189019fe2677160@news.povray.org>
Hi guys,

Look at this file. When I render this without the cylinder at the end. My filter
box is green. When its in, my filter' green complexion disappears.

What am I doing wrong?

Anne

************************************
  #include "textures"
  #include "colors"
  #include "stones.inc"
  #include "Glass"

  global_settings
{
  max_trace_level 10
}

  #declare Lightbulb = union {
    merge {
       cylinder {
        <0,0,1>, <0,0,0>, 0.2
        //scale <0.35, 0.35, 1.0>
        translate  1*z
      }
      texture {
        pigment {color rgb <1, 1, 1>}
        finish {ambient .8 diffuse .6}
      }
    }

  }

camera {
 location <10, 10, 1>
 look_at <0, 0, 0>
 right x*1920/1080
 }


  light_source {
    <0, 2, 0>
    color White
    looks_like { Lightbulb }
  }

//Filter box
box { <0.2, 5, 0.2>, <2.2, 5.125, 2.2>
 pigment { color rgbft <0.1, 1.0, 0.1, 1.0, 0> }
 texture {
   T_Glass2
   }
 finish {
   diffuse 0.9
      ambient 0.4
      specular 1.0
      roughness 0.1
      brilliance 0.01
      reflection {
       0.3
          }
       refraction 1.0
   }
 }

//Floor
box { <0, 0, 0>, <5, 0.125, 5>
 texture{
 T_Stone44
 scale 2
   }
 }

cylinder { <0, 0, 0>, <0, 10, 0>, 0.0625
  pigment { color Blue }
  finish {
   ambient 0.5
   diffuse 0.5
   }
  }


Post a reply to this message

From: Anne Courtois
Subject: Re: Transparency color disappearance
Date: 2 Aug 2015 15:15:01
Message: <web.55be6be187a0e268fe2677160@news.povray.org>
Never mind.

I played with the cylinder to discover the basic concept of the lightsource
being inside the cylinder. Silly me.

If the moderators want to delete my post, I'll play along. LOL

Anne



"Anne Courtois" <nomail@nomail> wrote:
> Hi guys,
>
> Look at this file. When I render this without the cylinder at the end. My filter
> box is green. When its in, my filter' green complexion disappears.
>
> What am I doing wrong?
>
> Anne
>
> ************************************
>   #include "textures"
>   #include "colors"
>   #include "stones.inc"
>   #include "Glass"
>
>   global_settings
> {
>   max_trace_level 10
> }
>
>   #declare Lightbulb = union {
>     merge {
>        cylinder {
>         <0,0,1>, <0,0,0>, 0.2
>         //scale <0.35, 0.35, 1.0>
>         translate  1*z
>       }
>       texture {
>         pigment {color rgb <1, 1, 1>}
>         finish {ambient .8 diffuse .6}
>       }
>     }
>
>   }
>
> camera {
>  location <10, 10, 1>
>  look_at <0, 0, 0>
>  right x*1920/1080
>  }
>
>
>   light_source {
>     <0, 2, 0>
>     color White
>     looks_like { Lightbulb }
>   }
>
> //Filter box
> box { <0.2, 5, 0.2>, <2.2, 5.125, 2.2>
>  pigment { color rgbft <0.1, 1.0, 0.1, 1.0, 0> }
>  texture {
>    T_Glass2
>    }
>  finish {
>    diffuse 0.9
>       ambient 0.4
>       specular 1.0
>       roughness 0.1
>       brilliance 0.01
>       reflection {
>        0.3
>           }
>        refraction 1.0
>    }
>  }
>
> //Floor
> box { <0, 0, 0>, <5, 0.125, 5>
>  texture{
>  T_Stone44
>  scale 2
>    }
>  }
>
> cylinder { <0, 0, 0>, <0, 10, 0>, 0.0625
>   pigment { color Blue }
>   finish {
>    ambient 0.5
>    diffuse 0.5
>    }
>   }


Post a reply to this message

From: Stephen
Subject: Re: Transparency color disappearance
Date: 2 Aug 2015 15:46:07
Message: <55be737f$1@news.povray.org>
On 8/2/2015 8:13 PM, Anne Courtois wrote:
> If the moderators want to delete my post, I'll play along. LOL


I don't think anyone on this newsgroup is moderate. We are all extreme. 
One way or another. ;-)

Welcome Anne. :-D

I am glad you sorted it out.

-- 

Regards
     Stephen


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Transparency color disappearance
Date: 2 Aug 2015 17:14:14
Message: <55be8826$1@news.povray.org>
On 2/08/2015 21:13, Anne Courtois wrote:
> Never mind.
>
> I played with the cylinder to discover the basic concept of the lightsource
> being inside the cylinder. Silly me.
>
> If the moderators want to delete my post, I'll play along. LOL

a bit off topic, but: does this happen? Forums (technically, this is a 
newsgroup, but I suppose I'm the only one still using nntp to access 
this) that delete posts where a person answers his/her own question?

Sounds like throwing away possibly useful information :/


Post a reply to this message

From: Bald Eagle
Subject: Re: Transparency color disappearance
Date: 2 Aug 2015 17:50:00
Message: <web.55be8fd187a0e2685e7df57c0@news.povray.org>
> On 2/08/2015 21:13, Anne Courtois wrote:
> > Never mind.
> >
> > I played with the cylinder to discover the basic concept of the lightsource
> > being inside the cylinder. Silly me.

I've done that and variations on that theme many times.  You'd think something
as basic and fundamental as a light source would be somewhat foolproof, but we
users find new and clever ways to botch them in the most unusual ways.

Welcome to the LION's club (Light Source Inside Object ... Nevermind).
You now have the experience to proceed beyond Level One.   Carry on  :)


Post a reply to this message

From: Stephen
Subject: Re: Transparency color disappearance
Date: 2 Aug 2015 21:39:41
Message: <55bec65d@news.povray.org>
On 8/2/2015 10:14 PM, Zeger Knaepen wrote:
> On 2/08/2015 21:13, Anne Courtois wrote:
>> Never mind.
>>
>> I played with the cylinder to discover the basic concept of the
>> lightsource
>> being inside the cylinder. Silly me.
>>
>> If the moderators want to delete my post, I'll play along. LOL
>
> a bit off topic, but: does this happen? Forums (technically, this is a
> newsgroup, but I suppose I'm the only one still using nntp to access
> this) that delete posts where a person answers his/her own question?
>

That is a new one on me or maybe I should say an old one. ;-)
I use Mozilla Thunderbird to access the newsgroup and can delete my own 
posts but no others. I don't think anyone has moderated the site since 
Uncle Ken, dropped out. :-(


> Sounds like throwing away possibly useful information :/
>

It does but no one like their mistakes kept public. ;-)

-- 

Regards
     Stephen


Post a reply to this message

From: Anne Courtois
Subject: Re: Transparency color disappearance
Date: 3 Aug 2015 12:05:00
Message: <web.55bf907f87a0e268fe2677160@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 8/2/2015 10:14 PM, Zeger Knaepen wrote:
> > On 2/08/2015 21:13, Anne Courtois wrote:
> >> Never mind.
> >>
> >> I played with the cylinder to discover the basic concept of the
> >> lightsource
> >> being inside the cylinder. Silly me.
> >>
> >> If the moderators want to delete my post, I'll play along. LOL
> >
> > a bit off topic, but: does this happen? Forums (technically, this is a
> > newsgroup, but I suppose I'm the only one still using nntp to access
> > this) that delete posts where a person answers his/her own question?
> >
>
> That is a new one on me or maybe I should say an old one. ;-)
> I use Mozilla Thunderbird to access the newsgroup and can delete my own
> posts but no others. I don't think anyone has moderated the site since
> Uncle Ken, dropped out. :-(
>
>
> > Sounds like throwing away possibly useful information :/
> >
>
> It does but no one like their mistakes kept public. ;-)
>
> --
>
> Regards
>      Stephen

Bah...I don't mind. If it can help someone. However, it seemed tedious to search
here and that might be because it is in fact a newsgroup. I might have accessed
it with nntp back in 1996, but not anymore...


Post a reply to this message

From: Alain
Subject: Re: Transparency color disappearance
Date: 3 Aug 2015 13:10:03
Message: <55bfa06b@news.povray.org>

> Hi guys,
>
> Look at this file. When I render this without the cylinder at the end. My filter
> box is green. When its in, my filter' green complexion disappears.
>
> What am I doing wrong?
>
> Anne

Some hints:

>
> ************************************
>    #include "textures"
>    #include "colors"
>    #include "stones.inc"
>    #include "Glass"
>
>    global_settings
> {
>    max_trace_level 10
> }
>

A merge inside an union for a single object? Beter to just use the 
cylinder here, unless you want to eventualy make it more complexe. Then, 
only the merge OR union, not both, would be needed.

>    #declare Lightbulb = union {
>      merge {
>         cylinder {
>          <0,0,1>, <0,0,0>, 0.2
>          //scale <0.35, 0.35, 1.0>
>          translate  1*z
>        }
>        texture {
>          pigment {color rgb <1, 1, 1>}
>          finish {ambient .8 diffuse .6}

You need to add some transparency or the no_shadow attribute, otherwise, 
the light can't come out.
You should use emission instead of ambient and set diffuse to no more 
than 0.2.

>        }
>      }
>
>    }
>
> camera {
>   location <10, 10, 1>
>   look_at <0, 0, 0>
>   right x*1920/1080
>   }
>
>
>    light_source {
>      <0, 2, 0>
>      color White
>      looks_like { Lightbulb }
>    }
>
> //Filter box
> box { <0.2, 5, 0.2>, <2.2, 5.125, 2.2>
>   pigment { color rgbft <0.1, 1.0, 0.1, 1.0, 0> }
>   texture {
>     T_Glass2
>     }

The T_Glass2 texture come with it's own pigment and finish, and get 
layered over your pigment with a default finish.
As you define both pigment and finish, you don't realy need to add that 
texture.

>   finish {
>     diffuse 0.9
>        ambient 0.4
>        specular 1.0
>        roughness 0.1
>        brilliance 0.01
>        reflection {
>         0.3
>            }

The summ of diffuse, ambient and reflection should stay under 1. 
Otherwise, the object return more light than it receive.
brilliance 0.01 is extremely low, making the illumination almost 
independent from the light's incident angle.

>  //       refraction 1.0

This is obsolete as of version 3.0.
The presence of filter or transmit make the object transparent.
If you want refraction, you need to add an interior block and define an 
ior different than 1. Water have an ior of about 1.33 depending on 
temperature and dissolved substences, and 1.5 is a good general starting 
value for most transparent materials like glass.

>     }
>   }
>
> //Floor
> box { <0, 0, 0>, <5, 0.125, 5>
>   texture{
>   T_Stone44
>   scale 2
>     }
>   }
>
> cylinder { <0, 0, 0>, <0, 10, 0>, 0.0625
>    pigment { color Blue }
>    finish {
>     ambient 0.5
>     diffuse 0.5
>     }
>    }
>
>
>
>
>


Post a reply to this message

From: clipka
Subject: Re: Transparency color disappearance
Date: 3 Aug 2015 13:38:22
Message: <55bfa70e$1@news.povray.org>
Am 03.08.2015 um 19:10 schrieb Alain:

>>   finish {
>>     diffuse 0.9
>>        ambient 0.4
>>        specular 1.0
>>        roughness 0.1
>>        brilliance 0.01
>>        reflection {
>>         0.3
>>            }
>
> The summ of diffuse, ambient and reflection should stay under 1.
> Otherwise, the object return more light than it receive.

Actually ambient is outside of this equation. The choice of this setting 
should be based on...:

- The diffuse value (if you increase diffuse, you should also increase 
ambient)

- The brightness and geometry of surrounding objects (if they're plain 
white and oriented straight towards the object in question, ambient 
should equal diffuse)

The above is true for brilliance 1.0, or if the "albedo" keyword is used 
with diffuse.


As for the sum of diffuse and reflection, the rule that it should stay 
under 1 is only true when...:

- The reflection is constant (as is the case here), AND

- brilliance is 1.0, or the "albedo" keyword is used with diffuse.


The most realistic results can be obtained by using:

     #version 3.71; // !!!
     texture {
       finish {
         ambient A*D
         diffuse albedo D
         brilliance 1.0
         specular albedo R
         fresnel on // this is what you'll need 3.7.1 for
         reflection { R fresnel on }
       }
     }
     interior {
       ior I
     }

with D <= 1.0, R <= 1.0, and A depending on surrounding materials and 
geometry (better yet, use radiosity); no other constraints apply, as the 
"fresnel on" in the finish block itself and in the reflection block will 
make sure that the diffuse is properly balanced with the reflection.


Post a reply to this message

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