POV-Ray : Newsgroups : povray.newusers : height field based on TGA file and UV mapping : Re: height field based on TGA file and UV mapping Server Time
28 Sep 2024 07:44:51 EDT (-0400)
  Re: height field based on TGA file and UV mapping  
From: Alain
Date: 24 Apr 2012 15:59:22
Message: <4f97061a@news.povray.org>

> Hello !
>
> i would like to know if it is possible to use uv mapping for file based height
> fields ?
>
> all i get is a stretched texture (long lines) on planar sections parallel to the
> xz plane
>

The height field is set along the x-z plane while your image is initialy 
mapped on the x-y plane.

You need to rotate 90*x so that it extend in the correct direction.
After the rotation of the image, the hight_field sit in a box extending 
from <0,0,0> to <1,1,1> and the image in a tile from <0,0,0> to <1,0,1> 
extending infinitely along the y axis.

Also, it would be beter to apply it before you scale the hight_field. 
That way, the two will be affected at once, and will probably make the 
UV mapping un-needed.


Alain


Post a reply to this message

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