POV-Ray : Newsgroups : povray.advanced-users : mapping a texture to a height field Server Time
1 Nov 2024 01:23:38 EDT (-0400)
  mapping a texture to a height field (Message 1 to 3 of 3)  
From: Ben Abernathy
Subject: mapping a texture to a height field
Date: 27 Apr 2003 10:06:05
Message: <3eabe3cd$1@news.povray.org>
Hi, I have a problem when trying to map a grass texture to a height field.
Basically what I have is your normal height field representing a few hills
and a river bed. But when I go to map a gras texture I made in Paint Shop,
the rendered image comes out with what looks like skewed lines on all the
flat areas of the height field. I was wondering if I had a parameter set
incorrectly or something. After I create the height field, I scale it to
make it larger, could this be causing the problem? If so, is there a way to
work around it? I have pasted the height field code below.


height_field {
  sys
  "height_map.bmp"
 smooth
 pigment { image_map { sys "grass.bmp" once interpolate 2}}
 scale <20, 4, 20>
 translate <-4, 0, 0>
}


Post a reply to this message

From: Ken
Subject: Re: mapping a texture to a height field
Date: 27 Apr 2003 10:35:02
Message: <3EABEA53.F436E13B@pacbell.net>
Ben Abernathy wrote:
> 
> Hi, I have a problem when trying to map a grass texture to a height field.
> Basically what I have is your normal height field representing a few hills
> and a river bed. But when I go to map a gras texture I made in Paint Shop,
> the rendered image comes out with what looks like skewed lines on all the
> flat areas of the height field. I was wondering if I had a parameter set
> incorrectly or something. After I create the height field, I scale it to
> make it larger, could this be causing the problem? If so, is there a way to
> work around it? I have pasted the height field code below.
> 
> height_field {
>   sys
>   "height_map.bmp"
>  smooth
>  pigment { image_map { sys "grass.bmp" once interpolate 2}}
>  scale <20, 4, 20>
>  translate <-4, 0, 0>
> }

Try adding "rotate -90*x" to the image map statement.

i.e.

height_field {
  sys
  "height_map.bmp"
 smooth
 pigment { image_map { sys "grass.bmp" once interpolate 2} rotate -90*x }
 scale <20, 4, 20>
 translate <-4, 0, 0>
}

The HF is created by default on the x+z plane while the image map is created
by default on the x+y plane. Think of an HF as being on the floor while the
image is on the wall.

-- 
Ken Tyler


Post a reply to this message

From: Ben Abernathy
Subject: Re: mapping a texture to a height field
Date: 27 Apr 2003 10:48:34
Message: <3eabedc2@news.povray.org>
> Try adding "rotate -90*x" to the image map statement.

Ken, Thanks for the help. I had to rotate it by a +90 as opposed to a -90.

Ben A.


Post a reply to this message

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