POV-Ray : Newsgroups : povray.newusers : Need help on lighting and glass materials please Server Time
24 Nov 2024 07:13:32 EST (-0500)
  Need help on lighting and glass materials please (Message 1 to 7 of 7)  
From: tizer001
Subject: Need help on lighting and glass materials please
Date: 8 Sep 2009 08:40:00
Message: <web.4aa64f7175ff90ec9dacbac0@news.povray.org>
Hi all,

I'm new to Povray and have learned most of the basics so far to achieve what I
want. However I am trying to create an image with some glass objects and can't
quite get the lighting and vibrancy how I want it.

This is an image here:- http://www.flickr.com/photos/40381418@N02/3717188064/
on Flickr. Can anyone show how this image was made, especially the lighting and
the glass material and how it's so vivid and vibrant please.

Any help/pointer would be greatly appreciated.

thanks

Tizer001


Post a reply to this message

From: clipka
Subject: Re: Need help on lighting and glass materials please
Date: 8 Sep 2009 09:48:43
Message: <4aa660bb@news.povray.org>
tizer001 schrieb:
> This is an image here:- http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the lighting and
> the glass material and how it's so vivid and vibrant please.

I'm not sure how to do the same lighting in POV-Ray, but as for vibrant 
colors, be bold: Set some color components to /negative/ values!

Caveat: In POV-Ray, this messes up photons and caustics computations.


Post a reply to this message

From: Alain
Subject: Re: Need help on lighting and glass materials please
Date: 8 Sep 2009 12:56:33
Message: <4aa68cc1$1@news.povray.org>

> Hi all,
> 
> I'm new to Povray and have learned most of the basics so far to achieve what I
> want. However I am trying to create an image with some glass objects and can't
> quite get the lighting and vibrancy how I want it.
> 
> This is an image here:- http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the lighting and
> the glass material and how it's so vivid and vibrant please.
> 
> Any help/pointer would be greatly appreciated.
> 
> thanks
> 
> Tizer001
> 
> 
> 
Any glass object need some additional parameters:

  - An interior block that contains an ior
  - That interior block can also include a fade_color, fade_distance and 
fade_power to set the colour of the substance composing the object.
  - To increase realism, add some dispersion. This increase the 
rendering time.

With no ior, light won't bend, resulting in an object looking somewhat 
like a bubble.

Sample interior block:
interior{ior 1.5 // typical class
	dispersion 1.03 // should be kept low and > 1 to be realistic
	fade_dolor rgb<0.7, 0.75, 0.9>// a bluish glass
	fade_distance 10 // relatively small effect. Adjust for the size of 
your object.
	fade_power 1 // or 1001 to use "exponential" fading
}

The finish should include a variable reflection block with the fresnel 
option. Don't forget to add conserve_energy to the finish.

Sample complete finish:
finish{ambient 0 diffuse 0.1 // don't interact much directly with the light
  specular 0.7 roughness 0.0001 // get relatively tight highlights
  reflection{0.1 0.95 fresnel} // prety normal for glass
  conserve_energy}

The highlights realy add a lot. They help give perceptual volume to the 
objects.

To get realistic caustics, you need to add a photons{} block to the 
global_settings AND another photons block to your glass object.

Sample minimal global photons block:
photons{count 1000000}// set how many photons you want to shoot
photons{spacing 0.01} // set the density at whitch you want the photons shot

Glass object typical photons block:
photons{ target // enable shooting photons at this object
  refraction on // turn photons refraction on
  reflection on // turn photons reflection on
  collect off // save time. Photons don't show much on transparent 
objects anyway.
}

Your light_source don't need a photons block. It have the folowing 
DEFAULT one:
photons{refraction on reflection on}

A lone glass object is rather boring. It needs some environment to realy 
show. Even if you don't see them, a sky_sphere or some ther objects can 
help.


Alain


Post a reply to this message

From: Robert McGregor
Subject: Re: Need help on lighting and glass materials please
Date: 8 Sep 2009 13:55:00
Message: <web.4aa6999af02dae4686ff1d480@news.povray.org>
"tizer001" <tiz### [at] hotmailcom> wrote:
> Hi all,
>
> I'm new to Povray and have learned most of the basics so far to achieve what I
> want. However I am trying to create an image with some glass objects and can't
> quite get the lighting and vibrancy how I want it.
>
> This is an image here:- http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the lighting and
> the glass material and how it's so vivid and vibrant please.
>
> Any help/pointer would be greatly appreciated.
>
> thanks
>
> Tizer001

In addition to photons and whatnot (as Alain said in his post) try using filter
in the pigment block to make the color more vibrant, e.g.:

sphere { 0, 1
   pigment { Red transmit 0.25 filter 0.75 }
   finish {
      diffuse 0.1
      reflection { 0.1, 0.8 fresnel on } conserve_energy
      specular 0.5
      roughness 0.01
   }
   interior { ior 1.5 }
}


Post a reply to this message

From: Reactor
Subject: Re: Need help on lighting and glass materials please
Date: 8 Sep 2009 15:00:01
Message: <web.4aa6a8e0f02dae462b982c670@news.povray.org>
"tizer001" <tiz### [at] hotmailcom> wrote:
> Hi all,
>
> I'm new to Povray and have learned most of the basics so far to achieve what I
> want. However I am trying to create an image with some glass objects and can't
> quite get the lighting and vibrancy how I want it.
>
> This is an image here:- http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the lighting and
> the glass material and how it's so vivid and vibrant please.
>
> Any help/pointer would be greatly appreciated.
>
> thanks
>
> Tizer001

What version of POV-ray are you using?  If you are using the most recent beta,
you may want to temporarily turn off gamma correction and see if that is closer
to what you were looking for.

Add the code #version 3.6; to the top of your scene and remove the assumed_gamma
from the global settings block (if it is there) to turn it off.


-Reactor


Post a reply to this message

From: m a r c
Subject: Re: Need help on lighting and glass materials please
Date: 9 Sep 2009 08:32:43
Message: <4aa7a06b$1@news.povray.org>

web.4aa64f7175ff90ec9dacbac0@news.povray.org...
> Hi all,
> This is an image here:- 
> http://www.flickr.com/photos/40381418@N02/3717188064/
> on Flickr. Can anyone show how this image was made, especially the 
> lighting and
> the glass material and how it's so vivid and vibrant please.
>
> Any help/pointer would be greatly appreciated.
>
I took as a challenge to try and get as close as I could to the image.
The main issue is the ior for which I couldn't find a good value for both 
refraction and caustics width

Marc
.
Here is the code :



#version 3.6

#declare Photons=1;

global_settings {
  max_trace_level 11
  #if (Photons)          // global photon block
    photons {
      spacing 0.02                 // specify the density of photons
      }

  #end
}

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

camera {
  right x*image_width/image_height
  location  <-5,3,-5>
  look_at   <0,0.0,0>
}

light_source {
  <-500,400,200>*.2
  color rgb 1.0
  photons {
    refraction on
    reflection on
  }
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb 1.3]
      [0.7 rgb <0.8,0.8,0.8>]
    }
  }
}


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

plane {
  y, 0
  texture {
    pigment { color rgb 1 }
    finish {ambient 0 diffuse .6 brilliance 0
    reflection {
        .5
      }
    //  conserve_energy
      }
  }
}


#macro M_Glass(Cnt_spheres)
material {
  texture {pigment {color Fadecolors[Cnt_spheres] transmit .7 filter .3}

    finish {
      ambient 0.0
      diffuse 0.0
      specular 1
      roughness 0.005
      reflection {
        0.3, 1
       // fresnel on
        falloff 3
      }
      conserve_energy
    }
  }
  interior {fade_color Fadecolors[Cnt_spheres]
    ior 1.5
  #if(Photons=0)
    caustics .2
  #end
      fade_power 1001
      fade_distance .8

  }
}
#end

#declare 
Fadecolors=array[7]{<1,0,0>,<1,0.5,0>,<1,1,0>,<0,1,0>,<0,0.5,1>,<0,0,1>,<.8,0,.8>};
#declare Rayon=.5;
#declare Nb_spheres=7;
#declare Depart=(Nb_spheres/2)*-Rayon;
#declare Cnt_spheres=0;
#while (Cnt_spheres<Nb_spheres)
        sphere {
                y*Rayon, Rayon
                translate x*(Depart+(Rayon*2*Cnt_spheres))
                M_Glass(Cnt_spheres)
                photons {  // photon block for an object
                        target 1.0
                        refraction on
                        reflection on
                        }
                hollow
                }
         #declare Cnt_spheres=Cnt_spheres+1;
#end


Post a reply to this message

From: steve
Subject: Re: Need help on lighting and glass materials please
Date: 16 Sep 2009 16:00:01
Message: <web.4ab14316f02dae46a82a02bf0@news.povray.org>
> I took as a challenge to try and get as close as I could to the image.
> The main issue is the ior for which I couldn't find a good value for both
> refraction and caustics width
>
> Marc
> .
> Here is the code :


brilliant, marc. a real inspiration to newbies. thanks

steve


Post a reply to this message

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