Skip to content

Improve common mesh format #1423

@chreden

Description

@chreden

Attempting to add TEN support has brought up a few issues with the current mesh format. At present everything is converted into TR4 face3/4 and then the final mesh is generated from that - UVs are gathered based on the attribute from object textures and so on. TEN however stores the UVs directly in the faces, vertices are already floats instead of classic TR int16s and indices use 32 bits instead of 16.

It makes sense to make a few new types for vertex/tri/rect that all the loaders convert to. This way TEN could be supported more easily and it would also move a few version specific steps out of the common location.

  • Floats for vertices
  • UVs stored on faces. Need pre-process step for classic games to read object textures.
  • Texture stored on face. Need pre-process step for classic games to read object textures.
  • 32 bit indices
  • Blend mode on face. Need pre-process step for classic games to read object textures.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions