tobywf / mech3ax-py Goto Github PK
View Code? Open in Web Editor NEWObsolete; please see https://github.com/TerranMechworks/mech3ax
License: GNU General Public License v3.0
Obsolete; please see https://github.com/TerranMechworks/mech3ax
License: GNU General Public License v3.0
Version 1.00 (U.S.)
Version 1.01 (U.S.)
Version 1.02 (U.S.)
Version 1.00 (Deutsch)
For the high-poly Supernova model (mech_supernova.json
), there are flickering artefacts when an animation is rendered.
Operating system: Windows 10, macOS Sierra (10.12)
Python version: Python 3.7.3 (default, Mar 27 2019, 09:23:32)
Blender version: Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
mech_supernova.json
with animation run
Could be z-fighting in Blender or a normals issue.
Version 1.00 (U.S.)
Version 1.01 (U.S.)
Version 1.02 (U.S.)
Version 1.00 (Deutsch)
For some low-poly chicken walker 'mechs, the thigh rotation is incorrect on the static model.
Operating system: Windows 10, macOS Sierra (10.12)
Python version: Python 3.7.3 (default, Mar 27 2019, 09:23:32)
Blender version: Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
For mech_cauldron_1
, mech_daishi_1
, mech_puma_1
, and mech_supernova_1
, the thigh rotation is incorrect. At least the X-axis rotation needs to be inverted (negated), for the other axis it's hard to tell as they are 180 degrees, so it doesn't make a difference.
The Blender install script could be improved to automatically perform actions I usually do in Blender:
mech_madcat_run##
for up to 99 frames)Version 1.00 (U.S.)
Version 1.01 (U.S.)
Version 1.02 (U.S.)
Version 1.00 (Deutsch)
In general, most of the animation data is applied to the model correctly. But sometimes it doesn't quite work. For e.g. the Mad Cat model, the hands are too far from the torso for several animations (stand, walk, run, collapser).
Operating system: Windows 10, macOS Sierra (10.12)
Python version: Python 3.7.3 (default, Mar 27 2019, 09:23:32)
Blender version: Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
$ blender --background --factory-startup --python model2blend.py -- \
mechlib/mech_madcat.json mechtex/ --anim "run"
Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
found bundled python: /Applications/Blender.app/Contents/Resources/2.80/python
Converting 'mechlib/mech_madcat.json' to 'mech_madcat_run.blend' with animation 'run'
Textures: mechtex
Materials: mechlib/materials.json
Info: Total files 25 | Changed 0 | Failed 0
Blender quit
It's possible the parenting isn't quite right, but it works for most other 'mechs, the static model, and the feet/toes.
Because the animation data isn't fully understood, there could be a flag or more data on how to apply it. I don't think the issue is kinematics, for one there's no evidence the game supported kinematics and the arms would look oddly stretched if the hand positions were correct.
For the Mad Cat, the hands are attached/should be attached to the arms and the torso (torso -> larm/rarm -> lhand/rhand).
The Vulture has a similar issue like the Mad Cat, but worse.
The feet don't quite look right and seem to have "exploded" in the run animation:
CLI or mech3_from_zbd
I've observed on some texture ZBD files (non-MW3) that you may encounter a failure which stops all execution on the current textures#.zbd file. It may be useful to have either:
Some materials don't have texture names, and the material data isn't well-enough understood to extract material properties. So once the models are exported to Blender, the cockpit windows don't have a texture or material properties and just appear grey.
Two options: Can if part name == head
, then apply cockpit material. Or, the unnamed materials are known, so could manually have workarounds for them in the script.
So far, I haven't been able to find where the material data is loaded or used, because COM/DirectX is full of C++ classes which virtual tables and other indirection. More reverse engineering is needed, or maybe somebody from the community knows.
The Pirate's Moon expansion adds six new 'mechs. It would be awesome to be able to extract them, too.
The first step would be to run existing extraction functions on Pirate's Moon and document what works and what doesn't. The reason I haven't done this is time, but contributions are welcome!
Version 1.00 (U.S.)
Version 1.01 (U.S.)
Version 1.02 (U.S.)
Version 1.00 (Deutsch)
For the high-poly Sunder model (mech_sunder.json
), there are UV issues on the bottom of the thigh.
Operating system: Windows 10, macOS Sierra (10.12)
Python version: Python 3.7.3 (default, Mar 27 2019, 09:23:32)
Blender version: Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
mech_sunder.json
with animation run
The issue occurs on the static model, but is most visible when the run
animation is applied.
Would be good to know if this happens on any other model.
Version 1.00 (U.S.)
Version 1.01 (U.S.)
Version 1.02 (U.S.)
Version 1.00 (Deutsch)
Export script errors out when converting mech_bushwacker.json
and mech_cauldron.json
with "face already exists".
Operating system: Windows 10, macOS Sierra (10.12)
Python version: Python 3.7.3 (default, Mar 27 2019, 09:23:32)
Blender version: Blender 2.80 (sub 74) (hash 06312c6d2db8 built 2019-07-11 19:16:32)
mech_bushwacker.json
or mech_cauldron.json
blender \
--background
--factory-startup \
--python model2blend.py -- \
mechlib/mech_bushwacker.json mechtex/
ValueError: faces.new(verts): face already exists
Traceback (most recent call last):
File "mech3ax/model2blend.py", line 268, in <module>
main()
File "mech3ax/model2blend.py", line 264, in main
model_to_blend(args.model, args.tex_dir, blend_path, materials, args.anim)
File "mech3ax/model2blend.py", line 179, in model_to_blend
root = _create_objects(model, None, get_material)
File "mech3ax/model2blend.py", line 76, in _create_objects
_create_objects(child, obj, get_material)
File "mech3ax/model2blend.py", line 76, in _create_objects
_create_objects(child, obj, get_material)
File "mech3ax/model2blend.py", line 76, in _create_objects
_create_objects(child, obj, get_material)
File "mech3ax/model2blend.py", line 56, in _create_objects
face = bm.faces.new(bm.verts[i] for i in vertex_indices)
ValueError: faces.new(verts): face already exists
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.