Page MenuHome

fbx exporter, camera rotation is wrong (or I cant figure out how to recover the right matrix)
Closed, DuplicatePublic

Description

System Information
Win10

Blender Version
Broken: (example: 2.76b

Short description of error
I have created 3 simple scene with a just camera and a light looking in the same direction (not the same point)

When I export these scenes as FBX the light rotation and the camera should be identical but they are not.

Scene #1, Rotation x:10, Y:0, Y:0 (ZXY euler)
spot Property: "Lcl Rotation", "Lcl Rotation", "A+",100, 0, 0
camera Property: "Lcl Rotation", "Lcl Rotation", "A+",90 ,80,90

Scene #2, Rotation x:0, Y:10, Y:0 (ZXY euler)
spot Property: "Lcl Rotation", "Lcl Rotation", "A+",90,10 , 0
camera Property: "Lcl Rotation", "Lcl Rotation", "A+",0 ,100, 0

Scene #3, Rotation x:0, Y:0, Y:10 (ZXY euler)
spot Property: "Lcl Rotation", "Lcl Rotation", "A+", 90, 0,10
camera Property: "Lcl Rotation", "Lcl Rotation", "A+",-10,90, 0

Is this a bug? If not, what transformation do I need to apply to the camera rotation to obtain the light rotation?

Exact steps for others to reproduce the error
Load this scene, export it as FBX (ASCII or BIN) the rotations of the camera and the light wont be equal

Event Timeline

Raul Aguaviva (xchip) raised the priority of this task from to 90.
Raul Aguaviva (xchip) updated the task description. (Show Details)
Raul Aguaviva (xchip) edited a custom field.

I cant edit the title of my the bug I filed, anyway it should say :

FBX exporter: camera and a light with identical rotations in editor, in the fbx the have different 'rotation' property

This is basically unsolvable currently, until we know how cameras and lamps officially are expected to behave in FBX… Sorry, but won't lose more time on this, if you want it right please ask AD to release publicly their FBX specifications (provided they have some).

Thanks Bastien for the prompt response.

I found this, in case it helps:

http://forums.autodesk.com/t5/fbx-plug-ins-import-export/90-postrotation-of-camera-and-light-nodes/td-p/4225296

Is there a wiki for the fbx exporter? I'd like to document this so it can save time to others.

In case it helps I found the transformation that makes the matrix of the camera and the light identical.

bonus track: I modified the FBX exporter so it exports the clipStart and clipEnd properties of the light. If I submit this change is this something you'd like to integrate?