Opened 13 years ago

Closed 12 years ago

#886 closed defect (fixed)

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: Patch:

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 (6)

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

Download all attachments as: .zip

Change History (14)

by michael, 13 years ago

Attachment: bug-proppoint1.jpg added

Prop point in Max prior to export.

by michael, 13 years ago

Attachment: bug-proppoint2.jpg added

How it looks in-game.

by michael, 13 years ago

Attachment: iber_civic_centre.dae added

The Collada file after export from Max to the game.

comment:1 by michael, 13 years ago

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 by Kieran P, 13 years ago

Milestone: Alpha 7Backlog

by michael, 13 years ago

Attachment: celt_outpost2.dae added

Celtic Scout Tower Collada file

by michael, 13 years ago

Attachment: bug-proppoint3.jpg added

Screenshot showing garrison flag pitched forward and in wrong position.

comment:3 by michael, 13 years ago

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 by michael, 13 years ago

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.

by michael, 13 years ago

Attachment: bad prop points.jpg added

As you can see, prop points are messed up.

comment:5 by historic_bruno, 12 years ago

Milestone: BacklogAlpha 8
Owner: set to historic_bruno
Status: newassigned

comment:6 by historic_bruno, 12 years ago

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.

in reply to:  4 comment:7 by historic_bruno, 12 years ago

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 by ben, 12 years ago

Resolution: fixed
Status: assignedclosed

(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.