Our Graphical User Interface

Just type in your script, and use the object named scene as the scene to be rendered. Push the 'Render' button. That's it !

A TinyPTC Window pops up (so you need DirectX installed... exactly like Raytracerptc), showing rendering progress. At the end of rendering, your image is saved (raytemp.ppm; it's a temporary file) and displayed in another Tk window, together with a statistics window. You can then save your image in .tga 24bits uncompressed format if you like it.

 

What if there is an error ???

You pushed the 'Render' button, but nothing happened... bring the console window up and have a look at the text displayed. It should look like this :

Traceback (innermost last):
  File "render.py", line 112, in ?
    main()
  File "render.py", line 103, in main
    renderScript()
  File "render.py", line 57, in renderScript
    exec code
  File "", line 20, in ?
NameError: light3

Have a look at the 2 last lines : "File"", line20, in ?" indicates that the error (the first error in you script, in fact, because the parser halts on the first error...) is on line 20. The last line gives you another clue. In this example, name 'light3' hadn't been declared before use.

Hint: to quickly find the error, type the error line number (20, here) in the 'Goto line #' entry box, then press enter. The faulty line should be displayed in red in the window. To remove the red coloration, simply have a click on it...

 

If you want to see some little examples, push the Help button on the right.

A minimal example : This should make a sphere in center of the image

s = Sphere(1.0)
s.setMaterial(createMaterial(diffuse=(1,0,0)))
s.setMatrix(createMatrix(translation=(0,0,5)))
scene.addObject(s)


c = Camera(320,200,70)
scene.setCamera(c)


l = PointLight()
l.setIntensity(Intensity(1.0,1.0,1.0))
scene.addLight(l)