Skip to content

Latest commit

 

History

History
105 lines (87 loc) · 12.2 KB

Modifiers.md

File metadata and controls

105 lines (87 loc) · 12.2 KB

Blender Modifiers

Modifiers are automatic operations that affect an object’s geometry in a non-destructive way. With modifiers, you can perform many effects automatically that would otherwise be too tedious to do manually (such as subdivision surfaces) and without affecting the base geometry of your object.

blender2ogre supports exporting meshes with modifiers, but not all modifiers are supported. Also, some modifiers have special treatment (Array and Armature), please check the corresponding sections

NOTE: Support for modifiers is best effort, in most cases the modifiers have been tested individually and not all combinations have been tried.

WARNING: Beware of using Modifiers that increase the vertex o poly count of the models when exporting (like Subdivision Surface) since the exported mesh might not be very optimal for realtime rendering. Retopology is advised in these cases to improve render times.

Index

Documentation

Modify type Modifiers

Modifier Supported Notes
Data Transfer Supported Mesh exports OK, with normals properly modified
Mesh Cache Supported* Mesh exports OK, but the exported mesh won't be animated. Please check [XXX] to see how to bake Animations
Mesh Sequence Cache Supported* Mesh exports OK, but the exported mesh won't be animated. Please check [XXX] to see how to bake Animations
Normal Edit Supported Mesh exports OK, with normals properly modified
UV Project Supported Mesh exports OK and UV Maps are projected, although any UV animations made in Blender won't be exported and are not supported in OGRE.
UV Warp Supported Mesh exports OK and UV Maps are warped, although any UV animations made in Blender won't be exported and are not supported in OGRE.
Vertex Weight Edit Supported Mesh exports OK, with normals properly modified
Vertex Weight Mix Supported Mesh exports OK, with normals properly modified
Vertex Weight Proximity Supported* Mesh exports OK, but it does not do animation like the Blender example shows
Weighted Normals Supported* Mesh exports OK, but affected by Blenders' triangulation bug

Generate type Modifiers

Modifier Supported Notes
Array Supported Has full support: Array Modifier
Bevel Supported Mesh exports OK with bevel
Boolean Supported* Mesh exports OK with boolean operation applied, but check Boolean Modifier section for more information
Build Not Supported Can't export a mesh with varying vertex count
Decimate Supported Mesh exports OK properly decimated
Edge Split Supported Mesh exports OK with modified normals
Geometry Nodes Supported Mesh exports OK with the proper geometry
Mask Supported Mesh exports OK with applied mask
Mirror Supported Mesh exports OK with applied mirroring
Multiresolution Supported Mesh exports OK, the Level Viewport parameter should be more than 0, otherwise the base mesh will be exported. Also, this potentially exports an insane amount of geometry, you might want to do a retopology and use normal maps to bake the details.
Remesh Supported* Mesh exports OK, but UV Maps are removed from the Mesh
Screw Supported* Mesh exports OK, but the base object has to be a mesh otherwise nothing is exported
Skin Supported* Mesh exports OK, but UV Maps are removed from the Mesh
Solidify Supported Mesh exports OK with thickness added
Subdivision Surface Supported Mesh exports OK, as with the Multiresolution Modifier beware of the vertex count of the exported mesh (which affects performance).
Triangulate Supported* Mesh exports OK, but affected by Blenders' triangulation bug
Volume to Mesh Supported* Mesh exports OK, but UV Maps are removed from the Mesh
Weld Modifier Supported Mesh exports OK
Wireframe Supported Mesh exports OK

Deform type Modifiers

Modifier Supported Notes
Armature Supported Has full support: Exporting Skeletal Animations
Cast Supported Mesh exports OK
Curve Supported Mesh exports OK
Displace Supported Mesh exports OK
Hook Supported Mesh exports OK
Laplacian Deform Supported Mesh exports OK
Lattice Supported Mesh exports OK
Mesh Deform Supported Mesh exports OK
Shrinkwrap Supported Mesh exports OK
Simple Deform Supported Mesh exports OK
Smooth Supported Mesh exports OK
Smooth Laplacian Supported Mesh exports OK
Surface Deform Supported Mesh exports OK
Volume Displace Not Supported Only works on volumes, not meshes
Warp Supported Mesh exports OK
Wave Supported* Mesh exports OK, but only in the first frame there is no motion. To bake the animation, consult [xxx]

Array Modifier

This modifier as well as the Armature Modifier get their special section because they are treated differently by blender2ogre. Most modifiers are applied before exporting the model (without affecting the object) by converting an evaluated copy of the object into a mesh.

However the case of the Array Modifier is different, since the presence of this modifier has blender2ogre treat the object differently.

What happens is that in scene.py (which creates the .scene output) the Array Modifier is used to place instances of the mesh in positions indicated by the modifier. This means that the exported mesh appearance is not modified by the Array Modifier, but only its placement in the scene.

As a result, there is only one copy of the mesh in the scene that is repeated many times, which could lead to a performance increase if using instancing.

NOTE: To disable this behavior and have the Array Modifier be applied to the mesh directly, then set the option: ARRAY to true in the mesh options

Boolean Modifier

This modifier works well and is in principle fully supported, but you might get this error when exporting meshes with the Boolean Modifier:

FAILED to assign material to face - you might be using a Boolean Modifier between objects with different materials! [ mesh : Cube ]

The issue here is that blender2ogre has a problem when the two objects that make contact to perform the boolean operation don't have the same material assigned to the faces which enter into contact.

To solve this you need to assign the same material to the faces which are in contact, this might be as simple as assigning a Material to the whole secondary object or having to do something more complex like assigning the same material to the faces that come into contact by entering Edit Mode and assigning the material by hand to each face.

As a last resort, it is also possible to make a copy by hand of the object by applying the Boolean Modifier and exporting that mesh.