Blender Documentation: Last modified September 29 2003 S68 | ||
---|---|---|
<<< Previous | YafRay | Next >>> |
YafRay is available for Linux, Windows and Mac OSX. Download the package suitable for your OS at www.yafray.org.
Run the installer program. It will create a directory called "yafray" on your c:\ drive. This directory contains the yafray.exe executable and the grammar file which are used by the loader. Also the installer copies three dll's into your Windows system directory. This dll's are for cygwin support. Finally, a batch file (yafray.bat) is copied into the Windows directory (we need this file in the PATH).
To run YafRay is easy. Just open a MS-DOS window, go to you working directory and type "yafray file.xml" or "yafray file.xml.gz". For example, if you want to work in e:\raytracing\work on an XML file which resides in C:\Docs\xmls named test.xml, you open a MS-DOS windows and:
c:\windows\> c:\windows\> e: e:> cd e:\raytracing\work e:\raytracing\work> yafray c:\Docs\xmls\test.xml |
One or more targa file, the output of the render, will be created in the e:\raytracing\work directory.
Expand the tarball. (stuffIt expander can expand tarball also). Double click on the expanded package to run installer. YafRay must be installed on the Root device (the one on which it has been installed MacOSX), you cannot choose any other disk
Installed files and location are: /usr/sbin/yafray /usr/etc/gram.yafray
USAGE AS IN WINDOWS???
YafRay has just 2 files ' /usr/sbin/yafray ' and ' /usr/etc/gram.yafray' . But common user cannot acccess those directory via Mac OSX GUI usually, so the OS X Package Manager (OSXPM) can help you to uninstall packages from your disk.
Expand the tarball.
tar xvzf yafray-#.#.#.tar.gz |
Go into the newly created directory and configure it for your machine.
./configure |
Make sure that zlib and jpeg support is enabled. If not, you need install devel pakages for libjpeg and libgz (check your distribution for it).
Build it!
make |
If this fails you can try
cd src make yafray |
The executable is yafray and is a command Line program, whose usage is analogous to the what described In the "Windows" section.
A YafRay Scene description file is an XML file complying to the definitions of this section. The renderer parses the XML from top to bottom. So if Block1 is referenced before Block2, it must be defined before Block2 (it must be above it in the XML)
<scene> <shader type = "generic" name = "Default">; <attributes> <color r="0.750000" g="0.750000" b="0.800000" /> <specular r="0.000000" g="0.000000" b="0.000000" /> <reflected r="0.000000" g="0.000000" b="0.000000" /> <transmitted r="0.000000" g="0.000000" b="0.000000" /> </attributes> </shader> <transform m00 = "8.532125" m01 = "0.000000" m02 = "0.000000" m03 = "0.000000" m10 = "0.000000" m11 = "8.532125" m12 = "0.000000" m13 = "0.000000" m20 = "0.000000" m21 = "0.000000" m22 = "8.532125" m23 = "0.000000" m30 = "0.000000" m31 = "0.000000" m32 = "0.000000" m33 = "1.000000" > <object name = "Plane" shader_name = "Default" > <attributes> </attributes> <mesh> <include file = ".\Meshes\Plane.xml" /> </mesh> </object> </transform> <light type="pathlight" name="path" power= "1.000000" depth "2" samples = "16" use_QMC = "on" cache"on" cache_size="0.008000" angle_threshold="0.200000" shadow_threshold="0.200000" > </light> <camera name="Camera" resx="1024" resy="576" focal="1.015937" > <from x="0.323759" y="-7.701275" z="2.818493" /> <to x="0.318982" y="-6.717273" z="2.640400" /> <up x="0.323330" y="-7.523182" z="3.802506" /> </camera> <filter type="dof" name="dof" focus = "7.97854234329" near_blur "10.000000" far_blur "10.000000" scale "2.000000"> </filter> <filter type"antinoise" name"Anti Noise" radius = "1.000000" max_delta = "0.100000"> </filter> <background type = "HDRI" name = "envhdri" exposure_adjust = "1"> <filename value = "Filename.HDR" /> </background> <render camera_name = "Camera" AA_passes = "2" AA_minsamples = "2" AA_pixelwidth = "1.500000" AA_threshold = "0.040000" raydepth = "5" bias = "0.300000" indirect_samples = "1" gamma = "1.000000" exposure = "0.000000" background_name"envhdri" > <outfile value="butterfly2.tga"/> <save_alpha value="on"/> </render> </scene> |
Dont worry! Its not as complex as it looks. Concentrate on the bold highlited tags.
The Tags work similar to HTML tags (also like brackets) each tag must have an opposite closing tag. Two tags together, with settings inside, is one block. A block can tell the renderer how to shade something, how big to render the image, what the shape of an object looks like, where it is etc etc.
In the example above, first a shader is defined, then an object (which is wrapped in its Transform Matrix), then a light is added then a camera, a filter, a background and finally the render settings (notice the closing </scene> tag)
<<< Previous | Home | Next >>> |
YafRay | Up | Shaders |