標(biāo)簽: luxRender
基本文件
主場(chǎng)景文件為.lxs格式,是一個(gè)ASCII文本文件,描述渲染的場(chǎng)景整體信息。包括相機(jī)、渲染圖參數(shù)、光源、模型、材質(zhì)等。
- 材質(zhì)文件.lxm格式,即場(chǎng)景中模型的材質(zhì)參數(shù)設(shè)置。
- 幾何體文件.lxo格式,包含模型的矩陣及mesh的文件路徑。mesh文件為.ply格式。
- 可選的體渲染格式.lxv。
這些文件在主場(chǎng)景文件中包含,通過如下方式:
Include "scene-geom.lxo"
坐標(biāo)系
luxRender跟blender采用一樣的坐標(biāo)系,即采用Z軸為上方向。所以在其他場(chǎng)景轉(zhuǎn)換到lunRender中時(shí),需要注意進(jìn)行坐標(biāo)系的轉(zhuǎn)換。
基本結(jié)構(gòu)
場(chǎng)景文件.lxs包含多種類型的參數(shù),即使最簡(jiǎn)單的場(chǎng)景也會(huì)包含:相機(jī)、至少一個(gè)光源、影片的圖像幀設(shè)置、矩陣變換、模型圖元面片、材質(zhì)、紋理等等。如下例:
#This is an example of a comment!
#Global Information
LookAt 0 10 100 0 -1 0 0 1 0
Camera "perspective" "float fov" [30]
Film "fleximage"
"integer xresolution" [200] "integer yresolution" [200]
PixelFilter "mitchell" "float xwidth" [2] "float ywidth" [2]
Sampler "lowdiscrepancy" "string pixelsampler" ["lowdiscrepancy"]
#Scene Specific Information
WorldBegin
AttributeBegin
CoordSysTransform "camera"
LightSource "distant"
"point from" [0 0 0] "point to" [0 0 1]
"color L" [3 3 3]
AttributeEnd
AttributeBegin
Rotate 135 1 0 0
Texture "checks" "color" "checkerboard"
"float uscale" [4] "float vscale" [4]
"color tex1" [1 0 0] "color tex2" [0 0 1]
Material "matte"
"texture Kd" "checks"
Shape "disk" "float radius" [20] "float height" [-1]
AttributeEnd
WorldEnd
全局參數(shù)(Global Information)
LookAt
Lookat變換包含三個(gè)三維的向量:
LookAt 7.481132 -6.507640 5.343665 6.829573 -5.893469 4.898394 -0.324013 0.305421 0.895396
它們按順序分別代表相機(jī)的位置坐標(biāo)、觀察中心點(diǎn)坐標(biāo)、上方向。