# Scene file syntax

# This is a comment line # a comment can stay everywhere in the scene code Transform { # this is a transform, and can contain other scene elements translation 3 0 0 # a transform has a translation (X, Y, Z), scale 2 2 2 # a scale (X, Y, Z), rotation 20 1 1 1 # and a rotation (angle, X, Y, Z), where X, Y, Z describe the rotation axis Object { # this is an object, inside a Transform. They can stay also outside any Transform... geometry "box3.obj" # this is the model, material "shader/normal" # the shader alghoritm, params "kDiff = 0.2 0.4 0.6 kSpec = 0.4 0.4 0.4 kAmb = 0.3 0.2 0.1 kEmi = 0.0 0.0 0.0 m = 164" # shader params, texture0 "diffuseMap" "bricks.tga" # and textures with their names texture1 "normalMap" "normal.tga" # an Object can have at max 8 textures } Transform { # this is a Transform inside an other Transform translation 0 3 0 # params are optional Object { geometry "box3.obj" material "shader/phongblinn_map" params "kDiff = 0.2 0.4 0.6 kSpec = 0.4 0.4 0.4 kAmb = 0.3 0.2 0.1 kEmi = 0.0 0.0 0.0 m = 164" texture0 "diffuseMap" "bricks.tga" texture1 "specularMap" "bricks_specular.tga" } } } Transform { translation -3 0 0 scale 2 2 2 Object { geometry "box3.obj" material "shader/cooktorrance" params "kDiff = 0.2 0.4 0.6 kSpec = 0.4 0.4 0.4 kAmb = 0.3 0.2 0.1 kEmi = 0.0 0.0 0.0 m = 164" texture0 "diffuseMap" "bricks.tga" texture1 "normalMap" "normal.tga" } Transform { translation 0 3 0 Object { geometry "box3.obj" material "shader/phongblinn" params "kDiff = 0.2 0.4 0.6 kSpec = 0.4 0.4 0.4 kAmb = 0.3 0.2 0.1 kEmi = 0.0 0.0 0.0 m = 164" texture0 "diffuseMap" "bricks.tga" texture1 "normalMap" "normal.tga" } } } Light { # this is a light position 0 0 6 1 # this is the light position (X, Y, Z, W). If W == 0 this is a directional light, otherwise if W == 1 this is a point light irradiance 1 1 1 # this is the light's irradiance (R, G, B) } Camera { # This is a camera, you can write camera's also inside a Transform position 0 0 10 # The camera's position direction 0 0 -1 # Where do you whant to point up 0 1 0 # camera's up FOVy 60 # camera's angle aperture active 0 # this is not the active camera. Actualy, it's not necessary to write "active 0" name "normal camera" # camera's name } Camera { position 0 0 10 direction 0 0 -1 up 0 1 0 FOVy 60 screenEffect "shader/sepia" # the post-efect applied to this camera active 1 # this is the active camera name "seppia" } Camera { # this camera doesn't have the active attribute, and is equal to write "active 0" position 0 0 10 direction 0 0 -1 up 0 1 0 FOVy 60 screenEffect "shader/sharpen" name "sharpen" } Camera { position 0 0 10 direction 0 0 -1 up 0 1 0 FOVy 60 screenEffect "shader/blur3x3" name "blur" }

Last edited Jul 17, 2012 at 12:52 PM by tmm360, version 2

Comments

No comments yet.