Sunday, August 25, 2013

"The Barrier" and Blender

All week I tried to find a way to convert the camera specifications in Xtranormal into Blender, so I can create the background images I need. I made some progress.

I had success with the focal length. Xtranormal's specification is some kind of inverse of the specification that Blender uses. By trial and error I got an equation that approximates the relationship well enough.

Blender focal length = 1054.6 time (Xtranormal fov) -1.0149

I find that I still need to adjust this when I do a new camera.

I finally figured out the co-ordinate system Xtranormal uses. I had the y-axis and z-axis switched. I thought that would fix the problem with the orientation parameters. It didn't solve the problem. Xtranormal appears to use quaternions, but when I use those in Blender they point the camera in the wrong direction. Frustrating.

I really don't think I will come up with some easy way to transform the orientation parameters. I did come up with an approach that seems to work, but is very time consuming.

  1. In Xtranormal I use the location markers to define the corners of a camera image.
  2. I save the STATE file and get the and used them to identify the corners of the camera frame.
  3. I unzip the STATE file and get the co-ordinates of the corners from the document.xml file.
  4. I use those co-ordinates to create a plane in Blender
  5. I adjust the camera orientation and focal length to match the plane I created.

It is only an approximation, but I think it should work well enough. I have done five cameras so far. There are 30 cameras altogether. I think some of them are duplicates, or close to duplicates, so I won't need to do them all.

This post is a mirror from my main blog http://www.dynamiclethargyfilms.ca/blog

No comments:

Post a Comment