2012-10-14 49 views
1

我正在試圖用纏繞在他們周圍的包裝紙製作一對非常簡單的聖誕禮物。這裏是我如何嘗試這樣做,但圖像(wrapping_paper.jpg)只是被映射到框的臉上,然後在Z方向上「擠壓」。如何在POV-Ray的包裝盒中包裝圖像?

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和其他一些東西,我不能讓它看起來正確。這似乎是一件簡單的事情,我不敢相信它很難做到。我只是看錯了地方。

回答

1

語法可能是關鍵。

下面是一個例子教程: http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm

和這裏的一些代碼取消,修改從中我只是用我自己的測試PNG指出,土特。以動畫形式運行以驗證其正在做你想做的事:

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 
}