alienhelpdesk.com

ma baker

This script bakes vertex colours into your mesh depending on the angle of the edges of the mesh.

Based on an idea by endi
Optimised by tedi
Written by macouno

Version 0.3 released 16-07-2006
0.3 has an added wind function and is compatible with blender 2.42.
You can download version 0.3 of the script here


requirements

The script is written for use with blender 2.41 but should work with newer and older versions as well.

loading the script

If you don't know how to use scripts read this page.


the gui


the header

Here you can see what version of the script you are currently using


messages

Here helpfull messages will be printed. It will tell you if the bake was succesfull and if not what went wrong.


the settings

Here are all the functions of the script. The following options are available.


invert shading
In regular mode the concave parts of the mesh are made dark and the convex parts of the mesh are made light. By selecting inverted shading mode the reverse will happen.

invert wind
When wind is created basicly the faces facing the direction of the wind are made lighter.

wind direction
Here you can set where the wind should come from. The direction is set relative to the global coordinates, not local.

concave
hen selected concave parts of the mesh are coloured. From the dictionary: Concave: hollowed or rounded inward like the inside of a bowl.

convex
When selected convex parts of the mesh are coloured. From the dictionary: Convex: curved or rounded like the outside of a sphere or circle.

wind
When selected the mesh is coloured relative to the wind direction.

min angle
Edges with an angle below this value will be assigned the default colour value.

max angle
Edges with an angle above this value will be assigned the maximum colour value.

BAKE
When pressed this button starts the bake.

EXIT
When pressed this button exits the script. Alternatively you can use the escape button on your keyboard.

tips
If you find this script is too slow for you try the MaSelf script.
For the bake effect to show up in your 3d window you'll have to view your model in "textured view mode" (Alt + Z). For the bake effect to influense your render you will have to assign a material to your model with VCol Light in the material buttons switched on.


exporting the result

This based on a tip from patricks. Follow the following instructions

. Assign a uv layout to your object (unwrap it).
2. Open a script window.
3. Run the "texture baker" script you can find in the scripts menu under "UV". This will export an image but not with the colors. The script will create an object and camera on layer 20.
4. Go to layer 20 (right bottom in the layer selection of your 3d window).
5. select the camera you can find there.
6. Hit CTRL + Numpad 0 to make this your current camera.
7. Set your rendersize to something square.
8.
Render it!


examples


that's it

If you have any questions or comments please contact me through the blenderartists.org forums Enjoy macouno