Blender Remesh modifier

mesh modifier

The text Remesh modifier will re-mesh the old text with a more uniform one.

To do so select your text and, while in wireframe mode (in order to see the results), convert your text to a mesh by clicking ALT+C and then Mesh from Curve/surf/text, since the text is made from disconnected pieces uncheck "Remove disconnected pieces" in order the modifier to be applied to all of the letters...Then increase Resolution by increasing Octree Depth value around 8 depending on the text length.

 

Before:

Before

 

After:

After

 

 

THAT'S ALL! Your text's geometry is now uniform and ready to use!

*More geeky remesh stuff: https://goo.gl/PhtGQ4

Code

The original code was modified to compile under GCC (fixing some nonstandard C usage that MSVC allows) and to work on 64-bit systems (pointers were being stored in 32-bit integers.) The mesh input/output code was also modified; the ModelReader interface remains, but the implementations for various formats were removed. The modified code was placed in intern/dualcon/intern/. The dual contouring code is C++, so a small wrapper is used to interface it with Blender. The wrapper's files are intern/dualcon/dualcon.h and intern/dualcon/intern/dualcon_c_api.cpp.

The code is currently available from the remesh-modifier branch of this git repository: nicholasbishop-blender. There now also a second branch based off bmesh: bmesh-remesh-modifier.

Code flow: made assumption that code in intern/ directory doesn't get to know much about Blender internals, so doesn't directly include BKE/DNA stuff. Not sure if correct assumption or not? If not, code could be simplified to use fewer callbacks stuff.

  • MOD_remesh.c:applyModifier() calls dualcon()
  • dualcon_c_api.cpp:dualcon() uses ModelReader subclass to wrap Blender mesh data into format expected by dual contouring code. Then octree object is created and its method scanConvert() is called.
  • octree.cpp:Octree::scanConvert() does all the remeshing magic and (via a callback pointed to dualcon_create_mesh) allocates a DerivedMesh to hold the output.