POV-Ray : Newsgroups : povray.general : trying to create mirrored wall, with sun glint : Re: trying to create mirrored wall, with sun glint Server Time
30 Jul 2024 16:17:21 EDT (-0400)
  Re: trying to create mirrored wall, with sun glint  
From: Reactor
Date: 7 Oct 2008 22:20:00
Message: <web.48ec17c9607a3def984f57650@news.povray.org>
"Leef_me" <nomail@nomail> wrote:
> I want to create a wall that mimics the reflectiveness of a building that has
> mirrored glass on the outside. The real effect I would like is the glint when
> you happen to catch the sun as it passes (or you move quickly as in a car)
>
> Can anyone make suggestions for my code, or help me start from scratch if I'm
> going the wrong way?
>
>
> Thank in advance.


Unfortunately, depicting the sun in a mirror is not as simple as it may seem.
One of the difficulties that you may face is the relative brightness between
the sun as a light_source with color 1 and other lightly colored objects in the
scene cannot be reproduced realistically without special techniques.
  Other possible concerns are the type of 'glint' effect you want to see may be
caused by many different things occurring simultaneously that must be
explicitly specified in povray.  For instance, as you may already be aware,
light_sources by default have no visible appearance.  Photons might be required
to duplicate the effect that you want.  Things like lens flares must be
simulated via the use of objects (there are macros for this).

That being said, let's look at your texture.

> // the diffuse setting seems to allow for a spot effect
>
> #declare mirror_texture =  texture {
>     pigment {
>       color rgb <1,1,1>
>     }
>     finish { reflection {1} ambient .0 diffuse .6
> //    finish { reflection {1} ambient 0 diffuse 0
>     }
> }


I recommend changing this to something more like:


#declare mirror_texture =  texture {
    pigment {
      color rgb <0.900,1.000,0.975>//<1,1,1>
    }
    finish {
        specular 1 roughness 0.001  // use one or the other,
        // phong 5 phong_size 200   // both generally not needed
        reflection { 1 metallic 1 }
        ambient 0 diffuse 0
    }

    normal{
    average
    normal_map{
        [1.00 bumps .005 scale 1/4 ]
        [1.00 bumps .010 scale 1 ]
            }
    }
//    finish { reflection {1} ambient 0 diffuse 0
}

The pigment statement:
    I added some color so that the reflection has a slight tint - this could
also have been simulated by using a color vector after the reflection keyword.

The finish statement:
    The specular and roughness keyword will give you bright highlights on the
surface.  Lower roughness values give tighter (smaller) highlights, and should
be used for shinier surfaces (the best value for a scene is usually determined
by experimentation).  Specular can be greater than one, providing brighter
highlights, but color clipping may become an issue, leading to large, bright
highlights that have unusually hard edges.
    I set ambient and diffuse to zero, which is best for perfectly mirrored
objects.  Setting the ambient or diffuse lighting to something other than zero
will cause the object to be shaded in response to the light (or lack of, in the
case of ambient) in addition to being mirrored, which can cause the reflections
to look brighter, in effect reflecting more light than what hits the surface.
That being said, setting specular and phong to zero, setting diffuse to
something greater than one (2 - 5) and boosting the brilliance to about 1000
can give you another, related highlight effect.  However, the angle will be
different from that of the specular highlight, which may be unrealistic in an
area with complex lighting conditions (such as when the shadow of a building
covers part of the mirror).

The normal statement:
    I gave the texture some bumpiness to give the wavy, distorted effect often
present with large pieces of mirrored glass.


        HTH,
    -Reactor


Post a reply to this message

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