povray - 你如何在 POV-Ray 中将图像包裹在一个盒子周围?

标签 povray

我正在尝试构建一个非常简单的场景,其中包含一些用 wrapper 包裹的圣诞礼物。这是我尝试执行此操作的方法,但图像 (wrapping_paper.jpg) 只是被映射到盒子面上,然后在 Z 方向上“挤出”。

box { <0,0,0>, <1,1,1>
  texture {
    pigment { 
      image_map {
        jpeg "wrapping_paper.jpg" 
        once
      }
    }
  }
 rotate <-30,40,-7>
 translate <-0.5, -0.5, -0.5>
}

我已经尝试了不同的 map_type 设置、uv_mapping 和其他一些东西,但我无法使它看起来正确。这似乎是一件如此简单的事情,我不敢相信它很难做到。我只是找错地方了。

最佳答案

语法可能是关键。

这是一个示例教程: http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm

这里有一些代码是从我刚刚用自己的 png 测试过的那个 tute 中提取和修改的。作为动画运行以验证它正在执行您想要的操作:

box{ <-1, -1, -1>,< 1, 1, 1>
 texture{ uv_mapping
 pigment{
 image_map{ png "your_very_own.png"
            map_type 0    // planar
            interpolate 2 // bilinear
            once //
          } //  end of image_map
} // end of pigment
finish { ambient 1 diffuse 0 }
 } // end of texture
scale 10.00  
rotate clock*(50*z+120*y)
translate 100*z
} 

关于povray - 你如何在 POV-Ray 中将图像包裹在一个盒子周围?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12885389/

相关文章:

windows - POVRY for windows : using the command line to render several pov files

vector - 如何保持盒子的同一侧垂直于 povray 中的相机位置?

graphics - 以 2D 矢量格式从 Pov-Ray 转换/导出图形

performance - 加快 POVRAY 图像创建的示例配置

matlab - 绘制不是函数图形的 3D 表面

loops - 循环遍历 9000 个单独的 .pov 文件以创建 9000 个单独的 png

linux - 安装 POV-Ray : configuration error

povray - POV-Ray : Setting output resolution or width/heigh ratio within the script

python - 在 blender 外运行 Blender python 脚本

povray - 将文本添加到球体表面