Ticket #886 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

Prop point position within static Collada meshes do not get exported or interpreted correctly by the game.

Reported by: michael Owned by: historic_bruno
Priority: Must Have Milestone: Alpha 8
Component: Core engine Keywords:
Cc:

Description

Prop points get moved and pitched 90 degrees when exported from Max to Collada and into the Game. Not sure if this is an exporter issue or a game engine issue where the game does not interpret the Collada data correctly.

Attachments

bug-proppoint1.jpg (115.3 KB) - added by michael 2 years ago.
Prop point in Max prior to export.
bug-proppoint2.jpg (131.5 KB) - added by michael 2 years ago.
How it looks in-game.
iber_civic_centre.dae (184.7 KB) - added by michael 2 years ago.
The Collada file after export from Max to the game.
celt_outpost2.dae (201.0 KB) - added by michael 2 years ago.
Celtic Scout Tower Collada file
bug-proppoint3.jpg (505.6 KB) - added by michael 2 years ago.
Screenshot showing garrison flag pitched forward and in wrong position.
bad prop points.jpg (138.5 KB) - added by michael 21 months ago.
As you can see, prop points are messed up.

Change History

Changed 2 years ago by michael

Prop point in Max prior to export.

Changed 2 years ago by michael

How it looks in-game.

Changed 2 years ago by michael

The Collada file after export from Max to the game.

comment:1 Changed 2 years ago by michael

We have fixed this in the past by manipulating the dummy helper in Max prior to exporting to Collada. This is not an ideal solution, because it adds more work and testing for each and every model we export with a prop point attached, and will confuse modders in the future.

comment:2 Changed 2 years ago by k776

  • Milestone changed from Alpha 7 to Backlog

Changed 2 years ago by michael

Celtic Scout Tower Collada file

Changed 2 years ago by michael

Screenshot showing garrison flag pitched forward and in wrong position.

comment:3 Changed 2 years ago by michael

It looks like this code is being misinterpreted by the game engine:

(snippet from the Celt outpost/scout tower collada file)

        <node id="prop_garrisoned" name="prop_garrisoned">
          <matrix sid="matrix">0.404669 0.000000 0.000000 0.865969 0.000000 0.404669 0.000000 0.027975 0.000000 0.000000 0.404669 6.726372 0.000000 0.000000 0.000000 1.000000</matrix>
        </node>

comment:4 follow-up: ↓ 7 Changed 2 years ago by michael

It seems like this should be a simple fix. We just need to figure out how this matrix data is being interpreted, how it's being misapplied, and fix it.

Changed 21 months ago by michael

As you can see, prop points are messed up.

comment:5 Changed 20 months ago by historic_bruno

  • Owner set to historic_bruno
  • Status changed from new to assigned
  • Milestone changed from Backlog to Alpha 8

comment:6 Changed 20 months ago by historic_bruno

To update this ticket with my observations:

COLLADA models specify the up axis which the exporting 3D editor uses (it can be X-up, Y-up, or Z-up, but I think realistically we only have to worry about Y-up and Z-up), so we have to transform the mesh vertices, bones, and prop points accordingly. The game uses a left-hand Y-up coordinate system, COLLADA is always right-handed (see this page for illustrations of these terms), so we have to flip an axis as well.

The problem is that for static meshes we have been transforming the mesh and ignoring the prop points, the result is they appear to be offset and rotated due to using a different coordinate system. I've tested some changes to the PMD converter that seem to work with Max (Y-up or Z-up per exporter option) and Blender (Z-up - no exporter options in 2.58). I can't seem to import a model with prop points in Blender 2.49, so I haven't tested that.

Also ticket #243 is related.

comment:7 in reply to: ↑ 4 Changed 20 months ago by historic_bruno

Replying to michael:

The chariot shown in bad prop points.jpg is a static mesh right?

Are there any observed issues with prop points attached to bones?

comment:8 Changed 20 months ago by ben

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [10484]) Fixes PMD converter's handling of static prop points. Coordinate conversion was not performed correctly according to the model's up-axis orientation. Fixes #886, #243.

Note: See TracTickets for help on using tickets.