Welcome

This blog represents a common area where we can share ideas, thoughts and other verbose information with others - While giving a little more insight into the inner workings/minds of our team.

Though there might be overlap in places, the content here differs from that of the main Aqsis website and is intended to be complimentary while still acting as a useful resource for those interested in the world of 3D graphics and rendering.

So... sit back, relax, and have fun... we will !!! ;-)

Wednesday, 6 May 2009

Io...Io...It's off to work we go...

I've been working on a binding for RenderMan to the Io scripting language. My plans are to make this a default scripting language for generating content for Aqsis for the following reasons.
  1. Io has a very clean and simple syntax, making it really easy to pick up for anyone who has a modicum of programming/scripting experience.
  2. It is very easy to write extensions to Io, as shown by the RenderMan binding.
  3. Io is plain C, so easily ported, and currently available on Windows, Linux and MacOSX. It's easy to build, and to include the RenderMan binding, although I'd like ultimately to get the binding included into the main distro.
  4. It is small and very easy to embed, so I'd like ultimately to build a separate app that is tailored to writing RenderMan content.
  5. Pixar use it for the compositing language "IceMan" built into "It".
I'm using our XML API description to automate much of the binding generation, with custom XSLT transforms. At the moment, much of the API is working, but there is little to no validation, and there are many things that could be done better. Also, anyone taking a look, be careful, it doesn't do any cleanup at the moment, so it's leaking like a seive.

However, here's a very simple sample to show the syntax.



rm := RenderMan clone

p1 := RtPoint clone set(0,0,0)
p2 := RtPoint clone set(0,0,2)
p3 := RtPoint clone set(1,0,2)
p4 := RtPoint clone set(1,0,0)
n1 := RtPoint clone set(-1,1,-1)
n2 := RtPoint clone set(-1,1,1)
n3 := RtPoint clone set(1,1,1)
n4 := RtPoint clone set(1,1,-1)

rm option("searchpath", "shader", "../../shaders:./:&")

rm display("poly_test.tif", "framebuffer", "rgba", Map with("string compression", "lzw"))

rm format(200,150,1)
rm shadingRate(2)

rm projection("perspective", Map with("fov", 50))
rm translate(0,-1,1)
rm rotate(-40, 1, 0, 0)

rm option("limits", "eyesplits", 3)
rm sides(2)

rm worldBegin

rm lightSource("ambientlight", "intensity", 0.1)
rm lightSource("distantlight", "intensity", 0.5, "lightcolor", RtColor clone set(1,1,1), "from", RtPoint clone set(-2, 4, 2), "to", RtPoint clone set(0,0,0))
rm lightSource("distantlight", "intensity", 0.7, "lightcolor", RtColor clone set(1,1,1), "from", RtPoint clone set(1, 2, -2), "to", RtPoint clone set(0,0,0))

rm surface("plastic")

rm attributeBegin
rm color(RtColor clone set(1, 0, 0))
rm pointsPolygons(2, list(3,3), list(0,1,2, 0,2,3), Map with("P", list(p1, p2, p3, p4), "N", list(n1,n2,n3,n4)))
rm attributeEnd
rm worldEnd