Page 1 of 1

Automatically convert old maps to well-textured mesh-maps

Posted: Tue Jun 24, 2008 8:12 pm
by KTL
Simple python script that renovates old maps.
Copy paste from the file:
# code written by KTL
# * skydome and referenced textures coming from Optic Delusion
# * referenced hills texture from Blaster Wisconsin
# * use this code freely to make life more complicated.
# * everyone free to deliver me pizza, no beer.

# code
# * usage: python convert.py <inputmap> [<outputmap>]
# if no outputmap specified it writes to out.bzw
# * the code runs through old style bzw files
# * boxes and pyramids become meshes
# * texture coordinates are put in such a way that textures from overlapping faces fit exactly on each other.
# this is true for horizontal faces (the easy ones) and for box-sides
# it still works wether the boxes are rotated or not.

# * It now also works for faces of pyramids. As long as the pyramids got the same height their overlapping faces should be aligned well.

# * elevated teleporters get a small doorstep box
# some buggy code does not allow passing through porters on elevated meshes.
# * no normals are inserted since boxes and pyramids seem to have trivial normals.
# * skydome and hills are placed around the map.
# * inside points are placed, 8 per box close to the corners, 5 per pyramid.
# * places 4 banners of the local dragon/god/pet, they fit nice on the modified mad city map.
# * it adds some default options
# * if it should copy what it does not touch (not box,pyr,tele,link) then uncomment the last 2 lines.
# * makes a difference between texture materials for boxtop, boxwall, boxwall shootthrough, boxwall drivethrough, boxwall passable, ceiling, pyramid, pyr shootthrough, pyr drivethrough, pyr passable
# * works fine with most maps, tested on modified mad city, badgerking's map, field and streams (aka the happy pinguin map)

# bugs
# .. all fixed?

# todo
# * better handling of secondary attributes like shootthrough and drivethrough DONE
# * add more decorations (shootthrough/drivethrough) DONE
# * change the sky periodically with dynamic colors, there are nice textures available.
# * there are pyramids with a negative height too... DONE
# * ...

Posted: Tue Jun 24, 2008 8:21 pm
by KTL
Forgot to mention, I got a collection of old maps here:
http://users.pandora.be/dpf/bz/

Posted: Tue Jun 24, 2008 8:28 pm
by lol_u died
are any of the old maps hosted?

Posted: Tue Jun 24, 2008 8:40 pm
by KTL
They are much less popular now but some of them have been very important. One of the reasons why they are less popular now is their look. This script tries to do something about that. The work that has been put in those old maps should not be wasted.

update

Posted: Mon Sep 08, 2008 10:57 pm
by KTL
Now the script also deals correctly with overlapping faces of pyramids.