The following modo scripts were made with Modo 501. All are written in Python.
The most useful script I have written so far as attested by my co-workers. This script fixes T-Junctions the crop up in your model. A T-Junction is when a polygon edge vertex is not connected to an adjacent polygon edge. T-Junctions can cause bad visual artifacts such as sparklies and mess up hardware occlusion in game engines. Also help for fixing up bad edge loops for filling in polygons. I use this one daily to clean up bad geometry.
Works like the default Modo Merge Polygon tool but removes vertices that have two edges that are aligned to one another. In simpler terms it removes unnecessary vertices. I use this all the time.
This handy script only welds vertices in your selection that exist along open edges. I use merge a fair bit and it’s really easy to make manifold geometry that way. This has replaced the default merge vertices for me.
Given a set of polygons I generate a primitive that are useful for collision in games:
- Aligned Box – Finds the best way to rotate and wrap a box around set of polygons. This works by finding the normal of the largest set of planar polygons, then finding the longest edge of that set to get the other normal, and then getting the cross product to generate a rotation matrix.
- Axial Box – Generates a simple axial aligned box around a set of vertices.
- Convex Hull – Generate a convex hull around a set of vertices.
Automatically merges planar polygons together within a given threshold. Handy for creating optimized collision geometry.
Export to Valve Map Format (vmf)
Exports geometry to .vmf for use in the source engine. Has to modes:
- Default: Exports all polygons in selection. Geometry has to be convex and closed in order for this to work.
- Extrude: Takes every face in selection and extrudes it by a given distance. Useful for making roads and sidewalks etc
UV Peeler Polystrip Straighten
Works with Seneca’s Polystrip script but also straightens up the edges. Nice time saver for UV mapping polygon loops.
Copy to Child Layer
Works like show hide but cuts and pastes selected geometry into a child layer. Has a cvar to paste geometry back into parent layer. This is handly for big scenes where performance becomes and issue. Things like snapping and knife tool slow down in big scenes.
Works like Spin Quads but on Edges.