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
The script is written for use with blender 2.41 but should work with newer and older versions as well.
Here you can see what version of the script you are currently using
Here helpfull messages will be printed. It will tell you if the bake was succesfull and if not what went wrong.
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.
When selected concave parts of the mesh are coloured. From the dictionary: Concave: hollowed or rounded inward like the inside of a bowl.
When selected convex parts of the mesh are coloured. From the dictionary: Convex: curved or rounded like the outside of a sphere or circle.
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.
When pressed this button starts the bake.
When pressed this button exits the script. Alternatively you can use the escape button on your keyboard.
If you find this script is too slow for you try the Ma Self 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!