After advice on fragmenting meshes for export

(BlendedRace) #1


I’m using Blender to make tracks for the car simulator ‘RACER’.

The program culls objects that aren’t in view, so tracks are made of many (100s) of small meshes that fit together to make the scene.

I’ve written an ASE exporter script that exports each mesh into a separate ase file (with one image map per object).

The tracks are usually made by BevObing a track layout curve with the track cross-section, so they’re composed of a single long multiface object, which is fiddly to fragment up.


Can anyone recommend a method/protocol/algorithm to optimise the fragmenting of a single object into a series of localised smaller objects?

Has anyone here some something similar?

Cheers Steve

(Hos) #2

How about this: Get the boundingbox of the track and split it
in, lets say for example 100 equal parts (i.e., cut in the north-south
direction into 10 peices, then cut 10 pieces in the east-west direction).
Next, examine each face and get the midpoint
of the face. Place the face in a subobject based on which of the
100 subdivisions of the boundingbox the midpoint resides in. When you
are done you will have a bunch of subobjects that will contain
faces that were close together in the original object.