这里只是小编自己练习用Blender建模的笔记。
还是参考:台湾大神的blender教程全集
对应内容是其中“小狗玩具模型”部分。
理论部分和“前续”是一样的,后面主要是小编看视频学习时做的笔记。还有就是,将模型导出后,用PBRT渲染时的脚本机器输出图形。
笔记
PBRT脚本
#sharp.pbrt -- a simple pbrt input file that displays a cone, sphere
# and refletive plane
#Richard P. Sharp - CIS782 Fall 2004
#first we set up the eye
LookAt 1 5 10 0 0 -3 0 1 0 #ex ey ez lx ly lz ux uy uz
#the camera
Camera "perspective" "float fov" [30]
#this is the filter used for antialiasing
PixelFilter "mitchell" "float xwidth" [2] "float ywidth" [2]
#name the file
Film "image" "string filename" ["doggie.exr"]
"integer xresolution" [400] "integer yresolution" [400]
Sampler "sobol" "integer pixelsamples" [64]
Integrator "directlighting"
#begin describing scene
WorldBegin
#light source
AttributeBegin
CoordSysTransform "camera"
LightSource "distant"
"point from" [0 0 0] "point to" [0 0 1]
"color L" [3 3 3]
AttributeEnd
#transform the world
AttributeBegin
Translate 0 -1 0
Rotate 35 0 1 0
AttributeBegin
Scale 1.5 1.5 1.5
Translate 1.5 1.5 -1.5
Rotate -90 0 1 0
Material "plastic" "color Kd" [.4 .2 .2] "color Ks" [.5 .5 .5]
"float roughness" [.025]
Shape "plymesh" "string filename" "geometry/mesh_00001.ply"
AttributeEnd
AttributeBegin
Scale 1.5 1.5 1.5
Translate 1.5 1.5 -1.5
Rotate -90 0 1 0
Material "plastic" "color Kd" [.4 .2 .2] "color Ks" [.5 .5 .5]
"float roughness" [.025]
Shape "plymesh" "string filename" "geometry/mesh_00002.ply"
AttributeEnd
AttributeBegin
Scale 1.5 1.5 1.5
Translate 1.5 1.5 -1.5
Rotate -90 0 1 0
Material "plastic" "color Kd" [.4 .2 .2] "color Ks" [.5 .5 .5]
"float roughness" [.025]
Shape "plymesh" "string filename" "geometry/mesh_00003.ply"
AttributeEnd
AttributeBegin
Scale 1.5 1.5 1.5
Translate 1.5 1.5 -1.5
Rotate -90 0 1 0
Material "plastic" "color Kd" [.4 .2 .2] "color Ks" [.5 .5 .5]
"float roughness" [.025]
Shape "plymesh" "string filename" "geometry/mesh_00004.ply"
AttributeEnd
#define a reflective ground plane
AttributeBegin
Scale 20 20 20
Material "matte" "color Kd" [0.1 1 1]
#this is a triangle mesh, the first set of points define four xyz
#coordinates, the second set defines the mesh by indexing into
#those points
Shape "trianglemesh" "point P" [ -1 0 -1 1 0 -1 1 0 1 -1 0 1 ]
"integer indices" [ 0 1 2 2 3 0 ]
AttributeEnd
AttributeEnd
WorldEnd
输出图形
45度角:
90度角:
丑晕了啦,对不起大神的教学视频。
原图: