POV-Ray : Newsgroups : povray.newusers : Shiny reflection on white plane Server Time
25 Nov 2024 22:53:35 EST (-0500)
  Shiny reflection on white plane (Message 1 to 7 of 7)  
From: goran17
Subject: Shiny reflection on white plane
Date: 20 Feb 2005 03:00:01
Message: <web.4218428e5f9cc17cdc00cc980@news.povray.org>
Hi,

I have just recently stumbled upon POV-Ray, and i am really impressed. It
need it forr something what i thiught will be simple task, I want to make
an image like this: http://www.keywordsanalyzer.com/images/KA-7-v3.jpg

The problem is the white shiny reflection on the floor.

I have managed to apply image on the side of the box (only one side at the
moment, but I will manage it, I guess). I have even found out I have to use
interpolate to make the image nicer. However, no matter how hard I try I
can't get that white floor with reflection. The best I have come up with
is:
http://www.keywordsanalyzer.com/temp/MyTry.gif

This is what I used (disregard two light sources, I need only one). I tried
many different settings for plane's texture like ambient, difussion .. bu
it didn't help.

I would just like to know if this kinf of image is possible with PovRay
(which I guess is), and in what direction I should look at.


#include "colors.inc"    // The include files contain
#include "stones.inc"    // pre-defined scene elements


camera {
    location <0, 1.5, -3>
    look_at  <0, 0.5, 0>
  }


light_source { <1, 2, -3> color White}

// An infinite planar surface
// plane {<A, B, C>, D } where: A*x + B*y + C*z = D
plane {
  y, // <X Y Z> unit surface normal, vector points "away from surface"
  -0 // distance from the origin in the direction of the surface normal
  hollow on // has an inside pigment?
    texture
    {
pigment {White} finish {reflection {0.7}}     }
}


// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 80, -40>   // <x y z> position of light
}


// create a box that extends between the 2 specified points
box {
  <0, 0, 0>  // one corner position <X1 Y1 Z1>
  <1,  1,  0.4>  // other corner position <X2 Y2 Z2>
    texture
    {
        pigment
        {
                image_map
                {
                        png "cover.png"
                        interpolate 4
                }

        }
    }
    rotate<0, -30, 0>

}


Post a reply to this message

From: Slime
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 03:46:19
Message: <42184e5b$1@news.povray.org>
> I have just recently stumbled upon POV-Ray, and i am really impressed. It
> need it forr something what i thiught will be simple task, I want to make
> an image like this: http://www.keywordsanalyzer.com/images/KA-7-v3.jpg
>
> The problem is the white shiny reflection on the floor.


That's a difficult effect to create. First note that your object doesn't
have any detail near the bottom, so the reflection looks plain. You should
try to add more detail to the box if you want to see the effect better.

Reflection adds to the color of an object. A purely white object can't have
a visible reflection because it's already as bright as it can be. So rather
than make the plane white, I suggest making the *background* white so that
the plane reflects it. However, for a shadow, you need to make the plane
partially dependant on the light source and partially dependant on the
reflection; the sum must add up to 1 for a white appearance. Finally, since
you don't want the direction of the light to matter, you must set brilliance
to zero (so that any illuminated area is completely illuminated). This does
all of that:

plane {
 y,0
 pigment {rgb 1}
 finish {
  // diffuse + ambient + reflection = 1 creates pure white light;
  // we don't need ambient since reflection and diffuse does enough
  // (but if you wanted to lower reflection without making the shadow
  // darker, you could use ambient to fill the gap and keep the sum = 1)
  reflection .4
  diffuse .6
  ambient 0
  brilliance 0 // this causes the angle of the incoming light to be
irrelevant
 }
}

background {rgb 1}


That does most of what you want. The remaining problem is that the
reflection doesn't fade nicely to white like in the image you gave. However,
using a "blurred reflection" might give a similar effect. See
http://tag.povray.org/povQandT/languageQandT.html#blurredreflection .
Another option would be to set the no_reflection flag on your box, and then
make a copy of the box using no_image no_shadow (so that it only appears in
reflections), and layer a texture onto it that contains a pigment fading
from transparent to white.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Christoph Hormann
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 04:00:02
Message: <cv9jbb$jks$1@chho.imagico.de>
goran17 wrote:
> Hi,
> 
> I have just recently stumbled upon POV-Ray, and i am really impressed. It
> need it forr something what i thiught will be simple task, I want to make
> an image like this: http://www.keywordsanalyzer.com/images/KA-7-v3.jpg
> 
> The problem is the white shiny reflection on the floor.
> 
> I have managed to apply image on the side of the box (only one side at the
> moment, but I will manage it, I guess). I have even found out I have to use
> interpolate to make the image nicer. However, no matter how hard I try I
> can't get that white floor with reflection. The best I have come up with
> is:
> http://www.keywordsanalyzer.com/temp/MyTry.gif

Try the following:

global_settings {
   assumed_gamma 1
   radiosity{
     pretrace_start 0.08
     pretrace_end   0.001
     count 150
     error_bound 0.2
     recursion_limit 1
   }
}

camera {
	location <0, 1.5, -3>
	look_at  <0, 0.5, 0>
	angle 36
}


plane {
   y, 0

   #declare BlurAmount = 0.15;
   #declare BlurSamples = 20;

   texture {
     average
     texture_map
     {
       #declare Ind = 0;
       #declare S = seed(0);
       #while(Ind < BlurSamples)
         [1
           pigment { color rgb 1.25 }
           finish {
             reflection {0.2, 1.0 fresnel on}
             diffuse 0.7 ambient 0
           }
           normal {
             bumps BlurAmount
             translate <rand(S),rand(S),rand(S)>*10
             scale 1000
           }
         ]
         #declare Ind = Ind+1;
       #end
     }
   }
   interior { ior 1.5 }
}

sky_sphere {
	pigment {
		gradient x
		color_map {
			[0.4 color rgb < 0.700, 0.715, 1.000>*0.5]
			[0.85 color rgb < 1.500, 1.400, 1.250>*1.7]
			
		}
		scale 2
		translate -x
		rotate 20*y
	}
}

box {
	0, <1,  1,  0.4>
	texture {
		pigment {
			color rgb <1,0.9, 0.6>
		}
		finish { ambient 0 diffuse 0.6 }
	}
	rotate<0, -30, 0>
}




-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 23 Sep. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Bob Hughes
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 04:09:15
Message: <421853bb$1@news.povray.org>
Foregoing using something like diffuse reflection (blurs as it fades), and 
therefore some slower technique, you might be able to get by with just 
variable reflection.

Try the following finish for the floor:

 finish {ambient 0.4 diffuse 0.4 reflection {0, 15 falloff 7}}

This seemed okay to me as long as global_settings {assumed_gamma 1} was used 
here. Oh, and I removed your point loight source, too. The reflection 
settings might seem extreme but there's nothing stopping you from doing 
that.

Bob Hughes


Post a reply to this message

From: Bob Hughes
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 04:33:59
Message: <42185987$1@news.povray.org>
Great minds don't think alike. Ha ha ha.

brilliance... hadn't thought to use that. I knew people would suggest 
blurred reflection so I figured I'd go with reflection falloff instead.

I might need to increase the rate of my message receiving, didn't see either 
yours or Christoph's replies before mine went through.

Bob Hughes


Post a reply to this message

From: Warp
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 06:58:51
Message: <42187b7a@news.povray.org>
goran17 <gor### [at] siolnet> wrote:
>   4, 4                // total number of lights in grid (4x*4z = 16 lights)

  Unrelated to your question, but I suggest you use much higher numbers
there, eg. like 10, 10. It won't slow doesn the rendering too much since
you are using adaptive, but the shadow will be much smoother.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Slime
Subject: Re: Shiny reflection on white plane
Date: 20 Feb 2005 13:31:22
Message: <4218d77a$1@news.povray.org>
>   Unrelated to your question, but I suggest you use much higher numbers
> there, eg. like 10, 10.

Personally, I usually go as high as 17,17.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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