如何将image_map映射到POV-ray中的height_map?

问题描述 投票:0回答:1

我有一个程序(水流模拟),每次迭代输出三个图像:高度图(土地+水高)和纹理(设计为实际排序 - 看起来像水,在棕色土壤上)。我想要一个3D动画,并决定使用POV-Ray。

问题是我无法使height_map与image_map对齐。在看了this documentation之后,我得出结论,我只需要有类似的东西

height_map{
    png "frame_height.png" // animation stuff redacted for brevity
    smooth
    texture{
        pigment{
            image_map{
                 png "frame_texture.png"
            }
        }
    }
}

但是,这不会正确映射像素。

例如:demonstration of problem我想要发生的是,蓝色的splodge与图片中可见的凸起重合。

作为参考,生成此代码的代码在此repo中都可用:https://github.com/smeagolthellama/rivergen

raytracing heightmap povray
1个回答
0
投票

我只需要旋转纹理:

object{
  height_field{
    [...]
  }
  texture{
    pigment{
      image_map{[...]}
    }
    rotate <90,0,0>
  }
}
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.