From BlenderWiki

Jump to: navigation, search

Main Section for Scripts

There are two main sets of documentation of the Blender scripts:

Search the Catalog to find and download the script you need.


Some Modeling Script Samples:

Poly Reducer

Mode: Edit mode (meshes only)

Menu: Mesh » Scripts » Poly Reducer

Description

This tool can be used instead of Blenders Decimate modifier as a way to remove polygons from a mesh while keeping the original shape as much as possible.

Reasons you may want to use a polygon reducer are:

  • To make 3D Scanned data usable when rendering and editing.
  • Generate Level Of Detail models (LOD’s), for games or simulation models.
  • To speed up render times.


Options

Poly Reducer is accessed from Edit mode and will operate on the entire mesh.

On activation a popup will appear with the following options:

Poly Reduce
Scale the mesh’s poly count by this value.
Boundary Weight
Weight boundary vertices by this scale. Zero disables boundary weighting. A boundary vertex is a vertex that is not completely surrounded by faces. Some meshes have no boundary vertices. For example, a cube has no boundary vertices whereas a plane has only boundary vertices.
Area Weight
Collapse edges affecting lower area faces first. Zero disables area weighting.
Triangulate
Convert quads to tris before reduction, for more choices of edges to collapse.
The advantage of triangulating is you have a larger set of edges to choose from when collapsing giving a higher quality result.
UV Coords
Interpolate UV coordinates (if any UV map).
Vert Colors
Interpolate vertex colors (if any color map).
Vert Weights
Interpolate vertex weights (if any vertex group).


Hints

Poly Reducer has some advantages and disadvantages compared to Blender’s Decimate modifier, here are some pros and cons. Pros

  • Higher quality resulting mesh.
  • Can operate on any mesh, will not throw errors if the mesh has odd face/edge/vertex topology.
  • Options to control where polygons are removed.
  • Keeps materials assigned to faces.
  • Maintains UV texture coordinates, vertex colors, and vertex group weights (used for bone weight painting) – this makes it very useful for game/realtime models.

Cons

  • Fairly Slow.
  • Uses a lot of memory.


Examples

Famous cow.
Human with UV textures and bone weights from www.x-trusion.com.
Heavily reduced workman www.x-trusion.com.
Example of an 80% Reduction using a weight map for influencing the result. Original, Weight Map, Result of the reduction.


Auto Image Layout

Mode: All modes (meshes only)

Menu: UV/Image Editor » UVs » Auto Image Layout

Description

This script makes a new image from the used areas of all the images mapped to the selected mesh objects.

Images are packed into 1 new image that is assigned to the original faces.

This is useful for game models where 1 image is faster than many, and saves the labor of manual texture layout in an image editor.

Options

This script is accessed from UV/Face mode and packs images from the active mesh.

On activation a pop-up will appear with the following options:

Image path
No ext!
A new PNG image file will be created at this path. Use // as a prefix for the current blend file location. Otherwise you may specify the full path. Do not append any file extension.
Pixel Size
The size of the image, this value is used for width and height to make a square image.
Pixel Margin
When cropping the image to the bounds of the used areas add this pixel margin, this stops lower resolution textures (mipmaps) from bleeding the edge color into the faces that use this texture.
Keep Image Aspect
If this is turned off, the tiles will stretch to the bounds of the image, making the images look stretched in an image viewer. However it will give better results when viewed in 3d because there is more pixel information in the image.
Texture Source, All Sel Objects
When enabled all selected objects will have their textures packed into the texture.


Examples

Here is a test case where I took 5 unedited photos, mapped them to a low poly mesh, and pack them into 1 texture.

Projection mapped uv mesh.
Model in details.
Texture view.
Back wall with generic texture.
Finished Details with roof and side walls.
All images used for this mesh.
Result of running the Auto Texture Layout Script.


Weight Painting

Bone Weight Copy

Mode: Object mode (meshes only)

Menu: Object » Scripts » Bone Weight Copy

Description

This copies weights from one mesh to another based on vertex locations. It can also be used to update a mesh that’s already weighted, by selecting the vertices on the target mesh, and then using the Copy To Selected option.

Mirror Vertex Locations & Weight

Mode: Edit mode (meshes only)

Menu: Mesh » Scripts » Mirror Vertex Locations & Weight

Description

This script is used to mirror vertex locations and weights. It is useful if you have a model that was made symmetrical but has vertices that have moved from their mirrored locations slightly, causing Blender’s X-Mirror options not to work.

Weights can be mirrored too, this is useful if you want to model one side of a mesh, copy the mesh and flip it. You can then use this script to mirror to the copy, even creating new flipped vertex groups, renaming group name .left to .right or .L to .R.

Vertex positions are mirrored by doing a locational lookup, finding matching vertices on both sides of a mesh and moving to the left/right or mid location.

The vertex weights work differently, they are mirrored by location also, but they don’t mirror in pairs, rather it works by finding the closest vertex on the flip side and using its weight.

When a location mirror is finished, vertices that have not been mirrored will remain selected. A good way to check both sides are mirrored is to select the mirrored parts, run this script with default options and then see if there are any selected remaining vertices.

For details on each option read the tooltips (!).

Weight Paint Gradient

Mode: Weight Paint mode (meshes only)

Menu: Paint » Weight Gradient

Description

Mix weight paint and face select mode so as to select the faces to gradient. Then run Weight Gradient from the Paint menu, and click on the two locations to blend between. The existing weight under the mouse is used for to/from weights.

Vertex Color Gradient

Mode: Vertex Paint mode (meshes only)

Menu: Paint » VCol Gradient

Description

See Weight Paint Gradient above…

Examples

Example of gradient usage.


Self Shadow

Mode: Vertex Paint mode (meshes only)

Menu: Paint » Self Shadow VCols (AO)

Description

Uses the mesh geometry to shade the mesh, similar to ambient occlusion.

Examples

Elephant Shaded.




Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ