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:
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!
- 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
-
Properly assign vertex weights to bones for accurate skinning and animation.
Skinning
Animation
- cyborg.model_animations
-
stand unarmed move-front.JMA
-
- cyborg.model_animations
-
Import UV coordinates for proper texture mapping.
- Import in the correct position/rotation and hierarchy all bones and marker objects.
-
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 Setsand assigns objects to their corresponding region.Regions
-
Named Selection Sets
-
- 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).
-
Automatically applies textures based on the bitmap's path defined in the shader.
- Shaders supported:
shader_modelshader_transparent_chicagoshader_transparent_chicago_extendedshader_transparent_genericshader_transparent_metershader_transparent_glassshader_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,.ddsand.tgaformats.
- Currently supports
- Example:
- If the shader references
tags\bitmaps\mytexture, the tool will search fordata\bitmaps\mytexture.tif/png/dds/tgain your project directory.
- If the shader references
- Shaders supported:
- 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:
bb_boneframebip01
- Convert into unique helpers the markers with prefix
#symbol.
- Go to Halo CE Toolkit → Import → GBXModel Tag.
- Select a
.gbxmodelfile. - The importer will:
- Create nodes, markers and materials.
- Rebuild geometry from regions.
- Assign materials.
- Search and apply textures automatically.
gbx_imp_demo-1.mp4
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.
- Renames imported objects as
@ + regionName+permutationName+nodeName - Links each geometry piece to its respective node.
- Removes smoothing groups.
- 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_thickwoodcyborg_armoretc. - Imports Halo CE material symbols if the geometry has flags such as
% = two-side! = invisible^ = climbablebreakable- Example:
- If a geometry piece is marked as
two-sidedin the collision tag, the importer will assign a material the simbol to corresponds to that property:floor_grate%
- If a geometry piece is marked as
- Example:
- Imports pathfinding spheres in their correct positions, radius and linked to their respective nodes.
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.
-
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
frameb_andbip01nodes 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 = UpPhysics
- Imported tags:
pelican.gbxmodel-
pelican.physics
- Imported tags:
-
Complete mass point data display in Modify panel including
name,node index,linked node,powered mass point reference,mass/densityvalues, andfriction properties.Modify Panel
- Custom Attributes:
- Custom Attributes:
- I'm focusing on adding a
JMS Importerwith 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.
-
Geometry:
- Build meshes by regions.
- Renamed meshes with the convention
regionName+jmsFileName(e.g.,cyborg __base superhigh). - Assign meshes to a
Named Selection Setsbased on their region names. - Assign meshes to a
Geometry Modellayer. - 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.
- Renamed meshes with the convention
- Build meshes by regions.
-
Nodes:
- Hierarchy.
- Position/Rotation.
- Assign nodes to a
Nodeslayer.
-
Markers:
- Position/Rotation
- Assign markers to a
Markerslayer. - When they contain the word
mpin their name, markers are named with the prefix+used for physics mass points. Standard markers use the prefix#.
-
Regions:
- Create
Named Selection Setsbased on region names.
- Create
-
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.
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
1
0
0
0 1 2
;### SMOOTHING GROUPS ###
1
1
Extended Metadata in .json File
"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
]
}-
Read and Import
- In a model with 7215 triangles:
- Import time is around
1.8 secondsvs8.63 secondswith the JMS Importer by LaikaGlove.
- Import time is around
- In a model with 7215 triangles:
- 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.