Vous êtes sur la page 1sur 2

Please Use ARROW keys only to move Eye/Look to new position and Render, Key press and moving/spinning

is NOT the actual Eye/Look move. The Scene Description Language (SDL): As the ray-tracer doesn't much needs any GUI, its dependent on a Scene Description File for construction of scene. Below is an sample SDL used in our ray-tracer: #start image(512)samples(4)depth(3) ambience(100,105,105,0.2)diffuse(55,100,60,0.8)specular(0,0)phong obj texture(3)UV ambience(70,5,70,0.2)diffuse(70,5,70,0.5)specular(1,0.1)reflective radius(3)translate(0,1,0)rotate(0,0,0)scale(1,1,1)sphere texture(0)spherical ambience(50,50,50,0.7)diffuse(80,80,80,0.5)specular(1,0.2)lambert translate(0,-0.53,0)rotate(0,0,0)scale(0,0,0)plane texture(0)rectangular translate(5,4,4)color(10,10,10)atten(0,0,0)intensity(0.9)shadow(1)ambientocclusion or translate(5,4,4)color(10,10,10)atten(0,0,0)intensity(0.9)shadow(1)pointlight translate(5,4,4)color(10,10,10)atten(0,0,0)intensity(0.9)shadow(1)ambientlight rotate(50,40,40)color(10,10,10)atten(0,0,0)intensity(0.9)shadow(1)directionlight #end Guideline/Help: The first line is render settings: image(512) = image size in 1:1 ratio. Samples(4) = number of samples to be used, strictly in squares only (for e.g. 1, 4, 16, 25, 64... etc) depth(3) = the reflection depth, the number of rays for which a hit point should go for its pixel value. Plz note: There is no dynamic loader for .obj and texture image, but these can be manually loaded from for .obj =>>>>> Scene.cpp, line no. 77. for texture =>>> TEXTURE.cpp, line no. 8. For any object, the usual order of proceding is Material->Object->Texture and Lights. Material: there are 3 types of material defined in this raytracer, 1) Lambert, 2) Phong, 3) Reflective. all take in Ambience and Diffuse, while Phong and Reflective take in extra Specular

BRDF input. - For Ambience and Diffuse, the order is (R,G,B,Contribution) - For Specular, its (Power Factor, Contribution) - Reflective is an extension of Phong, casting reflection rays based upon user defined depth. Objects: At the moment Sphere, plane, cylinder, triangle, torus and external OBJ (Coded in) All objects have Translation, Rotation and Scaling Factors except external OBJ's - for Translation order is (Tx, Ty, Tz) - for Scaling (Sx, Sy, Sz) - for Rotation (Rx, Ry, Rz) Texture: At the moment the Parser supports multiple texture, but the texture name is coded in 36 - texture(number), if the number=0 then no texture for that particular object, only basic material properties are to be used. - Mapping style: spherical, UV (for OBJ's), cylindrical and rectangular. Lights: Supported lights: Ambient, Directional, Point and AmbientOcclusion. Please note: There is no limit to Ambient, Directional and point. But while using them, Ambientocclusion is not to be loaded. To render a scene with ambientocclusion, plz remove all other lights and keep only one AmbientOcclusion loaded. - translate values - color values - attenuation, (constant,linear,quadratic): (2,0,0) means constant atten to be used, (0,2,0) means linear atten, (0,0,2) means quadratic and (0,0,0) means no attenuation. - intensity (float value) - shadow (ON/OFF)

Vous aimerez peut-être aussi