3-way symmetric mapper

Discussion in 'Mapping and stuff' started by trialq, January 4, 2015.

  1. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    I've made a small program that creates 3-way symmetric maps (aka 1/8 of the map reflected in x, y and z). It has issues (well, one serious issue), but I'll attach it in case anyone feels like playing with it. It can't reflect terrain so it has to be on zero height maps with no partial lava or partial water, even then the height can be a little off (the main issue is CSGs and metal spots can be off ever so slightly relative to the terrain).

    So I created a glorious map like this:
    [​IMG]
    The unit cannons show the corners of the area, pointing inwards. They are roughly along the x, y and z axis.

    I then passed the .pas to the program, which spat out another .pas. The new .pas looks like this:
    [​IMG]
    Which is great, except that even with zero terrain height there is still a little variation. Trying to edit CSGs removes most of them which is a pain, but not editing they work when playing a game. It's most noticeable with massive CSGs:

    [​IMG]
    This was on a 600 radius map, one out of the 7 mirrored CSGs was noticeably sunk. Manually changing to 598 radius brought the temple out of the ground, which means some other temples were floating slightly but I didn't notice them doing so, still that's not recommended. Metal spots have a similar issue; they still work floating or sunk, but if floating slightly the brush is tilted (presumably it has nothing to get a normal from).

    The program is attached, although it's not user friendly at all. If you try it, here's some tips:
    • You need to find an axis aligned 1/8 of the planet. Do that by placing a brush and manually editing the pas to be at the axis, and replacing the transform with the identity matrix. I've attached a 600 radius sandbox biome with axis markers
    • Create your masterpiece, then export to .pas
    • You need java. Pass the map to PASymmetryMapper.jar, which will spit out the mirrored map in the current directory as out.pas

    The practical purpose this program has currently is as a tool to make an accurate 3-way mirror. It doesn't spit out a perfect map, but it spits out something you can use to make a perfect map. you just have to laboriously go over it in the editor (with a million screenshots as most of the CSGs disappear when you try and edit them), replacing every CSG and metal spot so they align with the terrain. Have fun.

    If terrain isn't involved it should work well, is that possible? It's not doing any complicated transformations (just negating floating point values where necessary and flipping a boolean), so in theory it should work fine.
    YMMV.

    Attached Files:

    xankar, cdrkf, squishypon3 and 3 others like this.

Share This Page