Welcome to the thread for the Blender (https://blender.org) PKG import/export addon
NOTE: All of the documentation in this post is available locally in the readme.txt found in v0.11 and above.
Requirements
The addon was created in Blender 2.76. If you have any issues with the addon in a previous Blender version, I will NOT provide support!!
Installation
Blender 32 Bit
On 32 bit Blender installations, extract the downloaded ZIP file to
Code: Select all
C:\Program Files (x86)\Blender Foundation\Blender\2.76\scripts\addons
On 64 bit Blender installations, extract the downloaded ZIP file to
Code: Select all
C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons
After extracting the Add-on, start Blender. Once Blender is started, open up File->User Preferences, and navigate over to the Add-ons tab. Find "Import-Export: Midtown Madness 2 PKG Format", and enable it. Click "Save User Preferences" on the bottom of the dialog, and close the dialog.
Now you will be able to use the Add-on.
Importing
Textures
Textures with the format BMP, PNG, TGA will be imported. TEX is NOT supported.
MTX Files
MTX files will automatically be imported if found
Geometry Flags
Because geometry flags are done via geometry, and not via material. These are NOT imported.
Exporting
Reflections
To change the "Shininess" of a material, change the "Reflectivity" property under the "Mirror" section. It doesn't matter if the property is grayed out; it is still editable and will affect export.
Geometry Flags
Applying the "Shadeless" tick in Materials settings will export any geometry with that material as shadeless in MM2
Textures
When exporting, the default texture name for a material will be the material name. If that material has a texture assigned to it in the textures tab, then the texture name will be used.
Matte materials should be named "mm2:notexture". It does not matter if Blender adds .001, .002, etc to the end of this, the exporter will ignore that.
XRefs
To define an xref, simply name an empty object "xref:xrefname". Where xrefname is the name of the PKG file to xref e.g. "sp_parkmtr_f". Again it does not matter if Blender adds the .001 and so on. Make sure not to include the ".pkg" extension in the xref name.
XRefs will not export their rotation. Only their position.
Paintjobs
In the export dialog, in the bottom left, there is a text box called "Material Replacement Info". This text box is there for creating multiple paintjobs.
The paintjobs system in this Add-on differs from the one in ZModeler, but works in the same way in the end.
To define a paintjob replacement, use this format:
Code: Select all
_yellow,_red
Code: Select all
_yellow,_red|_yellow,_blue
MTX files will be created if the location of an object is not 0,0,0. Objects do not need the :m suffix. Adding the :m suffix will crash the game, because it will be exported with that name into the PKG file.
Export Type
Export type (Dashboard, Trailer, Prop) will be automatically determined. And all types of objects such as city props, buildings, etc should work automatically
Transparency
Transparency is done using Blenders native system. Tick "Transparency" in the Material panel, and change the Alpha, to make transparent materials.
Vertex Colors
Vertex colors can be exported by ticking "Vertex Colors" in the export dialog
FAQ
How do you know what questions are frequently asked, if you are just releasing this now?
Trust me, I know
I imported my PKG file, I have my textures in the right format, but I don't see them in Blender!?
You have to be in Material render mode, rather than Solid. You also must have lighting in the scene to see materials.
Why do the imported normals get overwritten when I enter edit mode?
Blender automatically recalculates the normals when entering edit mode. To restore original, or close to original normals for default vehicles, use the remove doubles tool, then apply the Edge Split modifier at an angle above 80 degrees
Upcoming/Planned Features
-BND/BBND Import-export
Downloads
v0.1, Feb 28 2016 : https://xmx.fyi/aaro4130/io_scene_pkg.zip
v0.11, Feb 29 2016 : https://xmx.fyi/aaro4130/io_scene_pkg_011.zip
v0.12, Feb 29 2016 : https://xmx.fyi/aaro4130/io_scene_pkg_012.zip
v0.13, Mar 02 2016 : https://xmx.fyi/aaro4130/io_scene_pkg_013.zip
latest public build (Aug 2016) : https://github.com/Dummiesman/PKGImport ... master.zip