PathEngine home previous: 3D Content Processing Optionsnext: Tiled 3D Content Processing
Contents, Programmers Guide, World Representation, 3D Content Processing, Choosing Voxel Processing Parameters

Choosing Voxel Processing Parameters

It's quite important to set up a suitable set of processing options in order to get good results out of the 3D processing, especially in the case of the Voxel processing.

Aliasing issues with maximum step height and surface slope

Note that, with this processing method, the step height 3D processing parameter actually applies at the boundaries between voxels.

If the vertical step at the boundary between two voxels is over the maximum step height, then the resulting ground surface will be disconnected at this location.

This works well for vertical steps that correspond to actual vertical steps in the 3D source content data, but for some settings this maximum step height threshold between boundaries can also be reached for voxels generated from a single, sloped, surface, and this can then cause undesirable artifacts with multiple disconnects within that sloped surface.

If this happens maximum step height should be increased, or maximum slope or voxel size decreased (or a combination of these things).

Example voxel processing settings

The best settings to use for the voxel processing will depend on the exact situation, as well as the effective scale, but an example set of options, based on a 1 centimetre unit scale, is as follows:

int32_t extrudeHeight = 200;
    int32_t maxStepHeight = 100;
    int32_t maxSlope = 120;
    const char* voxelOptions[] = {
    "method", "voxels",
    "voxelSize", "80",
    "subdivisionSize", "5",
    "optimiseWithThreshold", "100",
    "minimumFragmentSize", "10",
    "stripTerrainHeightDetail", "true",
    0
    };
    

With these settings, PathEngine will subdivide non-terrain parts of the mesh result so that this can be used effectively for 'ground-management' purposes (e.g. resolution of 3D positions to the ground, obtaining height at pathfinding positions).
A terrain callback object will then need to be supplied in order for this to work correctly in terrain areas.


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Tiled 3D Content Processing