steve3d Posted December 6, 2010 Posted December 6, 2010 core/scripts/camera.h can be used as a camera path as manual said, and the format of camera path file is position0.x position0.y position0.z rotation0.x rotation0.y rotation0.z rotation0.w fov0 then I also checked the manual, it only said the rotation, then I checked the 3dsmax export script. the rotation should be the original quaternion, but if this is the original camera quaternion, why the camera.h script need to inverse the rotation quaternion and do some more calculation like this: quat rotation = inverse(lerp(rot[p0],rot[p1],time)); float fov = lerp(fov[p0],fov[p1],time); vec3 z = normalize(rotation * vec3(0.0f,0.0f,1.0f)); vec3 x = normalize(cross(rotation * vec3(0.0f,1.0f,0.0f),z)); vec3 y = normalize(cross(z,x)); mat4 transform = translate(position); transform.m00m10m20 = x; transform.m01m11m21 = y; transform.m02m12m22 = z; player.setWorldTransform(transform); so, what is the content of this rotation?
steve3d Posted December 6, 2010 Author Posted December 6, 2010 well :) :blink: I'm stupid, these values are just inverse quaternion of camera's rotation. here is my contribute, the camera path export script for softimage, usage: select camera with animation you want to export set In/Out of animation range (not global in/out) select File>Export>Export Camera Path to export it ExportCameraPathPlugin.rar
nthnchpmn Posted October 20, 2016 Posted October 20, 2016 Hi I know this thread is about 6 years old but i've stumbled across it trying to import a tracked camera into unigine. I wonder if you can help me, I have used your plugin, but I'm not sure what I should do with the text file. If you could enlighten me that would be greatly appreciated. Thanks very much.
angus Posted October 24, 2016 Posted October 24, 2016 Do you have a .PATH file ? If you do, you can then import it in to Unigine by menu Create -> World -> TransformPath and then make your object a child of the path.
Recommended Posts