Giter Club home page Giter Club logo

Comments (5)

Road-hog123 avatar Road-hog123 commented on September 26, 2024

I should perhaps rename the SDK Compatibility option to Crossing Editor Compatibility—it just exports an o3d version 1 header that the Crossing Editor knows how to read, the rest of the file is unchanged.

If my exporter is not producing the correct transform matrix then that's a bug that should be fixed—but I'm going to need more information about how the transform matrix is different (and unexpected?) to be able to make any changes.

Were the converted o3d files exported using the X exporter bundled with Blender <=2.79b, or with a third-party X exporter for Blender >=2.80?

from blender-omsi-exporter.

jem-suu avatar jem-suu commented on September 26, 2024

The converted o3d files were from the included exporter from 2.79b.

I'm going off memory here, but from what I've experienced, origin_rot_y and origin_rot_z are seemingly swapped around.

An example I can think of from the top of my head is the front wheels when Steering, when you apply

origin_rot_y
90

to a rotation animation on a mesh exported from the 2.79b .x, the axis of rotation changes on the Y axis and thus the mesh rotates on the z-axis. Applying the same on a mesh exported using the exporter on 2.80+, the axis of rotation on a wheel changes on the Z axis and thus the mesh rotates on the Y axis, a bit like this:
image
(Source: Greenmint Discord Server)

I also think that the axis directions are also different, as, again, using a typical wheel animation like below:

[newanim]
origin_from_mesh
anim_rot
Wheel_Rotation_1_R
57.295779513082320876798154814105

the wheel rotates backwards and I would have to put a negative value for that animation for it to animate correctly

I'll have to figure out how to illustrate it better, and I'll add another comment once I do do.

from blender-omsi-exporter.

jem-suu avatar jem-suu commented on September 26, 2024

Looking at this diagram from Webdisk:
image
my guess as to what's happening is that:

  • +X is being exported as -X, and vice versa
  • Y and Z are swapped

from blender-omsi-exporter.

Road-hog123 avatar Road-hog123 commented on September 26, 2024

Ok, this implies the coordinate system of the transform matrix is not the same as the geometry... 🙄 I'll do some testing and get this fixed. 👍

from blender-omsi-exporter.

Road-hog123 avatar Road-hog123 commented on September 26, 2024

Ok, this implies the coordinate system of the transform matrix is not the same as the geometry... 🙄

It turns out the coordinate system is the same, but the coordinate system conversion for matrices also requires that the middle rows be swapped, which was not being done and is now fixed.

Testing shows the diagram from Webdisk is incorrect (+X is right, not left), but I can understand why because OMSI is cursed—being a DirectX application it uses left-handed Y-up internally, but frequently makes itself appear to use right-handed Z-up in the UI and config files by labelling Z as Y and Y as Z—this results in a system with right-handed axes and left-handed rotations. 🙄

from blender-omsi-exporter.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.