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
25 Apr 2024 10:56:50 EDT (-0400)
  Re: How to avoid the artifacts about height_map?  
From: Kenneth
Date: 4 Jan 2013 06:45:00
Message: <web.50e6bf9cd45462dac2d977c20@news.povray.org>
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}
}


Post a reply to this message

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