In order to support Cameras in FBX, I do contribute the following patch to FBXConverter.cpp (4.1.0, line 733-735):
out_camera->mPosition = cam.Position(); // instead of aiVector3D(0.0f);
out_camera->mLookAt = (cam.InterestPosition() - out_camera->mPosition).Normalize(); // instead of aiVector3D(1.0f, 0.0f, 0.0f);
out_camera->mUp = cam.UpVector(); // instead of aiVector3D(0.0f, 1.0f, 0.0f);
Concerning Camera support in 3DS, the implementation seems reasonable, yet it produces a weird result regarding the Up vector (3DSLoader.cpp, line 473, original 4.1.0 code):
// And finally - the camera rotation angle, in counter clockwise direction
const ai_real angle = AI_DEG_TO_RAD( stream->GetF4() );
aiQuaternion quat(camera->mLookAt,angle);
camera->mUp = quat.GetMatrix() * aiVector3D(0.0,1.0,0.0);
Maybe it could be due to my dataset, yet I saved the same dataset in Agisoft PhotoScan both in FBX Ascii and in 3DS, so I suppose camera data are the same (yet maybe not written correctly by the program in the two formats) - I'll go more in depth, in the meanwhile if we could share similar experiences...
Many thanks,
Paolo Leoncini
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In order to support Cameras in FBX, I do contribute the following patch to FBXConverter.cpp (4.1.0, line 733-735):
Concerning Camera support in 3DS, the implementation seems reasonable, yet it produces a weird result regarding the Up vector (3DSLoader.cpp, line 473, original 4.1.0 code):
Maybe it could be due to my dataset, yet I saved the same dataset in Agisoft PhotoScan both in FBX Ascii and in 3DS, so I suppose camera data are the same (yet maybe not written correctly by the program in the two formats) - I'll go more in depth, in the meanwhile if we could share similar experiences...
Many thanks,
Paolo Leoncini