Basic structure

Each yafray scene file has a number of basic blocks that are required to get a finished product. It follows basic XML rules, but the parser is very strict. Yafray is smart enough however to point out where you screwed up your file if that ever happens.

Every scene is wrapped by a pair of "<scene>" tags. Within these tags are everything about your scene.. shaders, objects, lights, and cameras.

The file is parsed in a top-down format. That means that any asset that a given feature uses, has to come before it in the file. The most common format is for shaders to appear at the top, then the scene objects, thirdly the lights, and lastly the remaining stuff like cameras and backgrounds.

Shaders are blocks that control the surface properties of an object. This can be as simple as a single solid color, to as complex as a texture with bumpmapping, transparency, and specularity. Shaders reference texture blocks by using modulator blocks.

Objects are blocks that defines the objects in the scene. Each object has one shader.

Lights are blocks that define the lighting of your scene. There are many light types you can use, and each has many configuration options.

The last required blocks for a scene is the camera and render blocks. The camera's purpose should be obvious. The render block is where most global options get set.. such as anti-aliasing options, where the resulting image file is written, and so on. The only major exception is the dimensions of the finished image, which is controlled in the camera block.