0.29.3 2007/10/07 Median highlight suppressing method. 0.29.2 2007/10/07 Fixes to text statistics display. 0.29.1 2007/08/09 Removed original highlight suppressing hack. 0.29 2007/08/07 Improved statistics output and interactivity. 0.28 2007/07/15 Specular highlight fixing pass. 0.27.4 2007/07/12 Adjustment to material interpretation in OBJ files. 0.27.3 2007/07/10 Default value for IoR in OBJ models. 0.27.2 2007/05/20 Added bugfix to other instance types and tidied up script handling. 0.27.1 2007/05/19 Fixed bug in multiple instances. 0.27 2007/05/18 Script processing of input files. 0.26.1 2007/05/08 Fixes for 64bit gcc 4+. 0.26 2007/03/04 Implicit surface rendering.
Added Lua scripting to my raytracer the other day so I can do things like this. The script uses the PHP/(X)HTML concept to embed script into the XML file. Anything between a <& &> pair is treated as script and executed and everything else is just copied to the output.
In this scene a regular array of 25 by 26 blocks are positioned with random vertical heights with the central one coloured.
The code looks something like this:
<&
for i = 0, 24, 1 do
for j = 0, 25, 1 do
&>
<instance>
<general id="<& print(1+i*16+j) &>" name="water" material="1" gencaustics="0"/&qt;
<location position="<& print(10.5*6-10.5*i) &> <& if ((i == 6) and (j == 8)) then print(-45) else print(math.random()*40-105) end &> <& print(10.5*8-10.5*j) &>" rotation="0 0 0"/>
<maps nummaps="0"/&qt;
<emission colour="0 0 1" strength="0"/>
<extended modelid="<& if ((i == 6) and (j == 8)) then print(1) else print(0) end &>" scaling="1"/>
</instance>
<&
end
end
&>