POV-Ray : Newsgroups : povray.newusers : problem with light source Server Time
23 Nov 2024 17:37:07 EST (-0500)
  problem with light source (Message 1 to 8 of 8)  
From: Kokni me
Subject: problem with light source
Date: 25 May 2012 06:30:01
Message: <web.4fbf5e4e730a93abf14493220@news.povray.org>
Can somebody tell why is sphere in light_source, looks_like black?


#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"


#global_settings {ambient_light Yellow}

#declare FRONT_TEXTURE = texture {

 pigment {
 color red 0.439215 green 0.847058 blue  0.407843
}
 finish {
 ambient 0.5
 diffuse 0.4}
}
 #declare BACK_TEXTURE = texture {

 pigment {
 color red 0.980392 green  0.862745 blue  0.415686
}
 finish {
 ambient 0.8
 diffuse 0.6
 phong 0.5
 phong_size 1

 }
}

#include "Mesh.inc"

//Plane
 plane { y,-2800
     pigment {
        checker color red 0.99 green 0.1 blue 0.070588 color red 0.121568 green
0.558823 blue 0.19607
        scale 1600
    }
     finish {
        ambient 0.2
        diffuse 0.9
        phong 0.9
        phong_size 100
    }
 }
plane { -z, 12500
    pigment {
        checker color red 0.99 green 0.1 blue 0.070588 color red 0.121568 green
0.558823 blue 0.19607
        scale 1600
    }
    finish { ambient 0.1 diffuse 0.6 }
}

//camera
 camera {
 angle 59
 location  <-200.0, 300.0, 590.0>
 right     <1, 0.0,  0.0>
 up        <0., 1, -0.5>
 rotate    <-4,-11,0>
 direction <0.35, -0.5,  -1.0>
 }


#declare svjetlo = sphere {
        <10.5, 10, 0>, 80
        pigment {
        color White
        translate <1.5, 0, 0>
   }
}


 // Light source

 light_source {
                <-280,180,-400>
                color White

                looks_like {
                          sphere
                                { <-0,0,-0>,20
                                  //color White
                                  finish {
                                        ambient -0.9
                                        diffuse 0.9
                                        phong 1
                                  }
                 }
  }
  translate <-10,150,700>
  }


Post a reply to this message

From: Warp
Subject: Re: problem with light source
Date: 25 May 2012 06:44:47
Message: <4fbf629f@news.povray.org>
Kokni_me <nomail@nomail> wrote:
> Can somebody tell why is sphere in light_source, looks_like black?

  Because nothing is illuminating it and its ambient is negative. (Well,
technically speaking something *is* illuminating: The light source in
question. The problem is that it's illuminating it from the inside, not
the outside.)

  The easiest way to make it fully white is to specify "ambient 1" in
the sphere's finish.

-- 
                                                          - Warp


Post a reply to this message

From: Kokni me
Subject: Re: problem with light source
Date: 25 May 2012 07:05:01
Message: <web.4fbf667e89971957f14493220@news.povray.org>
Yeah, that helped. And could You tell me, how can I make it blurry, so that I
have more realistic source of light?


Warp <war### [at] tagpovrayorg> wrote:
> Kokni_me <nomail@nomail> wrote:
> > Can somebody tell why is sphere in light_source, looks_like black?
>
>   Because nothing is illuminating it and its ambient is negative. (Well,
> technically speaking something *is* illuminating: The light source in
> question. The problem is that it's illuminating it from the inside, not
> the outside.)
>
>   The easiest way to make it fully white is to specify "ambient 1" in
> the sphere's finish.
>
> --
>                                                           - Warp


Post a reply to this message

From: Kokni me
Subject: Re: problem with light source
Date: 25 May 2012 07:25:01
Message: <web.4fbf6ade89971957f14493220@news.povray.org>
I want it to look something like this:
http://imageshack.us/photo/my-images/856/povrayslika1.jpg/


Post a reply to this message

From: Warp
Subject: Re: problem with light source
Date: 25 May 2012 07:51:39
Message: <4fbf724b@news.povray.org>
Kokni_me <nomail@nomail> wrote:
> Yeah, that helped. And could You tell me, how can I make it blurry, so that I
> have more realistic source of light?

  You have two options, one "proper", and another using a trick.

1) The "proper" way to do that is to make the sphere completely transparent
(by making its pigment be "transmit 1") and then add a spherical emitting
media inside it. (Remember to use the keyword 'hollow' in the sphere or
else the media won't show up.)

2) The easier and faster way is to use a trick: Make the sphere completely
transparent (with "transmit 1") like above, but instead of adding a media
to it, add "specular 1" to its finish. (You can fine-tune the brightness
and size of the apparent "halo" produced this way by changing that 1 to
something else as well as specifying different values of "roughness".
Start with "roughness 0.01".)

  I recommend trying the second method first, as it will probably suit
your needs.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: problem with light source
Date: 25 May 2012 07:55:36
Message: <4fbf7338@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> 2) The easier and faster way is to use a trick: Make the sphere completely
> transparent (with "transmit 1") like above, but instead of adding a media
> to it, add "specular 1" to its finish. (You can fine-tune the brightness
> and size of the apparent "halo" produced this way by changing that 1 to
> something else as well as specifying different values of "roughness".
> Start with "roughness 0.01".)

  Btw, this has the downside that now other lights will shine on this
transparent sphere as well. You can fix that problem by using light groups
(http://wiki.povray.org/content/Reference:Light_Group)

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: problem with light source
Date: 25 May 2012 20:49:14
Message: <4fc0288a$1@news.povray.org>
Am 25.05.2012 13:51, schrieb Warp:
> Kokni_me<nomail@nomail>  wrote:
>> Yeah, that helped. And could You tell me, how can I make it blurry, so that I
>> have more realistic source of light?
>
>    You have two options, one "proper", and another using a trick.
>
> 1) The "proper" way to do that is to make the sphere completely transparent
> (by making its pigment be "transmit 1") and then add a spherical emitting
> media inside it. (Remember to use the keyword 'hollow' in the sphere or
> else the media won't show up.)

With this approach, make sure to explicitly specify "specular 0".

> 2) The easier and faster way is to use a trick: Make the sphere completely
> transparent (with "transmit 1") like above, but instead of adding a media
> to it, add "specular 1" to its finish. (You can fine-tune the brightness
> and size of the apparent "halo" produced this way by changing that 1 to
> something else as well as specifying different values of "roughness".
> Start with "roughness 0.01".)

or, 3) If you're using POV-Ray 3.7, you can make use of the "aoi" 
pattern to blend between rgbt <1,1,1,1> and rgbt <1,1,1,0>.


Post a reply to this message

From: Alain
Subject: Re: problem with light source
Date: 26 May 2012 22:28:03
Message: <4fc19133$1@news.povray.org>

> I want it to look something like this:
> http://imageshack.us/photo/my-images/856/povrayslika1.jpg/
>
>

In that image, you don't see the light_source at all, but the highlight 
they cause.
The sources are well out of view of the camera and there are no 
reflective surface.

In POV_Ray, there are 2 models of highlight: specular and phong

To turn it on, you simply add in the finish of the objects that are to 
show them:
(this renders fast)

phong [value] phong_size [value]
(use large phong_size to make smaller highlight)

or

specular [value] roughness [value]
(use small roughness to make the highlight smaller)


(this can be quite slow)
Another option is to use blured reflection, but it can greatly increase 
the render time, especialy if you have inter-reflections of surfaces 
using blured reflection...
Can be aleviated using 2 instances of the objects, one been 
no_reflection having the blured reflection and one with no_image having 
only regular reflection.


If you do see the light_source, then the propositions from Warp are good 
ones.
(this can be VERY slow)
You can also put some scattering media filling your scene, the best one 
been probably scattering type 3.
This will greatly affect your rendering time.



Alain


Post a reply to this message

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