我有一个程序(水流模拟),每次迭代输出三个图像:高度图(土地+水高)和纹理(设计为实际排序 - 看起来像水,在棕色土壤上)。我想要一个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"
}
}
}
}
但是,这不会正确映射像素。
例如:我想要发生的是,蓝色的splodge与图片中可见的凸起重合。
作为参考,生成此代码的代码在此repo中都可用:https://github.com/smeagolthellama/rivergen
我只需要旋转纹理:
object{
height_field{
[...]
}
texture{
pigment{
image_map{[...]}
}
rotate <90,0,0>
}
}