Anihilnine wrote:We'll just mirror the normal as well.
You gave a really good hint here. I successfully fixed wrong normals by swapping channel green and alpha for the mirrored decals. Thanks!
EDIT:Current WIP-Version:
https://pastebin.com/kNctKNMqFeatures:
- mirrors decals, props and units positions
- mirrors decal albedos and normals
- rotates props to look better after position is mirrored
- replaces unit types with mirror version for a few walls
- mirrors heightmap (only left-right yet)
Requirements:
- python-lupa (to read in "_save.lua")
- ImageMagick (to transfrom decals and heightmap)
- python 3 (maybe even 3.5 or 3.6)
Limitations:
- only left-right and diagonal top-left to bottom-right mirror options are tested/implemented
- you have to find and change the hard-coded path to my env.scd file to use decal texture mirror
- script could miss out on units in places I've never seen in the one _save.lua I've used for testing
Have fun!
PS: This huge file should be split up into at least three files, but probably even more