2012.11.03 [土]
Pov-Rayのお気に入り設定を置いておく
自分が気に入ったPov-Rayのテクスチャ設定を忘れないように、失くさないようにここに置いておく。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 10 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
plane { y,0 pigment { White } finish { reflection 0.1 }
rotate x*-90 translate z*1.5 }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
//特にこの4つの要素を変更することでかなり質感が変わるので、オブジェクトの大きさに応じて変更すること。
//crackle=クラック(ひび割れ)の(見かけの)深さ。
//scale=大きさ。
//phong_size=ハイライトのサイズ。1~250(デフォルト40:プラスチック)。
//reflection=鏡面反射(映り込み)。0.0~1.0。
//場合によってはライトの位置、数、光の強さを変更することでも感じが変わる。
上の画像の scale と、phong_size が違うと印象が変わる。
どっちかって言うとこっちの方が好きかも。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 10 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
plane { y,0 pigment { White } finish { reflection 0.1 } rotate x*-90 translate z*1.5 }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
上の2つは背景が plane { y*0 } と、plane { y*0 rotate x*-90 } の、簡単に言えば「板が二枚(床と壁)あるだけ」の設定なのだけど、この板をやめて、大きな箱にして、照明も立体物もこの箱の中に入れた状態を作ってみた。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 20 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
//plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
//plane { y,0 pigment { White } finish { reflection 0.1 } rotate x*-90 translate z*1.5 }
box { < -30, -1.5, -30 > < 30, 30, 1.5 > pigment { White } finish { reflection 0.1 } }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
見た目がなるべく変わらない設定にしてみた。
箱は白色で、箱内面の反射光があり、全く同じ画像にはならない。
これの利点は実際にカメラで物撮りする時と同じで、反射光が多いので影が濃く出るはずの部分も光源や反射などの設定次第で柔らかい感じにできるという点。
今回の場合は照明の数や光の強さを変えていないので影は濃く出ているが、照明を増やし、当て方を考えれば内部の反射が多いのでもっと印象の違った感じになる。
※X座標は左右(こっちから見て、左が+、右が-)、Y座標は上下(上が+、下が-)、Z座標は前後(後が+、手前が-)。Pov-Rayは座標がわかりにくい。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 10 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
plane { y,0 pigment { White } finish { reflection 0.1 }
rotate x*-90 translate z*1.5 }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.02 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 5 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
//特にこの4つの要素を変更することでかなり質感が変わるので、オブジェクトの大きさに応じて変更すること。
//crackle=クラック(ひび割れ)の(見かけの)深さ。
//scale=大きさ。
//phong_size=ハイライトのサイズ。1~250(デフォルト40:プラスチック)。
//reflection=鏡面反射(映り込み)。0.0~1.0。
//場合によってはライトの位置、数、光の強さを変更することでも感じが変わる。
上の画像の scale と、phong_size が違うと印象が変わる。
どっちかって言うとこっちの方が好きかも。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 10 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
plane { y,0 pigment { White } finish { reflection 0.1 } rotate x*-90 translate z*1.5 }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray50 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 20 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
上の2つは背景が plane { y*0 } と、plane { y*0 rotate x*-90 } の、簡単に言えば「板が二枚(床と壁)あるだけ」の設定なのだけど、この板をやめて、大きな箱にして、照明も立体物もこの箱の中に入れた状態を作ってみた。

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "metals.inc"
global_settings { max_trace_level 20 assumed_gamma 2.2 }
camera { location < 0, 3, -5 > look_at < 0, -0.5, -1 > }
light_source { < -2, 3, -10 > color rgb 0.3 }
light_source { < 0, 5, -5 > color rgb 0.7 }
//plane { y,-1.5 pigment { White } finish { reflection 0.1 } }
//plane { y,0 pigment { White } finish { reflection 0.1 } rotate x*-90 translate z*1.5 }
box { < -30, -1.5, -30 > < 30, 30, 1.5 > pigment { White } finish { reflection 0.1 } }
sphere { < 0, 0, 0 > 1
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } } }
box { < -0.75, -0.75, -0.75 > < 0.75, 0.75, 0.75 >
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate x*-2.2 }
cylinder { -0.75*y, 0.75*y, 0.75
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate x*2.2 }
cone { -1*y, 1, 1*y, 0
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate < -1.2, 0, -2 > }
torus { 0.6, 0.3
texture { pigment { Gray45 } normal { crackle 0.4 metric 1 scale 0.01 }
finish { diffuse 1.0 brilliance 3.0 phong 0.6 phong_size 50 reflection 0.1 } }
translate < 1.2, 0, -2.5 > }
見た目がなるべく変わらない設定にしてみた。
箱は白色で、箱内面の反射光があり、全く同じ画像にはならない。
これの利点は実際にカメラで物撮りする時と同じで、反射光が多いので影が濃く出るはずの部分も光源や反射などの設定次第で柔らかい感じにできるという点。
今回の場合は照明の数や光の強さを変えていないので影は濃く出ているが、照明を増やし、当て方を考えれば内部の反射が多いのでもっと印象の違った感じになる。
※X座標は左右(こっちから見て、左が+、右が-)、Y座標は上下(上が+、下が-)、Z座標は前後(後が+、手前が-)。Pov-Rayは座標がわかりにくい。
- 関連記事
-
-
Pov-Rayのお気に入り設定を置いておく 2012/11/03
-
Sketchfabが埋め込めるようになったと聞いてやってみた 2014/04/09
-
コメントの投稿