POV-Ray : Newsgroups : povray.news-submissions : How to avoid the artifacts about height_map? : Re: How to avoid the artifacts about height_map? Server Time
20 Apr 2024 09:12:31 EDT (-0400)
  Re: How to avoid the artifacts about height_map?  
From: Terry  Chen
Date: 4 Jan 2013 22:00:01
Message: <web.50e796a0d45462da362c5d560@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Your intersection is not serving any purpose, because the 'box' part of
> the intersection is actually the same size or slightly larger than your
> height_field. So the result is just the height_field itself. (If the box were
> smaller, then it would successfully 'trim off' part of the height_field.) By the
> way, it's usually a good idea to scale down a height_field in the y-dimension,
> for example <1,.25,1>. Without scaling it, it takes up an entire 1X1X1 cubic
> space, and looks very jagged and odd when it's that tall. I'm guessing that you
> don't want it to be so tall.
>
> I think what's mostly confusing the scene is the pigment{rgbt <1,1,1,1>} for the
> entire intersection. I assume you want it there, in order to see through the
> height_field's 'water' to the bottom plane. But if the effect has ended up
> looking grainy and strange, it's a result of global_settings{max_trace_level
> ....}  needing a boost. (Take a look in the documentation for max_trace_level.)
> The default is 5; but your height_field has reflection and ior (both at *high*
> values, which may not be a good idea), so a camera ray is having to do a lot of
> work on its way to the bottom plane. If max_trace_level is too low, you'll
> always see dark spots, or graniness. Try a higher value.
>
> Another suggestion would be to use as high-resolution an image as you can, to
> make your height_field.
>
> Here's your intersection code slightly re-worked:
>
> intersection{
> height_field {
> sys "Surface.bmp"
> smooth
> scale <1,.15,1>
> translate -.001*y // to eliminate any possible 'coincident surfaces' between
> // height_field and bottom plane. It puts the bottom of the water slightly
> // *below* the plane, but that's OK.
>  }
> box{
> -.1,.7 // this trims the height_field somewhat. And it's an easier way of
> // writing <-.1,-.1,-.1>, <.7,.7,.7>
>  }
>
>  texture
>     {
>         pigment {color rgbt <1, 1, 1, 1> } // or simply rgbt 1
>         finish
>         {
>             ambient 0.0
>             diffuse 0.0
>             reflection
>             {
>                 0.02, 1.0
>                 fresnel on
>             }
>             specular 1
>             roughness .003
>         }
>      }
> interior {ior 1.333}
> }

Thank you very much, but it still has problems , for the side faces of the
intersection object no refractions came out. The front and left face seem that
they don't exist, so we can directly see the bottom as if no water is here.

from http://www.f-lohmueller.de/pov_tut/all_shapes/shapes655e.htm,
I changed the sign of D,finally this can get a good result.What shocks me is
that the sign is very important. Only <D,-D,D> works well.


#declare D = 0.00001;

intersection{
height_field {
sys "Surface.bmp"
smooth

   translate<0,D,0>

 }
box{
 <D,-D,D>,<1+D,1+D,1+D>

 }
 texture
    {
        pigment {   color rgbf <1, 1, 1, 1> }
        finish
        {
            ambient 0.0
            diffuse 0.0  //
            reflection
            {
                0.02, 1.0
                fresnel on
            }
            specular 1
            roughness .03
        }
     }
interior {ior 1.33
//  dispersion  1.01

 }
}


Post a reply to this message

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