|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
.... and Megapov has a glow effect too!
http://megapov.inetart.net/
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
|
|