Giter Club home page Giter Club logo

halo-asset-blender-development-toolset's Introduction

Halo-Asset-Blender-Development-Toolset

Toolset Description

The Halo Asset Blender Development Toolset is a Blender addon developed in python to aid with creating assets for multiple Halo titles. This addon requires that you have Blender 4.0.0 or above on your system to function.

Supported Titles and Features

The following games are or will be supported by this script:

  • Halo Custom Edition
  • Halo 2 Vista
  • Halo Combat Evolved Anniversary MCC - Classic
  • Halo 2 Anniversary MCC - Classic
  • Halo 3 MCC
  • Halo 3 ODST MCC

Script supports the following features:

Feature Halo Custom Edition/Halo Combat Evolved Anniversary MCC - Classic Halo 2 Vista/Halo 2 Anniversary MCC - Classic Halo 3 MCC/ Halo 3 ODST MCC
Levels (JMS) Full Support Full Support N/A
Levels (ASS) N/A Full Support Partial Support1
Levels (GR2) N/A N/A N/A
GBXmodel (JMS) Full Support N/A N/A
Render Model (JMS) Full Support Full Support Full Support
Render Model (GR2) N/A N/A N/A
Collision Geometry (JMS) Full Support Full Support Full Support
Collision Geometry (GR2) N/A N/A N/A
Physics Models (JMS) Full Support Partial Support2 Partial Support2
Physics Models (GR2) N/A N/A N/A
Animations (JMA) Full Support Full Support Full Support
Animations(GR2) N/A N/A N/A
Cinematics(QUA) N/A N/A Partial Support (WIP)
JMI Exporting Full Support Full Support Full Support
WRL Importing Full Support Full Support Full Support
JMS Importing Partial Support3 Partial Support23 Partial Support23
JMA Importing Full Support Full Support Full Support
ASS Importing N/A Partial Support3 Partial Support31
QUA Importing N/A N/A No Support (WIP)
GR2 Importing N/A N/A N/A
Structure_BSP Tag Importing Partial Support Partial Support No Support (WIP)
GBXModel Tag Importing Full Support N/A N/A
Model Tag Importing Full Support Full Support No Support (WIP)
Collision Tag Importing Full Support Full Support No Support (WIP)
Animation Tag Importing Partial Support4 No Support (WIP) No Support (WIP)
Camera Track Tag Importing Full Support Full Support No Support (WIP)

Documentation

See the following links for information on exporting or importing assets from these tools:

C20 Docs

H2Codez Docs

Credits

  • Cyboryxmen

    • For making the original JMS script known as WaltzStreet that was used as a reference.
    • WaltzStreet
  • Discord user Aerial Dave#2236

    • For making the original ASS script known as blend2halo2 that was used as a reference.
    • Blend2Halo2
  • Discord user conscars

    • For testing, suggestions, a bug fix, and the WRL import code that is being used for this project.
    • WRL to OBJ
  • Discord user MercyMoon#3864

    • For developing the Halo materials tool Helper scripts in the toolset.
  • Discord user Fulsy#1228

    • For some modifications done to the WaltzStreet version the script was based on.
  • Discord user mosesofegypt

    • For some modifications done to the WaltzStreet version the script was based on, Stubbs related tooling, and advice on animation data.
  • Discord user num0005

    • For help with code reviews and several features.
  • 343 Industries/Discord user kornman00

    • Thanks to Kornman for aiding the development of the toolset by answering questions and 343 Industries/Microsoft for allowing this to happen in the first place.
  • The Sigmmma crew

    • For some tips on importing assets and for MEK defs along with some math used in the Halo 1 tag importing code.
    • Sigmmma
  • Discord user chiefster_4014

    • For contributing to the Halo 1 shader nodes used in this project.
  • Discord user dogbrainludus

    • For contributing to the Halo 1 shader nodes used in this project.
  • Discord user general_101

    • Getting the ball rolling I guess?

Footnotes

  1. Toolset is currently missing support for importing or exporting certain Halo 3 JMS/ASS features such as the W coordinate in UVW. 2

  2. Car wheel and prismatic constraints are not exported or imported properly. WIP 2 3 4

  3. JMS/ASS files imported into Blender do not have their triangles connected properly. This means that imported models are improper due to the exporter using vertex normals instead of loop normals. 2 3 4 5

  4. Imported animations tags currently do not have fixed overlay animations.

halo-asset-blender-development-toolset's People

Contributors

aerialdave144 avatar csauve avatar general-101 avatar iloveagoodcrisp avatar jadshep avatar kant avatar missingnoguy55 avatar num0005 avatar samdamding avatar unordinal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

halo-asset-blender-development-toolset's Issues

Handle linked geometry

Modifiers can't be applied to linked geometry. This causes an issue where a bad JMS could be exported if an object is made up of quads but is also a linked geometry piece. The object will never be triangulated and cause issues later. Need to have a system that warns or tries to do something to the object to make it valid for modifiers without affecting the scene.

Script also errors if the geometry does not have a UV before it is linked.

new to this. mind giving a small tutorial?

getting this to work in blender is being a real pain. as a beginner, i have no idea what i'm supposed to do with this, because trying to place it in the Addons folder does literally nothing.

Rework FPS option in JMA export

The value written to the file does not seem to actually matter. It's what the exporter did to the animation that matters. It seems that the original exporter messed with the length of the animation depending on the framerate selected. Need to look into how this worked exactly and see if anything can be done to emulate this in Blender.

Add ability to exclude specific objects when exporting. (suggestion)

When working on assets or maps I usually have scale references, other misc objects etc in the scene and it can get a bit tedious hiding/deleting them for every time I do an export.

Allowing the user to add a prefix/suffix symbol like "}" (or any other unused special character) to object names they want excluded from scene would make working on larger scenes/complex assets a bit more easy to manage.

Fully support available versions

Missing several features. Listed below

  • Node Checksum for 8200 CE
  • Texture Path for 8200 CE
  • Instance XREF Paths
  • Instance Markers
  • Rag Doll
  • Hinges
  • Car Wheel
  • Point To Point
  • Prismatic
  • Bounding Sphere
  • Disable or enable features depending on the version. Currently only 8200, 8205, 8209, and 8210 are exported as they should be.

Issues with Halo Combat Evolved First Person Animations

I've been having some trouble importing Halo's first person animations

3dsmax GBX importer works fine, but throws some really old FBX files I can't really work with.

I am using Halo CE 1.10 files extracted with Refinery 2.3.0, I can't find anything that can extract files from MCC yet after a lot of searching.

image
Pistol's slider is rotated in a weird way
image
some issues with the wrists
image
tried using "fix rotations" but nothing changed
image
image
not sure if this also happened in the original engine as its hard to see with dark textures.
issue.zip

Let me know if I'm missing a step, I can't seem to find documentation on doing Halo CE assets.

Prevent script from putting out an error if poly has no material assigned.

Currently we only check if the object has no materials at all before assigning -1 or None. No fail safe is in place if the object has materials but has a set of faces with no materials. Assign -1 or the None material to these faces.

These changes must be ported over to the ASS script at a later point.

Inability to Generate Lightmap Images

When trying to generate lightmap images in the Halo Tools Helper, an error stating "Internal error: <class 'TypeError'>(get_face_material{} takes 2 positional arguments but 3 were given)
image

Documentation For Installing?

Having some Proper Documentation for Installing and Updating the plugins would be very helpful for first time modders looking to get into model importing.

I know it's not a priority but it would be nice to have. 📄

Perhaps this would be better suited for C20, but I figured a request here would be appropriate as well.

ModuleNotFoundError: No module named 'pwd'

Seeing an error whenever I try to export a .ass to Halo 3: ODST. I've tried exporting different maps to make sure it wasn't my model causing a crash. Tried looking in the Reclaimers Discord to see if someone had this issue before to no avail, can't find anything useful on Google searches either. Export results in an empty 0kb .ass file that causes a pipeline error when attempted to build a bsp through Tool.

The error:

Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_halo\global_functions\global_functions.py", line 1326, in run_code
toolset_exec(f"""locals()['__this_is_a_horrible_hack'] = {code_string}""")
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_halo\global_functions\global_functions.py", line 1316, in toolset_exec
exec(code, globals(), caller_locals)
File "", line 1, in
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_halo\file_ass\export_ass.py", line 38, in write_file
build_asset(context, filepath, version, game_version, folder_structure, hidden_geo, exluded_collections, apply_modifiers, triangulate_faces, edge_split, clean_normalize_weights, custom_scale, report)
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_halo\file_ass\build_asset.py", line 48, in build_asset
'\n"%s"' % (getuser()) +
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\python\lib\getpass.py", line 168, in getuser
import pwd
ModuleNotFoundError: No module named 'pwd'

Problem with Halo Sky Tools

There's a bug in Halo Sky Tools that says it's looking for a list of floats and finding a color instead. I'm using Blender 2.93 on Windows 10, and I'm using the default scene with no unit measurement.

You can replicate this by using the default scene and clicking on Generate Sky.

Rework region support

3DS Max could apparently take a selection of faces and set them to a specific region. Currently we use separate objects for this and this makes impossible for anything other than hard edges between two regions for smoothing. Region setup should instead be moved over to the new face maps systems introduced in Blender 2.83

H3 Design Surfaces

Exporting design surfaces such as soft_kill as described here was broken in commit 8652fee
Setting a material name to something such as +soft_kill:kill_barrier causes the material name to be blank in the exported .ass.
The : separator and a name are required for these materials otherwise tool will fail parsing the material name with a message such as

WARNING didn't understand material type '+soft' parsing shader name '+soft_kill'
-ERROR- unable to find shader '_kill' anywhere

[Bug] Material Naming Issue

Editing materials' names from within the "Scene Collection" in Blender's UI does not update the name that is read upon exporting a JMS file for Halo 2 (and maybe other asset types/games, however, that's untested). A band-aid fix for the aforementioned issue you must re-edit the affected material name(s) in the "Material Properties" section in Blender's UI.

Steps To Reproduce:

  1. tool extract-render-data scenarios\objects\solo\earthcity\signage\sign_road_signal\sign_road_signal
  2. Import the !extracted\sign_road_signal\sign_road_signal.jms into Blender
  3. Go to the Scene Collection side-bar UI area in Blender and expand Armature->sign_road_signal->sign_road_signal and edit two materials' names from: signage_glass!= to ob signage_glass!= and signage_signal!= to ob signage_signal!= (you can just skip doing the import fix-ups here because it doesn't affect the incorrect outcome we're looking for here)
  4. Export the Halo 2 JMS to data\scenarios\objects\solo\earthcity\signage\sign_road_signal\render (back up the original .render_model tag!)
  5. tool render scenarios\objects\solo\earthcity\signage\sign_road_signal
  6. Watch it not correctly find the two shaders during the render command
  7. Go back to Blender and go to the Material Properties UI Tab in the sidebar, change one character in each of those material names, and then change it back, press enter (final names should still be ob signage_glass!= and ob signage_signal!=).
  8. Export again
  9. Render again, fixed!

Rework vertex group processing

Currently the JMS exporter errors out if there is a vertex group assigned to a vertex that doesn't exist in the node list. There isn't an easy way to get around this with the current method that vertex groups are handled. Just not reading it could ruin the order that things happen in due to poor code.

Need some type of system that loops through the vertex list and leaves only valid groups behind. Then that result is looped through until it is done or 4 slots are filled in the JMS vertex definition.

Finalize physics exporting

Needs to happen before we move on to the rest of JMSv2. Everything is technically right at the moment but the object doesn't look correct in the scene when it has a parent node. Need to fix this so it both looks proper and gives the right location in the JMS file.

.ASS lights are misconfigured

global_ui init.py line 979 and 980 should be swapped. Setting a light to Circle incorrectly exports it as a rectangle and vice versa.

file_ass build_asset.py lines 112 and 113 need to be swapped for falloff to work correctly

When exporting JMS all meshes get merged into one

I've been trying to model my vehicle with multiple meshes because I saw the warthog with multiple meshes
But when I export the JMS file, I come to find out that all meshes were made into one meshed named "__unnamed".
How do I stop this from happening? I'm modding for Halo CE (Custom Edition)

Errors importing halo 2 first person weapon animations.

2022-05-12 05_05_29-Blender
Importing halo 2 first person weapon animations results in errors. Other halo 2 animations seem to import fine. Animations extracted using bonobo.
I've tried setting the JMS rest positions with correct node names.
I've tried changing JMA versions.
If importing the halo 2 animation with halo ce selected on the import, only the last error message shows.
Unsure if issue with bonobo or blender plugin.

Rework UI

The idea currently is the to have the JMS scene properties be a saved options list for the export menu and the export menu act as an override when it is ready.

Add mask system for JMSv2 render/collision/physics exporting

Looking at leftover JMSv2 files, sentences in the Halo 2 map editor.chm, assumptions based on the ASS exporter, and some other sources I have come to a conclusion. The original 3DS Max exporter for Halo 2 had a system that would allow the designer to designate a piece of geometry as a render/collision/physics geometry through an object symbol and the exporter would take them and write the geo in separate JMS files. A single Max file could have 3 files written from it easily without any input.

The way we write files will have to be reworked to support this.

Properly deal with hidden geometry

Currently we unhide all geometry before exporting permanently. This goes against the idea that the script should never modify the users scene after export. Hidden geometry needs to be ignored when exported instead of added to the list and causing an error due to inaccessible object details. There also needs to be an override that exported hidden geometry by temporarily unhiding them and then reverting to the state they were before export.

Problem exporting JMS files for Halo 2

Blender Export Problem Full
When I try to export a Halo 2 JMS, it gives this error. It only happens with JMS files. ASS and JMI models work fine.
Edit: It's not making the JMS for Halo 1 and 3 either.

Add ability to export weighted normals

The exporter currently averages smooth normals on export. However, advanced users may want the ability to export custom weighted normals, something the FBX-JMS pipeline supports. This can be used to achieve nice results in hard surface modeling with less geometry.

I propose that this be a new ASS/JMS export option grouped with the existing edge split options, but off by default because beginners will definitely shoot themself in the foot with poor normals otherwise.

Rework default parent in JMS export

If a JMS in Halo 2 has no nodes then it can still be exported. This means that a render file or collision file can be exported with the geometry saying it has a parent at index 0 and no nodes actually in the file. Need to change the exporter to not write render or collision geometry that has no parent. Only physics as far as we know can have a parent of -1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.