266 lines
3.8 KiB
Groff
266 lines
3.8 KiB
Groff
.TH RT 6 "January 09, 2017"
|
|
.SH NAME
|
|
RT - Scene renderer using RayTracing method
|
|
.SH SYNOPSIS
|
|
RT
|
|
.SH DESCRIPTION
|
|
RT is a program made to render scenes mades of primitives. the different scenes must be placed in the "./scenes" folder, right next to the compiled program. the scenes must also follow semantics rules, else the behavior of the program is undefined.
|
|
.SH SCENE SYNTAX
|
|
As mentionned above, a scene must follow a specific syntax, it can contain :
|
|
.TP 20
|
|
.B Parameters
|
|
: Used to define characteristics of the scene, or an object.
|
|
.TP 20
|
|
.B Declarators
|
|
: Create a new object and modify it with parameters.
|
|
.P 20
|
|
Here is how they are used :
|
|
.br
|
|
.B Declarator[,declarator arg]
|
|
.br
|
|
.B {
|
|
.br
|
|
.B Parameter:arguments
|
|
.br
|
|
.B }
|
|
.br
|
|
if a parameter is used outside of any declarator, it is attributed to the scene itself, modifying its properties.
|
|
.SH PARAMETERS LIST
|
|
Every parameters and their description :
|
|
.P
|
|
AAlvl:0 - 255 | define the Anti-Aliasing multiplier
|
|
.br
|
|
reflections:0 - 255 | define the number of reflexions a ray can support
|
|
.br
|
|
ambient:0 - 1 | define the amount of ambient light the scene apply
|
|
.br
|
|
translate:X Y Z | define a translation matrix
|
|
.br
|
|
rotate_[x|y|z]:-360 - 360 | define a rotation matrix along the selected angle
|
|
.br
|
|
scale:X Y Z | define a scale matrix
|
|
.br
|
|
color:R G B | define a color
|
|
.br
|
|
shine:0 - 1 | define the specular property of an object
|
|
.br
|
|
reflection:0 - 1 | define the reflection level of an object
|
|
.br
|
|
texture:file.xpm | define the texture to be displayed on an object
|
|
.br
|
|
bumpmap:file.xpm | define a bumpmap to apply on an object
|
|
.br
|
|
texmodifier:[1|2|3|4] | define a dynamic texture modifier [SINX|SINY|SINXY|QUAD]
|
|
.br
|
|
texscale:X Y | define the amount of times the texture is repeated in one unit
|
|
.br
|
|
texoffset:X Y | define an offset in units of the texture
|
|
.br
|
|
sheetmode:[0|1] | activate or not the sheet mode for the HYPERBOLOID [off|on]
|
|
.br
|
|
vertex_[a|b|c|d]:X Y Z | define a vertex as needed by certain objects
|
|
.br
|
|
absolute:[0|1] | define a cut as absolute, using world coordinates instead of parent [off|on]
|
|
.br
|
|
orientation:X Y Z | define an orientation vector, should be normalised to prevent undefined behaviors
|
|
.br
|
|
look_at:X Y Z | define a location to witch the camera will look initially
|
|
.SH SUPPORTED DECLARATORS AND PARAMETERS
|
|
Here is listed every declarators and their supported parameters :
|
|
.P 20
|
|
.B ROOT
|
|
.br
|
|
{
|
|
.br
|
|
AAlvl:X
|
|
.br
|
|
reflections:X
|
|
.br
|
|
ambient:X
|
|
.br
|
|
}
|
|
.P 20
|
|
.B [SPHERE|PLANE|CYLINDER|CONE|PARABOLOID]
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
texture:file.xpm
|
|
.br
|
|
bumpmap:file.xpm
|
|
.br
|
|
texmodifier:X
|
|
.br
|
|
texscale:X Y
|
|
.br
|
|
texoffset:X Y
|
|
.br
|
|
}
|
|
.P 20
|
|
.B HYPERBOLOID
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
texture:file.xpm
|
|
.br
|
|
bumpmap:file.xpm
|
|
.br
|
|
texmodifier:X
|
|
.br
|
|
texscale:X Y
|
|
.br
|
|
texoffset:X Y
|
|
.br
|
|
sheetmode:X
|
|
.br
|
|
}
|
|
.P 20
|
|
.B TRIANGLE
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
vertex_[a|b|c]:X Y Z
|
|
.br
|
|
}
|
|
.P 20
|
|
.B PRISM
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
vertex_[a|b|c|d]:X Y Z
|
|
.br
|
|
}
|
|
.P 20
|
|
.B CUBE
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
vertex_[a|b]:X Y Z
|
|
.br
|
|
}
|
|
.P 20
|
|
.B CUT
|
|
.br
|
|
{
|
|
.br
|
|
translate:X Y Z
|
|
.br
|
|
rotate_[x|y|z]:X
|
|
.br
|
|
scale:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
shine:X
|
|
.br
|
|
reflection:X
|
|
.br
|
|
texture:file.xpm
|
|
.br
|
|
bumpmap:file.xpm
|
|
.br
|
|
texmodifier:X
|
|
.br
|
|
texscale:X Y
|
|
.br
|
|
texoffset:X Y
|
|
.br
|
|
absolute:X
|
|
.br
|
|
}
|
|
.P 20
|
|
.B CSG,[INTER|UNION|DIFF]
|
|
.br
|
|
{
|
|
.br
|
|
[DECLARATOR1]
|
|
.br
|
|
{...}
|
|
.br
|
|
[DECLARATOR2]
|
|
.br
|
|
{...}
|
|
.br
|
|
}
|
|
.P 20
|
|
.B CAMERA
|
|
.br
|
|
{
|
|
.br
|
|
position:X Y Z
|
|
.br
|
|
orientation:X Y Z
|
|
.br
|
|
look_at:X Y Z
|
|
.br
|
|
}
|
|
.P 20
|
|
.B LIGHT
|
|
.br
|
|
{
|
|
.br
|
|
position:X Y Z
|
|
.br
|
|
color:R G B
|
|
.br
|
|
}
|