POV-Ray : Newsgroups : povray.newusers : Glow effect problem Server Time
27 Dec 2024 00:58:18 EST (-0500)
  Glow effect problem (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Mike8
Subject: Glow effect problem
Date: 27 Jan 2007 20:10:00
Message: <web.45bbf7565dd74560513987bd0@news.povray.org>
Hello,
   I'm having trouble figuring out how to add a glow effect to objects in my
scene. I'm trying to add a halo or aura effect around light sources. I know
it's a media attribute, but I can't find what specifically does it in the
documentation. Can anyone tell me how to do this, or point out the parts of
the documentation that cover this? Thanks,
    Michael


Post a reply to this message

From: Tim Attwood
Subject: Re: Glow effect problem
Date: 29 Jan 2007 07:04:12
Message: <45bde2bc$1@news.povray.org>
>   I'm having trouble figuring out how to add a glow effect to objects in 
> my
> scene. I'm trying to add a halo or aura effect around light sources. I 
> know
> it's a media attribute, but I can't find what specifically does it in the
> documentation. Can anyone tell me how to do this, or point out the parts 
> of
> the documentation that cover this?

You can use looks_like to make a light have a visible object there.
Then use a media glow in that object. It's important to remember
that an object needs to be hollow to contain a visible media.

//example
light_source {
  <0, 0, 0>
  color rgb <1, 1, 1>
  looks_like {
     sphere{<0,0,0>,1
        hollow
        material {
           texture {
              pigment {Clear}
           }
           interior {
              media{
                 emission 0.75
                 scattering {1, 0.5}
                 density {
                    spherical
                    color_map {
                       [0.0 rgb <0,0,0.5>]
                       [0.5 rgb <0.8, 0.8, 0.4>]
                       [1.0 rgb <1,1,1>]
                    }
                 }
              }
           }
        }
     }
  }
}

Also you might want to check out Colefax's lens flares.
http://www.geocities.com/ccolefax/index.html


Post a reply to this message

From: Thomas de Groot
Subject: Re: Glow effect problem
Date: 30 Jan 2007 03:38:19
Message: <45bf03fb@news.povray.org>
.... and Megapov has a glow effect too!
http://megapov.inetart.net/

Thomas


Post a reply to this message

From: Mike8
Subject: Re: Glow effect problem
Date: 30 Jan 2007 12:55:00
Message: <web.45bf857112efcd2e97986bf60@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> You can use looks_like to make a light have a visible object there.
> Then use a media glow in that object. It's important to remember
> that an object needs to be hollow to contain a visible media.
>
> //example
> light_source {
>   <0, 0, 0>
>   color rgb <1, 1, 1>
>   looks_like {
>      sphere{<0,0,0>,1
>         hollow
>         material {
>            texture {
>               pigment {Clear}
>            }
>            interior {
>               media{
>                  emission 0.75
>                  scattering {1, 0.5}
>                  density {
>                     spherical
>                     color_map {
>                        [0.0 rgb <0,0,0.5>]
>                        [0.5 rgb <0.8, 0.8, 0.4>]
>                        [1.0 rgb <1,1,1>]
>                     }
>                  }
>               }
>            }
>         }
>      }
>   }
> }
Thanks, the code works well, but I've hit another problem. My light source
is already contained in a translucent object, like a lightbulb.
Unfortunately, it seems to be blocking the glow effect. Is there a way to
correct this, without making the lightbulb invisible? Thanks.
Also, is it possible to add the same kind of glow effect to objects other
than light sources?
I hope I'm not asking to many questions. Thanks for everyone's input!
Michael


Post a reply to this message

From: Tim Attwood
Subject: Re: Glow effect problem
Date: 31 Jan 2007 01:26:03
Message: <45c0367b$1@news.povray.org>
> Thanks, the code works well, but I've hit another problem. My light source
> is already contained in a translucent object, like a lightbulb.
> Unfortunately, it seems to be blocking the glow effect. Is there a way to
> correct this, without making the lightbulb invisible? Thanks.

Media effects can't exist inside of a non-hollow object... so you
can just add the hollow keyword to your lightbulb object , or you
could difference out the insides.

object {LightBulb hollow ...}

or

global_settings {
   assumed_gamma 2.2
   max_trace_level 10
}

#declare glow = material {...};
#declare glass = material {
   texture {
      pigment {Clear}
      finish { phong 0.3
               reflection 0.3}
   }
   interior {ior 1.3}
};
#declare LightBulb = difference {
   sphere{<0,0,0>,1}
   sphere{<0,0,0>,0.99}
};
object{LightBulb material{glass}}

> Also, is it possible to add the same kind of glow effect to objects other
> than light sources?

You can use a media inside any hollow translucent object,
there doesn't need to be a light involved.

light_source {  <0, 0, 0>
  color rgb <1, 1, 1>
}
sphere {<0,0,0>,0.989 hollow material{glow}}

or

light_source {
  <0, 0, 0>
  color rgb <1, 1, 1>
  looks_like {
     sphere {<0,0,0>,0.989 hollow material{glow}}
 }
}

The looks_like removes the interaction of the light
and the media though, so if you don't use it the
light will be attenuated by the media.

You can also use a media statement alone, then it is
applied to the whole scene, (except inside non-hollow
objects), that's good for a hazy look but can be
somewhat slow.


Post a reply to this message

From: Alain
Subject: Re: Glow effect problem
Date: 31 Jan 2007 17:31:40
Message: <45c118cc$1@news.povray.org>
Mike8 nous apporta ses lumieres en ce 30-01-2007 12:50:
> "Tim Attwood" <tim### [at] comcastnet> wrote:
>> You can use looks_like to make a light have a visible object there.
>> Then use a media glow in that object. It's important to remember
>> that an object needs to be hollow to contain a visible media.
>>
>> //example
>> light_source {
>>   <0, 0, 0>
>>   color rgb <1, 1, 1>
>>   looks_like {
>>      sphere{<0,0,0>,1
>>         hollow
>>         material {
>>            texture {
>>               pigment {Clear}
>>            }
>>            interior {
>>               media{
>>                  emission 0.75
>>                  scattering {1, 0.5}
>>                  density {
>>                     spherical
>>                     color_map {
>>                        [0.0 rgb <0,0,0.5>]
>>                        [0.5 rgb <0.8, 0.8, 0.4>]
>>                        [1.0 rgb <1,1,1>]
>>                     }
>>                  }
>>               }
>>            }
>>         }
>>      }
>>   }
>> }
> Thanks, the code works well, but I've hit another problem. My light source
> is already contained in a translucent object, like a lightbulb.
> Unfortunately, it seems to be blocking the glow effect. Is there a way to
> correct this, without making the lightbulb invisible? Thanks.
Just make the lightbulb hollow, that way, it will be filled by the media.
You can also surround it with a somewhat larger, totaly transparent object, that 
will contain the media.
> Also, is it possible to add the same kind of glow effect to objects other
> than light sources?
Absolutely!
Just place another, larger transparent hollow object around it. Fill that shell 
with some emissive media.
> I hope I'm not asking to many questions. Thanks for everyone's input!
> Michael
> 
> 
> 
> 

By adding those transparent objects, you may get some dark spots. That appens 
when you reatch the max_trace_level. Just set it to a larger value in the 
global_settings block, the default value is 5.

-- 
Alain
-------------------------------------------------
No matter how much you do, you never do enough.


Post a reply to this message

From: Mike8
Subject: Re: Glow effect problem
Date: 1 Feb 2007 20:30:00
Message: <web.45c2940b12efcd2e9c03588e0@news.povray.org>
Hey all,

    Thank you to everyone, you've been extremely helpful! I have just one
more question on this subject. The media glow effect that I created using
the code all of you provided works very well. The only thing wrong with it,
is that the brightness of the glow doesn't fade at the edge, it's just a
sharp, though translucent, edge. I hope that makes sense. How can I change
this? Again, thanks for all of your help!
Michael


Post a reply to this message

From: Tim Attwood
Subject: Re: Glow effect problem
Date: 2 Feb 2007 01:57:56
Message: <45c2e0f4$1@news.povray.org>
>    Thank you to everyone, you've been extremely helpful! I have just one
> more question on this subject. The media glow effect that I created using
> the code all of you provided works very well. The only thing wrong with 
> it,
> is that the brightness of the glow doesn't fade at the edge, it's just a
> sharp, though translucent, edge. I hope that makes sense. How can I change
> this? Again, thanks for all of your help!

If you want to not see the edges you need to fade the color_map
for the density to clear at the edges.
[0.0 rgb <0,0,0>]


Post a reply to this message

From: Mike8
Subject: Re: Glow effect problem
Date: 4 Feb 2007 22:30:00
Message: <web.45c6a3d212efcd2e68bb41110@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> >    Thank you to everyone, you've been extremely helpful! I have just one
> > more question on this subject. The media glow effect that I created using
> > the code all of you provided works very well. The only thing wrong with
> > it,
> > is that the brightness of the glow doesn't fade at the edge, it's just a
> > sharp, though translucent, edge. I hope that makes sense. How can I change
> > this? Again, thanks for all of your help!
>
> If you want to not see the edges you need to fade the color_map
> for the density to clear at the edges.
> [0.0 rgb <0,0,0>]

Hey,
    Well, that works well in my small test scene, but in the main scene the
fade problem remains. The color map is
                      [0.0 rgb<0,0,0.5>]
                      [0.5 rgb<0.4,0.4,0.8>]
                      [1.0 rgb<1,1,1>]
At the very center, there is a white sphere. Everywhere else, there is
either a blue glow (the first rgb value) or nothing, depending on what I
input for the first rgb set. The code in the test scene and the main scene
is identical. What's going on? Thanks,
    Michael


Post a reply to this message

From: Tim Attwood
Subject: Re: Glow effect problem
Date: 5 Feb 2007 03:43:33
Message: <45c6ee35$1@news.povray.org>
> At the very center, there is a white sphere. Everywhere else, there is
> either a blue glow (the first rgb value) or nothing, depending on what I
> input for the first rgb set. The code in the test scene and the main scene
> is identical. What's going on? Thanks,

Color maps fade from 0 to 1 linearly, but the spherical pattern
is going along a curve. You can tweak the location and color
to suit what you want in the color map. The colors are added
to the background color, white tends to saturate...

However, the spherical pattern is located at the origin, to move
it you need to define it at the origin, and then translate it.
You won't see the spherical pattern if you just place the container
object elsewhere.

This is correct:
sphere {<0,0,0>,1 hollow material{glow} translate <0,1,0>}

This is wrong:
sphere {<0,1,0>,1 hollow material{glow} }


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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