X-Plane / XPlane2Blender

Scenery & Aircraft export addon for Blender and X-Plane
GNU General Public License v3.0
196 stars 67 forks source link

Imp: Convert to euler whenever possible #666

Closed tngreene closed 3 years ago

tngreene commented 3 years ago

When an object rotates around (1, 0, 0), (0, 1, 0), (0, 0, 1) a Euler can be used.

Rotations are collected in a dictionary, if the only rotations in the dictionary are these members it can be compressed into a Euler.

If, however, an off axis animation is used, it can't be merged

Case 1: Use your imagination
Case 2: Can't combine
ANIM_rotate_begin 1 0 0 dref1
ANIM_rotate_key 0 0
ANIM_rotate_key 1 20
ANIM_rotate_end

ANIM_rotate_begin <something off axis> dref1
ANIM_rotate_key 0 45
ANIM_rotate_key 0 80
ANIM_rotate_end

In case 2, it would have to be integrated as an AA.

Given the importer default of assuming AA, this should be done as late as possible

tngreene commented 3 years ago

Or perhaps not. Maybe this idea is evil! 👿 🔥 👹 🔥

todirbg commented 3 years ago

I prefer Euler over AA every time! It is much simpler to understand and picture in my head.