3Delightでレンダリングしてみた。
ずっと、PointsPolygonと思っていたら、PointsGeneralPolygonsでした。
勉強しなおします。面白いです。
Declare "N" "facevarying normal"
Declare "st" "facevarying float[2]"
PointsGeneralPolygons [1] [4] [0 1 2 3]
"P" [100.0 0.0 -100.0
-100.0 0.0 -100.0
-100.0 0.0 100.0
100.0 0.0 100.0]
"st" [0.0 1.0
1.0 1.0
1.0 0.0
0.0 0.0] "N" [0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0]
cgkitでのシーン・スクリプト
import camctrl
Globals( rib='Imager "background" "color background" [0.2 0.4 0.6]',
up = (0,1,0),
handedness = 'r'
)
TargetCamera(
pos = (173.799, 236.458, 183.37),
target = (-0.150459, -8.30794, -6.52798),
fov = 45.000000,
)
SpotLight3DS( name = "SpotLight3DS",
enabled = True,
intensity = 1.0,
shadowed = True,
shadow_size = 512,
shadow_filter = 4.0,
shadow_bias = 0.05,
hotspot = 75,
falloff = 80,
pos=(100, 200, 100),
target = (0,0,0) )
GLPointLight(
pos = (10,10, -20),
intensity = 0.7,
diffuse = (1, 1, 1)
)
load("men_uv2.obj")
men = worldObject("obj1")
mat_men = GLMaterial(
diffuse = (1,1,1),
texture = GLTexture("uvmap.png",
transform = mat4().scaling(vec3(-1,-1,1)),
mode = GL_MODULATE)
)
men.setMaterial(mat_men)
men.pos=(0,0,0)
#men.scale=(-1,1,-1)
- -
- -