###########################################################################################
# DAIMEX - script for Blender, for rendering and formatting for use in Daimonin 2d client #
##########################################################################################

C O N T E N T S

1. About
2. Installation
3. Setting up & running
4. Contact, credits & disclaimer


1. ABOUT

This is a script for Blender which renders area 1x1x1.5 tiles in centre of scene into output, that is fit for Daimonin (see http://daimonin.net), with desired rotations and animations.


2. INSTALLATION

Unpack the stuff anywhere :)
Note:  For best results, place daimex.py inside the .scripts file under the Blender installation folder.


3. SETTING UP

3.1 Open Blender from command-line i.e. console -- Blender > Window > Toggle System Consoles.
Its important that you open Blender from console, so you see eventual errors.
BE SURE TO READ THE SETTING PART OF SCRIPT AND HOW TO MAKE CHANGES TO CONFIGURATION

3.2 Open/make your model. Make sure the model is 1 x 1 x 1.5 tiles large!!! Resize it if it is not!

3.3 Open the daimex script in Blender's text editor. Change to the desired name mask for the images. 
Get to know image (and arch) naming conventions, if you don't already: 
http://www.daimonin.net/index.php?name=PNphpBB2&file=viewtopic&t=3879&start=0

3.4 Check if you like the directory, to which the rendered images are saved. 
Default is the directory where current_scene.blend is, so you probably don't want to change it.

3.5 Set the desired number of rotations and mind that beginning position of camera is under median when looking from top view.

3.6 It is possible to render larger/smaller images. 
For example you want 2x2 daimonin tiles large monster, so you make him on 1x1x1.5 blender tiles (as usual) and set rsmulti to 2.

3.7 By default, the script uses sun light source (energy=2) which rotates with the camera. 
If you don't want to use it, change usescriptlamp to 0

3.8 Set direction in which your model is facing.
Default is above median when looking from top view.

3.9 Moving your model to median for rendering could be difficult, so you can set position of your model and camera will move there...
(Unfortunately this cannot be done with the model size - you have to resize it to fit 1x1x1.5)

3.10 Set you animation settings. This can be done in 2 ways. 
If you don't want any animation - just one frame, you don't have to change anything.
3.10.1 Default way: Just set framestep.
3.10.2 Override way: Turn override on, set start and end frames and don't forget to set the framestep

3.11 In Blender configure your renderer in way you like. If you want nice not blurry images, use filter CatRoom instead of default Gauss and use OSA level 5.
Also I recommend changing the sky colour to black or toggling on the button "Key" in renderer settings (also try "Prem") - you will notice changes in transparency/colour edges of the images.

3.12 Check again everything :)

3.13 Press alt+p in the Blender editor window


4. CONTACT, CREDITS & DISCLAIMER

If you find some bugs or want to ask me anything, email me: Pro.J@seznam.cz

Website: http://ojirio.zsuatt.com/daimex

Thanks to Nakron who helped me a lot (and encouraged me), all Daimonin developers and everybody I like :D

Umm, also, I'm not responsible for any damage done by the script, you are using it on your own risk, you agree with the license and this disclaimer by using the script. ;)

UPDATE: This script is currently maintained by _people_ -- questions should be posted to the daimonin.org forums or e-mailed to _people_@daimonin.org


5. CHANGE-LOG

22.10.2007 v0.2 - Initial public release
21.11.2007 v0.3 - Rotation bug fix; changed deprecated stuff
13.04.2008 v0.4 - Object approach - multiple configurations/runs in one script
27.01.2009 v0.5 - New light setup, allowing shadows and a tip by Torchwood, also little documentation change
07.02.2009 v0.6 - Added ability to render wide images (150px), which allows image to extend outside of normal tile width.
                  Recommended to use GIMP crop script developed by Torchwood to crop back to minimum size.
                  See daimex-exec.py for an example of how to use and configure inside Blender.
07.08.2013 v0.7 - Update to use Blender 2.66 and Python 3.3 -- _people_

6. Tips

6.1 How to make semi-transparent shadows by Torchwood: 
You add a new mesh object to your scene - a flat plane. 
Align this to the 'ground' level (i.e. just under the feet of the actual object). 
Add a single material and under the material/shaders tab, set the "only shadow" option. 
This has the effect of making the plane invisible (so it doesn't appear in the rendered image), 
but making the plane receive shadows - which then DO appear in the final rendered image.

