This thread gives a summary of how to use the rendering add-on for blender and Zeno's ImageMasker program to create full pngs for pak128.Britain. This works for 1x1 buildings and all vehicles.
Step 1: make blender model and scale correctly:
- best to start from an existing blender file so the lighting is set up correctly.
- Ensure vehicle is correctly aligned - centred down its direction of travel, z-aligned with wheels on the z=0 plane, 4 blender guide squares in front of the vertical axis looking side on (see an existing example of a blend for what I mean here).
Step 2: use the rendering add-on to output the images (see attachment):
- make sure the py script in the attachment is in the python add-ons folder in blender: e.g. C:\Users\XXXXX\AppData\Roaming\Blender Foundation\Blender\2.64\scripts\addons
- enable the addon in blender: User preferences->addons->render tab, make sure the check box is ticked on the right:
- Back in the properties window in blender you should now see an extra box in the render tab:
- give the image a name in the first box (NO FILE SUFFIX)
- choose render option: 4 views for buildings, 8 views vehicle alignment FOR RAIL VEHICLES, 8 views normal alignment FOR ALL OTHER VEHICLES
- Hit the render views button and wait
- "MAKE MASK" is if you want to automatically create a shadeless, non anti-aliased images which can be used to give sharper edges and auto player colour in the next step, but this doesn't work too well and pak128.Britain graphics do not generally use this feature.
Step 3: Load up ImageMasker
- Choose 4 or 8 views as appropriate
- open button - select the 4 or 8 output pngs
- select the SAME 4 or 8 files at the second prompt again, unless you have created a mask set of images in which case use those.
- hit process
- hit save and save the output png where you need it
Step 4: Use a graphics program eg GIMP to convert black background to #e7ffff simutrans transparency colour on the output png and resave
Step 5: Get the dat file right
- NB image definition 1.0 is WEST, 1.1 is NW etc.
- apply any offsets. I have now worked out the offsets for road vehicles - this works for vehicles centre-aligned in blender and with the drive_left flag set to 1 in compat.tab:
Step 6: Compile with makeobj and enjoyModerator note: The original download link (below) is now broken, but you can download an updated version of the file here instead. - Jamespetts.
Moderator note 2: For this workflow to work correctly, it is essential to use Blender version 2.65 (or earlier, but not all earlier versions have been tested). Version 2.65 can be downloaded for Windows, Linux and MacOS X here.