Skip to content

Document extended W3D format declarations from max2w3d#139

Open
caseychaos1212 wants to merge 2 commits into
w3dhub:mainfrom
caseychaos1212:codex/w3d-format-spec-sync
Open

Document extended W3D format declarations from max2w3d#139
caseychaos1212 wants to merge 2 commits into
w3dhub:mainfrom
caseychaos1212:codex/w3d-format-spec-sync

Conversation

@caseychaos1212
Copy link
Copy Markdown
Collaborator

Summary

This draft PR updates OpenW3D's W3D format headers with additional declarations documented by the newer max2w3d scripts sources.

Reference source:

  • max2w3d/scripts/w3d.h
  • max2w3d/scripts/w3dobsolete.h
  • Reference commit: 17485aaa575fc5032540c24f2c3f48a67ace2423 (Updated with Source from 1.9.0, March 7, 2026)

Changes

  • Added later-format chunk identifiers for extended skin influences, FX shaders, tangent/binormal streams, light and emitter extensions, HLOD light arrays, and secondary vertex streams.
  • Added corresponding inert payload declarations, including extended skin weights, compressed motion channels, newer light/emitter data, and FX shader data.
  • Added catalog-only declarations for observed shader mesh/submesh and related obsolete/unsupported chunk identifiers.
  • Documented the alternate two-bone weighted W3D_CHUNK_VERTEX_INFLUENCES layout used by smooth-skin files, alongside the four-bone extended form.
  • Documented additional surface types found in the newer scripts sources without exposing them through the current enum/string table.

Intent

This is a format specification update only. It publishes known later-format identifiers and layouts so future OpenW3D work can implement support deliberately.

This PR does not add support for reading, writing, exporting, or rendering these newer format features.

Deliberately Deferred

  • W3D_CHUNK_LIGHTMAP_UV is not included because it was not completed in the reference implementation.
  • Later surface type enum/string entries are not enabled because the newer source changes existing numeric assignments and the legacy exporter uses this list for UI choices.
  • Existing ring and sphere structures are not duplicated or replaced.
  • No format version constants, loaders, savers, exporter behavior, or runtime logic are changed.

Files Updated

  • Code/ww3d2/w3d_file.h
  • Code/ww3d2/w3d_obsolete.h
  • Code/Tools/max2w3d/w3d_file.h
  • Code/Tools/max2w3d/w3d_obsolete.h

Follow-Up Work

Future PRs can implement individual features from this published format surface, such as extended skinning, later shader chunks, or additional light/emitter data, with appropriate loader/exporter/runtime tests.

Copy link
Copy Markdown
Collaborator

@OmniBlade OmniBlade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these all from later versions of W3D based games or are some from W3DHub engine work that have been created? Could it be documented if they are "official" extensions or "community" extensions if its a mix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants