Name | Modified | Size | Downloads / Week |
---|---|---|---|
hwres.py | 2012-07-21 | 2.7 kB | |
hwwhp2.py | 2012-03-24 | 7.0 kB | |
whpb2.py | 2012-03-24 | 546 Bytes | |
spr2bmp24.py | 2011-08-04 | 4.5 kB | |
whp2blend.py | 2011-08-04 | 4.1 kB | |
whpb.py | 2011-08-04 | 535 Bytes | |
whpconvert.py | 2011-08-04 | 5.3 kB | |
res2blend.py | 2011-08-04 | 3.6 kB | |
shp2blend.py | 2011-08-04 | 7.1 kB | |
shpconvert2.py | 2011-08-04 | 6.5 kB | |
moth2blend.py | 2011-08-04 | 2.2 kB | |
mothmat.py | 2011-08-04 | 3.9 kB | |
readme.py | 2011-08-04 | 3.0 kB | |
hwshp2.py | 2011-08-04 | 11.1 kB | |
hwwhp.py | 2011-08-04 | 7.2 kB | |
hwwld.py | 2011-08-04 | 4.5 kB | |
hwwxp.py | 2011-08-04 | 1.3 kB | |
hwpal.py | 2011-08-04 | 1.3 kB | |
hwpaths.py | 2011-08-04 | 282 Bytes | |
hwmat.py | 2011-08-04 | 3.2 kB | |
Totals: 20 Items | 79.9 kB | 0 |
#Duncan June 2011 #(note: the main script is res2blend.py) #(also note: will create over 500 Mb of files) #(july note: added some more scripts for SHP, not documented below) #for questions, find me on hardwar.proboards.com #scripts to convert hardwar game world models to individual blend files #needs to be run from blender 2.57 python console #extracts data from downtown.res #creates bmp files of textures #creates blend files of models with models offset in wxp as name #creates a text file 'vanilla.world' with world positioning data #theoretically you need only run all this once #set paths manually in hwpaths.py #execute the three functions in res2blend.py manually from.. #blenders python console (see below for more detailed instructions) #make sure folders exist before running scripts #these scripts dont create folders, dont do error checking, ... #Note: #I wrote this scripts while learning python and blender api. Slowly.. #it all grew slightly above my head. Which means; the code.. #works on my system (macbookpro), but is far from elegant. #Especially splitting the code in several modules caused me some.. #headaches, for sure the introduced fixes did not help elegance. #How to run from blender: #first open hwpaths.py in an text editor and change file paths, save #open blender 2.57 #click in the 3D view #press x followed by leftclick - this deletes the default 3D box model #find the python console, leftmost button in one of three visible toolbars #mouse over that button gives you 'display current editor...' #its all the way at the top or bottom of the popup list #in the python console type: #import sys #sys.path.append('location_of_these_scripts') #example: sys.path.append('/users/duncan/python') #then type: #import res2blend #res2blend.gettextures() #this will create lots of bmp files on your drive and takes several seconds #res2blend.getmodels() #this creates approx 500 Mb of blend files on your drive #res2blend.getworld() #this creates a single textfile with lots of numbers and some letters. #thats it, nothing will be visible in blender #still need to create a separate script to create the hardwar world #you can open the blend models in blender #to actually see them you need to zoom in on them, or rescale them. #rescale in 3D view by first press b, draw box with mouse around model.. #its in the centre, then move mouse pointer to centre scree, press s.. #and move mouse pointer to side screen. rotate by press r followed.. #by x,y and/or z and move mouse. #update #altered res2blend.getworld to actually load the entire harwar world into blender #with options to restrict to terrain only, terrain+buildings, complete world #including rail and walkways #known limitations #-building models that are duplicated in hardwar, are currently loaded... # multiple times into blender, perhaps less taxing on system if also duplicated... # in blender. #-some more that atm slipped my mind