POV-Ray : Newsgroups : povray.advanced-users : Trying to get a lighting effect to work. (A sort of glow) Server Time
24 Nov 2024 01:24:12 EST (-0500)
  Trying to get a lighting effect to work. (A sort of glow) (Message 1 to 5 of 5)  
From: Drake
Subject: Trying to get a lighting effect to work. (A sort of glow)
Date: 23 Mar 2010 00:15:00
Message: <web.4ba83f2470683d5e99d6d1320@news.povray.org>
I've been trying to get a material to glow without effecting its surroundings
with a 'blinding' light, but in order to get the glowing part of the scene to
look how I want it to, the rest of the scene is illuminated far too greatly.

In the scene below, I would like some reflection of the light in the water, but
it's a bit overpowering as it is now, and the ramp beneath the light is also
illuminated much more brightly than desired.

//-----------------------------

#include "functions.inc"




//--What I believe needs adjustment
#declare M_Glass_Blue = material
{
    texture
    {
    pigment{rgbf<0,.6,1,1.2>}
    finish
    {
        ambient 0.0
        diffuse 0.05
        specular 0.6
        roughness 0.005
        reflection
        {
            0.1, 0.9
            fresnel on
        }
        conserve_energy
    }
    }
    interior
    {
        ior 1.5
        fade_power 10001
        fade_distance 0.1
        fade_color <0,.6,1>
    }
}




light_source
{
    <-1,.5,-.75>*1000
    rgb 1
}

#declare Chevron=union
{
    union
    {
    box
    {
        <-.1,0,-.35><.1,.1,-.3>
    }
    box
    {
        <.4,0,-.65><.45,.1,0>
        matrix<
        1,0,0,
        0,1,0,
        .5,0,1,
        0,0,.3>
    }
    box
    {
        <-.4,0,-.65><-.45,.1,0>
        matrix<
        1,0,0,
        0,1,0,
        -.5,0,1,
        0,0,.3>
    }
    box
    {
        <.4,0,.2><.45,.1,0>
        matrix<
        1,0,0,
        0,1,0,
        -.5,0,1,
        0,0,.3>
    }
    box
    {
        <-.4,0,0><-.45,.1,.2>
        matrix<
        1,0,0,
        0,1,0,
        .5,0,1,
        0,0,.3>
    }
    box
    {
        <-.35,0,.45><.35,.1,.5>
    }

    box
    {
        <.2,0,-.65><.41,.01,0>
        matrix<
        1,0,0,
        0,1,0,
        .5,0,1,
        0,0,.3>
    }
    box
    {
        <-.2,0,-.65><-.41,.01,0>
        matrix<
        1,0,0,
        0,1,0,
        -.5,0,1,
        0,0,.3>
    }
    box
    {
        <0,0,.16><.41,.01,0>
        matrix<
        1,0,0,
        0,1,0,
        -.5,0,1,
        0,0,.3>
    }
    box
    {
        <0,0,.16><-.41,.01,0>
        matrix<
        1,0,0,
        0,1,0,
        .5,0,1,
        0,0,.3>
    }
    box
    {
        <-.21,0,-.1><.21,.01,.35>
    }

    pigment{rgb .7}
    }
    union
    {
    difference
    {
        merge
        {
        box
        {
            <.2,.005,-.625><.41,.2,0>
            matrix<
            1,0,0,
            0,1,0,
            .5,0,1,
            0,0,.3>
        }
        box
        {
            <-.2,.005,-.625><-.41,.2,0>
            matrix<
            1,0,0,
            0,1,0,
            -.5,0,1,
            0,0,.3>
        }
        box
        {
            <0,.005,.16><.41,.2,0>
            matrix<
            1,0,0,
            0,1,0,
            -.5,0,1,
            0,0,.3>
        }
        box
        {
            <0,.005,.16><-.41,.2,0>
            matrix<
            1,0,0,
            0,1,0,
            .5,0,1,
            0,0,.3>
        }
        box
        {
            <-.21,.005,-.1><.21,.2,.35>
        }
        }


        box
        {
            <.3,-.2,-1><1,.2,.5>
            matrix<
                1,0,0,
                -1,1,1,
                .5,0,1,
                .1,.1,.3>
        }
        box
        {
            <-.3,-.2,-1><-1,.2,.5>
            matrix<
                1,0,0,
                1,1,1,
                -.5,0,1,
                -.1,.1,.3>
        }
        box
        {
            <-.3,-.2,-1><.3,.2,0>
            matrix<
                1,0,0,
                0,1,1.5,
                0,0,1,
                0,.1,-.3>
        }
        box
        {
            <.3,-.2,-1><1,.2,.5>
            matrix<
                1,0,0,
                -1,1,-1,
                -.5,0,1,
                .1,.1,.3>
            }
            box
            {
                <-.3,-.2,-1><-1,.2,.5>
                matrix<
                    1,0,0,
                    1,1,-1,
                    .5,0,1,
                    -.1,.1,.3>
            }
            box
            {
                <-.5,-.2,.45><.5,.2,1>
                matrix<
                    1,0,0,
                    0,1,-1.5,
                    0,0,1,
                    0,.1,0>
            }
            box{<-.5,.15,-.7><.5,.3,.5>}
        }

        material{M_Glass_Blue}
    }
    //--These seven light sources illuminate the material
    union
    {
        light_source{<0,.1,.15> rgb<0,.6,1>}
        #local i=0;
        #while (i<2*pi)
            light_source{<.15*cos(i),.1,.15+.15*sin(i)> rgb<0,.6,1>}
            #local i=i+pi/3;
        #end
    }
}

object{Chevron scale 1.5 translate<0,.25,9.5> rotate y*40 translate<0,-.5,0>
rotate x*-90 translate<0,7,0>}

//--plane beneath water
plane
{
    y,-10
    pigment{rgb 0}
}
//--water plane
plane
{
    y,-1
    material {
    texture {
      pigment {
        rgbf <0.2, 0.7, 0.3, 0.5>
      }
      finish {
        ambient 0.0
        diffuse 0.0

        reflection {
          0.0, 1.0
          fresnel on
        }

        specular 0.4
        roughness 0.003
      }
      normal {
        function {
          f_ridged_mf(x, y, z, 0.1, 3.0, 7, 0.7, 0.7, 2)
        } 0.8
        scale 0.25
      }
    }
    interior {
      ior 1.3
    }
  }

}

//--Platform raised above water surface
union
{
    box
    {
        <-5,-100,-1><5,0,1>
        matrix<
            1,0,0,
            .5,1,-5,
            0,0,1,
            0,1,0>
    }
    box
    {
        <-5,-100,-1><5,0,1>
        matrix<
            1,0,0,
            .5,1,5,
            0,0,1,
            0,1,0>
    }
    box
    {
        <-5,-100,-1><5,0,1>
        matrix<
            1,0,0,
            -.5,1,-5,
            0,0,1,
            0,1,0>
    }
    box
    {
        <-5,-100,-1><5,0,1>
        matrix<
            1,0,0,
            -.5,1,5,
            0,0,1,
            0,1,0>
    }

    pigment{rgb .8}
}

camera
{
    location<0,1,0>*30
    look_at<0,0,0>
    rotate -x*95
    rotate -y*0
    translate<0,1.75,0>
}

sky_sphere
{
    pigment
    {
        gradient y
        color_map
        {
            [  0/269 rgb<120/255, 79/255, 51/255>]
            [  1/269 rgb<141/255, 83/255, 46/255>]
            [  2/269 rgb<177/255, 86/255, 41/255>]
            [  3/269 rgb<235/255,128/255, 72/255>]
            [  5/269 rgb<255/255,159/255, 72/255>]
            [  8/269 rgb<255/255,203/255, 94/255>] // New
            [ 10/269 rgb<255/255,218/255,112/255>]
            [ 13/269 rgb<255/255,233/255,148/255>] // New
            [ 15/269 rgb<251/255,241/255,172/255>] // New
            [ 20/269 rgb<255/255,246/255,203/255>]
            [ 30/269 rgb<255/255,240/255,219/255>]
            [ 40/269 rgb<236/255,223/255,214/255>]
            [ 50/269 rgb<205/255,204/255,212/255>]
            [ 55/269 rgb<185/255,190/255,209/255>] // New
            [ 60/269 rgb<166/255,176/255,201/255>]
            [ 65/269 rgb<149/255,163/255,190/255>] // New
            [ 70/269 rgb<129/255,149/255,182/255>]
            [ 80/269 rgb<103/255,127/255,171/255>]
            [ 90/269 rgb< 79/255,110/255,154/255>]
            [100/269 rgb< 66/255, 97/255,143/255>]
            [110/269 rgb< 52/255, 84/255,131/255>]
            [120/269 rgb< 47/255, 75/255,122/255>]
            [140/269 rgb< 37/255, 60/255,102/255>]
            [160/269 rgb< 32/255, 51/255, 84/255>]
            [180/269 rgb< 27/255, 42/255, 71/255>]
            [200/269 rgb< 25/255, 36/255, 58/255>]
            [220/269 rgb< 22/255, 31/255, 48/255>]
            [240/269 rgb< 18/255, 27/255, 42/255>]
            [260/269 rgb< 15/255, 21/255, 33/255>]
            [269/269 rgb< 15/255, 21/255, 33/255>]
        }
    }
}

//-------------------------------

Any suggestions on maintaining a similar look for the light fixture while
diminishing its effect on the surrounding scene would be appreciated.


Post a reply to this message

From: Jim Holsenback
Subject: Re: Trying to get a lighting effect to work. (A sort of glow)
Date: 23 Mar 2010 03:45:17
Message: <4ba8718d$1@news.povray.org>
On Tue, 23 Mar 2010 00:11:39 -0400, Drake wrote:

> 
> Any suggestions on maintaining a similar look for the light fixture
> while diminishing its effect on the surrounding scene would be
> appreciated.


lot of lights there, maybe you should checkout:
http://wiki.povray.org/content/
Documentation:Reference_Section_4.4#Area_Lights

but this might be what you're looking for:

http://wiki.povray.org/content/
Documentation:Reference_Section_4.5#Light_Groups

Jim


Post a reply to this message

From: Kenneth
Subject: Re: Trying to get a lighting effect to work. (A sort of glow)
Date: 23 Mar 2010 06:05:01
Message: <web.4ba8911039a18e3d65f302820@news.povray.org>
I would echo Jim's comments on using a light_group setup--one group (of all the
lights) for the chevron, one for everything else. (The same lights in each, but
with different intensities.)

Another way of going about your problem would be to give your lights a
fade_distance and fade_power.  With a bit of tweaking, you could probably get
the chevron to look the way you want, as well as the surroundings.

BTW, that's a *really* nice sunset pigment for your sky_sphere! I may have to
'borrow' it for future scenes.  :-)

Ken


Post a reply to this message

From: Drake
Subject: Re: Trying to get a lighting effect to work. (A sort of glow)
Date: 23 Mar 2010 12:50:00
Message: <web.4ba8f00839a18e3d99d6d1320@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> I would echo Jim's comments on using a light_group setup--one group (of all the
> lights) for the chevron, one for everything else. (The same lights in each, but
> with different intensities.)
>
> Another way of going about your problem would be to give your lights a
> fade_distance and fade_power.  With a bit of tweaking, you could probably get
> the chevron to look the way you want, as well as the surroundings.
>
> BTW, that's a *really* nice sunset pigment for your sky_sphere! I may have to
> 'borrow' it for future scenes.  :-)
>
> Ken

I tried using fade_distance and fade_power on the lights and it works great!
Thanks a lot :)

As for the sky_sphere, I 'borrowed' it as well.
http://povray.tashcorp.net/tutorials/qd_realskysphere/


Post a reply to this message

From: Alain
Subject: Re: Trying to get a lighting effect to work. (A sort of glow)
Date: 23 Mar 2010 15:37:45
Message: <4ba91889$1@news.povray.org>

> I've been trying to get a material to glow without effecting its surroundings
> with a 'blinding' light, but in order to get the glowing part of the scene to
> look how I want it to, the rest of the scene is illuminated far too greatly.
>
> In the scene below, I would like some reflection of the light in the water, but
> it's a bit overpowering as it is now, and the ramp beneath the light is also
> illuminated much more brightly than desired.
>

Just remove the 7 lights used to illuminate your chevron object.
Add this to the material's interior:
media{emission <0,.6,1>*9}

Add hollow just before the material statement to enable the object to 
contain the media.
Alter the multiplicator to get the desired intensity.

You can change the media to:
media{emission <0,.6,1>*9 density{ spherical}}

if you don't want it to be uniform.
Good thing that you defined it near the origin.



Alain


Post a reply to this message

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