Import Tools - markmcfuzz/HaloCE-Max-Toolkit GitHub Wiki

This page provides an overview of the Import tag tools for 3ds Max. More tools will be added soon.

Content:


GBX/Model Importer

The GBX/Model Importer is a tool for 3ds Max that allows users to import Halo CE GBX/Model files directly into their 3D scenes. This tool is designed to facilitate the workflow of Halo CE modders by providing an efficient way to visualize and manipulate game assets within 3ds Max.

We had been using Adam Papamarcos's GBXmodel importer for almost the entire history of modding. Now the code has been written from scratch for a more direct pipeline; just locate your file, open it and you're good to go!


gbx


Features

1. Accurate geometry.

  • Read the compressed vertex data from the GBX/Model file and decompress it to reconstruct the original geometry.
  • Support for multiple levels of detail (LODs) within a single model.
  • Partially support models with multi-regions (different regions assigned to different faces of the same sealed-object).
    Note: This only will works with models linked into a single node, NOT with skinned models.

    3d Model cyborg_2

2. Accurate vertex weights.

  • Properly assign vertex weights to bones for accurate skinning and animation.

    Skinning vertex_weight
    Animation
    • cyborg.model_animations
      • stand unarmed move-front.JMA

    wal_cycle

3. Accurate UV's.

4. Accurate Bones and Markers.

  • Import in the correct position/rotation and hierarchy all bones and marker objects.

5. Objects and Regions.

  • Renames imported geometries using the convention regionName + permutationName + levelLOD
    Example: cyborg __base superhigh

  • Links each geometry to the first node.

  • Creates regions using Named Selection Sets and assigns objects to their corresponding region.

    Regions
    • Named Selection Sets

    image

6. Material assignment.

  • Creates a Multi/Sub-Object material using only the materials actually used by the model and with the proper shaders names. (Old bluestreak script creates a Multi/Sub-Object with 10 materials by default).

7. Automatic texture assignment.

  • Automatically applies textures based on the bitmap's path defined in the shader.

    • Shaders supported:
      • shader_model
      • shader_transparent_chicago
      • shader_transparent_chicago_extended
      • shader_transparent_generic
      • shader_transparent_meter
      • shader_transparent_glass
      • shader_transparent_water
    • The tool looks for the textures inside your project's data folder.
    • If the required textures are missing, a checker pattern will be assigned as a placeholder.
      • Currently supports .tif, .png, .bmp, .dds and .tga formats.
    • Example:
      • If the shader references tags\bitmaps\mytexture, the tool will search for data\bitmaps\mytexture.tif/png/dds/tga in your project directory.

    Textures uvs_ar

8. Additional improvements.

  • Asigns a different layer for each type objects in scene.
    • Geometry objects are placed in the Geometry Model layer.
    • Markers appear in the Markers layer.
    • Nodes/Bones appear in the Nodes layer.
  • Improved import speed.
  • Convert into bones the nodes with the prefix:
    • b
    • b_
    • bone
    • frame
    • bip01
  • Convert into unique helpers the markers with prefix # symbol.

How to Use

  1. Go to Halo CE Toolkit → Import → GBXModel Tag.
  2. Select a .gbxmodel file.
  3. The importer will:
    • Create nodes, markers and materials.
    • Rebuild geometry from regions.
    • Assign materials.
    • Search and apply textures automatically.

Demo

gbx_imp_demo-1.mp4


Collision Importer

The Model Collision Geometry Importer is a tool for 3ds Max that allows users to import collision geometry from Halo CE directly into their 3D scenes. This tool is designed to help Halo CE modders visualize and work with collision data within 3ds Max.

The previous version relied on a lot Python modules, and what it actually did was convert the collision to gbxmodel and silently re-import it. That functionality was taken from Mozzarilla.
But now the collision tag is readed, parsed, and imported directly into 3ds Max with several cool features.


collision


Features

1. Accurate geometry.

  • Renames imported objects as @ + regionName + permutationName + nodeName
  • Links each geometry piece to its respective node.
  • Removes smoothing groups.

2. Material assignment.

  • Creates a Multi/Sub-Object material using only the materials actually used.
  • Materials are serialized by color and with their corresponding names.
  • Adds the material type to the Multi/Sub-Object material name like metal_thick wood cyborg_armor etc.
  • Imports Halo CE material symbols if the geometry has flags such as % = two-side ! = invisible ^ = climbable breakable
    • Example:
      • If a geometry piece is marked as two-sided in the collision tag, the importer will assign a material the simbol to corresponds to that property: floor_grate%

3. Additional improvements.

  • Imports pathfinding spheres in their correct positions, radius and linked to their respective nodes.


Physics Importer

The Physics Importer is a tool for 3ds Max that allows users to import physics data from Halo CE directly into their 3D scenes. This tool is designed to help Halo CE modders visualize and work with physics data within 3ds Max.


physics


Features

1. Accurate Mass Points

  • Create spheres for each mass point readed in the correct positions.

  • Uses forward/up vectors from physics data for proper mass points rotation.

  • Links spheres to frame b_ and bip01 nodes if existing in the scene.

    • if not detected nodes in the scene, it will also import the mass points in their respective positions and rotations.
  • Visual distinction by friction type: Orange = Point, Cyan = Forward, Magenta = Left , Green = Up

    Physics
    • Imported tags:
      • pelican.gbxmodel
      • pelican.physics


    pelican_physics

2. Custom Attributes Panel

  • Complete mass point data display in Modify panel including name, node index, linked node, powered mass point reference, mass/density values, and friction properties.

    Modify Panel
    • Custom Attributes:

    modify_panel

JMS Importer

  • I'm focusing on adding a JMS Importer with a high level of accuracy and fidelity to the original JMS files, this is only possible with Extended Metadata

If the JMS file does not contain Extended Metadata, the model will be imported without smoothing groups. Since the mesh is welded, it will appear overly smooth, similar to plasticine. Materials will be assigned a checker texture by default.


jms_file


Features

1. Accurate Import Data

  • Geometry:
    • Build meshes by regions.
      • Renamed meshes with the convention regionName + jmsFileName (e.g., cyborg __base superhigh).
      • Assign meshes to a Named Selection Sets based on their region names.
      • Assign meshes to a Geometry Model layer.
      • Welded vertices.
      • Apply original smoothing groups. Only works with Extended Metadata
      • Correct bone weights and assignments for skin modifiers.
      • Linked meshes to the root node.
  • Nodes:
    • Hierarchy.
    • Position/Rotation.
    • Assign nodes to a Nodes layer.
  • Markers:
    • Position/Rotation
    • Assign markers to a Markers layer.
    • When they contain the word mp in their name, markers are named with the prefix + used for physics mass points. Standard markers use the prefix #.
  • Regions:
    • Create Named Selection Sets based on region names.
  • Materials:
    • Create a Multi/Sub-Object material with only the required number of sub-materials, and rename them based on the shader names. Also add special symbols for collision.
  • Shader Texture Paths:
    • Apply absolute bitmap paths to materials.
    • Support for multiple texture formats: .tif, .png, .bmp, .tga, and .dds.

2. Read Extended Metadata

Extended metadata is additional information stored in JMS files that goes beyond the basic geometry data. This metadata can include details such as smoothing groups and other attributes that help preserve the original appearance and structure of 3D models when they are imported and exported.

  • Smoothing Groups
    • First data is the number of triangles in the model.
    • Then, for each triangle, a smoothing group value is written.
    • Each triangle in the JMS file can have an associated smoothing group value, which is an integer representing the smoothing group to which that triangle belongs. (this value is a bit flag)
Example Files

Extended Metadata in .JMS File

jms_extended_example.JMS.txt

1
0
0
0 1 2

;### SMOOTHING GROUPS ###
1
1

Extended Metadata in .json File

jms_extended_struct.json

jms_extended_example.json

    "triangles": {
    "count": 1,
    "items": [
        {
            "face_region_index": 0,
            "face_shader_index": 0,
            "vertex_indices": {
                "v0": 0,
                "v1": 1,
                "v2": 2
            }
        }
    ]
},
"smoothing_groups": {
    "triangle_count": 1,
    "items": [
        1
    ]
}

3. Fast Processing

  • Read and Import
    • In a model with 7215 triangles:
      • Import time is around 1.8 seconds vs 8.63 seconds with the JMS Importer by LaikaGlove.
  • This ensures that when the JMS files are re-imported, they retain important information for accurate reconstruction of the scene.
  • The JMS files still compiling correctly with tool/invader, meta data doesn't affect the compatibility.
⚠️ **GitHub.com Fallback** ⚠️