POV-Ray : Newsgroups : povray.newusers : smooth heightfield looks patchy. double-illuminate doesnt help Server Time
27 Nov 2024 15:49:04 EST (-0500)
  smooth heightfield looks patchy. double-illuminate doesnt help (Message 1 to 4 of 4)  
From: Marcus Lundberg
Subject: smooth heightfield looks patchy. double-illuminate doesnt help
Date: 3 Oct 2002 11:00:10
Message: <web.3d9c5a828391274dae4b0b400@news.povray.org>
I'm using a 500x500 pixel .png to make a heightfield as a basis for a
landscape I'm creating.  The trouble is, the coloration is all patchy in
places.  This is not the regular problem of the normal flipping that can be
solved by double-illuminate, and it has nothing to do with my texture map,
since all I'm using is a green pigment (for right now, anyway).  I've
searched these newsgroups, and the responses I've seen all mention using
smaller heightmaps.  So I cut it down to 4 maps of half size, 250x250.  But
the scene still looks exactly the same, except now I have ugly seams where
the heightfields join up.

Could I be using double-illuminate wrongly? Any other ideas?

//the scene file:
camera{
   location <450,120,-450>
   look_at <0,-50,0>
}



/*
camera{
   location <40,1300,-45>
   look_at <0,75,0>
} */
light_source{
   <2000,2000,-2000> color White
}

sky_sphere {
   pigment {
      gradient y
      color_map{
         [ 0.0     rgb <0.180392, 0.4, 0.913725> ]
         [ 1.0     rgb <0.541176, 0.74902, 1.0> ]
      }
      scale .4
      translate .7
   }
}

fog {
    distance 1000
    color rgbt<0.541176, 0.74902, 1.0,.35>
  }

#declare Terrain=
union{
height_field{
   png "HMap.png"     //this is the main heightfield
   double_illuminate   // I've stuck this in elsewhere, but with no luck.
   smooth on
   water_level 0
   pigment{color rgb<0,.7,0> }
   finish{ambient .3}

}
height_field{
   png "HMap2.png"   //this is just background
  // smooth on
   water_level 0
   pigment{color rgb<0,.7,0>}
   finish{ambient .3}
   translate<-1,0,0>
}
height_field{         //this is just background
   png "HMap3.png"
  // smooth on
   water_level 0
   pigment{color rgb<0,.7,0>}
   finish{ambient .3}
   translate<0,0,1>
}
height_field{         //this is just background
   png "HMap4.png"
  // smooth on
   water_level 0
   pigment{color rgb<0,.7,0>}
   finish{ambient .3}
   translate<-1,0,1>

}
}
object{
   Terrain
   scale <1000,100,1000>//scale <1000,150,1000>
   translate <-500,0,-500>
   rotate<0,0,0>
}


Post a reply to this message

From: Justin Smith
Subject: Re: smooth heightfield looks patchy. double-illuminate doesnt help
Date: 3 Oct 2002 21:15:13
Message: <web.3d9ceb442e983fbee07c96340@news.povray.org>
Marcus Lundberg wrote:
>I'm using a 500x500 pixel .png to make a heightfield as a basis for a
>landscape I'm creating.  The trouble is, the coloration is all patchy in
>places.  This is not the regular problem of the normal flipping that can be
>solved by double-illuminate, and it has nothing to do with my texture map,
>since all I'm using is a green pigment (for right now, anyway).  I've
>searched these newsgroups, and the responses I've seen all mention using
>smaller heightmaps.  So I cut it down to 4 maps of half size, 250x250.  But
>the scene still looks exactly the same, except now I have ugly seams where
>the heightfields join up.
>
>Could I be using double-illuminate wrongly? Any other ideas?
>
>//the scene file:
>camera{
>   location <450,120,-450>
>   look_at <0,-50,0>
>}
>
>
>
>/*
>camera{
>   location <40,1300,-45>
>   look_at <0,75,0>
>} */
>light_source{
>   <2000,2000,-2000> color White
>}
>
>sky_sphere {
>   pigment {
>      gradient y
>      color_map{
>         [ 0.0     rgb <0.180392, 0.4, 0.913725> ]
>         [ 1.0     rgb <0.541176, 0.74902, 1.0> ]
>      }
>      scale .4
>      translate .7
>   }
>}
>
>fog {
>    distance 1000
>    color rgbt<0.541176, 0.74902, 1.0,.35>
>  }
>
>#declare Terrain=
>union{
>height_field{
>   png "HMap.png"     //this is the main heightfield
>   double_illuminate   // I've stuck this in elsewhere, but with no luck.
>   smooth on
>   water_level 0
>   pigment{color rgb<0,.7,0> }
>   finish{ambient .3}
>
>}
>height_field{
>   png "HMap2.png"   //this is just background
>  // smooth on
>   water_level 0
>   pigment{color rgb<0,.7,0>}
>   finish{ambient .3}
>   translate<-1,0,0>
>}
>height_field{         //this is just background
>   png "HMap3.png"
>  // smooth on
>   water_level 0
>   pigment{color rgb<0,.7,0>}
>   finish{ambient .3}
>   translate<0,0,1>
>}
>height_field{         //this is just background
>   png "HMap4.png"
>  // smooth on
>   water_level 0
>   pigment{color rgb<0,.7,0>}
>   finish{ambient .3}
>   translate<-1,0,1>
>
>}
>}
>object{
>   Terrain
>   scale <1000,100,1000>//scale <1000,150,1000>
>   translate <-500,0,-500>
>   rotate<0,0,0>
>}
>

Well, I'm hardly an expert, and in fact I had a problem with heightfields
recently, too. I tried turning double-illuminate on, and turning off
smooth, both of which are supposed to help the problem of artifacts in
heightfields, but it didn't work. That's why I'm using isosurfaces now.

Still, I can think of a couple things to try. First of all, a 500x500 source
image isn't very large, and you're scaling it by 1000. The mesh polygons
are going to be huge. I don't know enough to really challenge the comment
that smaller source files will get rid of that problem, however it seems to
me that if you have smaller polygons in the end result, then the artifacts
are going to be smaller and perhaps less noticeable. If you can get a much
larger image for the source, like 5000x5000 or something, I'd say to try
that out. You probably won't even need to turn on smooth with a source
image that large. The downside is it would probably take a lot longer to
render.

Well, let the experts give you the more believable advice.


Post a reply to this message

From: hughes, b 
Subject: Re: type of PNG used?
Date: 4 Oct 2002 00:52:46
Message: <3d9d1e9e@news.povray.org>
"Justin Smith" <t74### [at] yahoocom> wrote in message
news:web.3d9ceb442e983fbee07c96340@news.povray.org...
>
> Still, I can think of a couple things to try. First of all, a 500x500
source
> image isn't very large, and you're scaling it by 1000. The mesh polygons
> are going to be huge. I don't know enough to really challenge the comment
> that smaller source files will get rid of that problem, however it seems
to
> me that if you have smaller polygons in the end result, then the artifacts
> are going to be smaller and perhaps less noticeable. If you can get a much
> larger image for the source, like 5000x5000 or something, I'd say to try
> that out. You probably won't even need to turn on smooth with a source
> image that large. The downside is it would probably take a lot longer to
> render.

Yep, I sure hadn't seen it said anyplace that smaller files pieced together
might solve any problems with surface artifacts. Justin Smith certainly
points out the obvious, that larger files can produce finer details. Say,
Justin... if you could please remove some quoting in your replies that would
be nice :-)

I tried a 24bit color PNG image made from Adobe PS 5.0 LE and used as a HF
in place of Marcus'. It rendered very well using keyword smooth (on/off
isn't relevant nor possible) without artifacts or anything wrong except for
appearing somewhat blocky. With smooth commented out it was also okay, aside
from being completely faceted by the low resolution. Shadows looked okay,
colors looked okay. I didn't need to use double_illuminate but I did check
with and without it.

So I guess my question would be: what form of PNG is being used? Grayscale,
16bit or 24bit? Made with what program?

Bob


Post a reply to this message

From: Marcus Lundberg
Subject: Re: type of PNG used?
Date: 4 Oct 2002 17:25:04
Message: <web.3d9e070477cfe8f7ae4b0b400@news.povray.org>
Thanks for the replies!

I've tried using a large (5000x5000) pixel 24-bit .png, with and without
smooth and double-illuminate.  Parsing takes forever when smooth, but the
artifacts seem to be gone!  (or maybe they're just too tiny to see).

Thanks


Post a reply to this message

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