Markemp / Cryengine-Converter

A c# program to convert Crytek files to Collada (XML) format
https://www.heffaypresents.com/GitHub/
GNU General Public License v2.0
208 stars 53 forks source link

Star Citizen Transforms slightly off #122

Open Baconator650 opened 2 years ago

Baconator650 commented 2 years ago

Transforms (namely pos) are slightly off. Sometimes it can be subtle like in the Hornet here:

image

Sometimes it can be off more drastically like in the MSR and is more apparent when loading in the whole ship via StarFab (uses CGF-Converter to convert models.)

image

Baconator650 commented 2 years ago

image

With the Aegis Redeemer

Baconator650 commented 2 years ago

Here is a better example: Red=CGA exported via Bulkhead's modded engine Black=.cga exported via cgf-converter.

image

nose image

Engine-Wing Fairing image

Wing Tip image

Left Tail image

Notice that objects have the same position as a helper/dummy with the same name. The mesh may potentially be pulling the wrong position from the dummy, rather then the correct mesh.

Markemp commented 2 years ago

Those pics do a great job of showing the problem. Thanks for collecting them.

I'll have to dig into the details of the dummy nodes. I think there is usually one per mesh, and if they have slightly different positions, that could explain it. Do you see any issues with scaling or rotation, or is it all position?

Baconator650 commented 2 years ago

The UI screen meshes will have scaling issues. And there are a few rotation issues about 5-10% of the time.

Ventorvar did some research into the issue and notice some "bad math", but hasn't had the time to really look into the issue.

Baconator650 commented 2 years ago

And the MSR has some rotational issues. Fix is simple of matching the meshes rotations to its parent node.

Markemp commented 1 year ago

One of the weird things about SC models is that the scaling isn't part of the transform model (Dymek figured this out I believe). Instead, I've been calculating it using the bounding box. I wonder if that's been the source of this issue. I haven't poked around in this more, but if there is a bad math component, I'd love to hear more and get this fixed.