ofCamera measurements unit

Hi guys,

We are working on a project and we are facing an issue related with measurements.
To simplify our problem we did model a simple plane (like a road) in Maya with 1400 centimeters, exported with a couple of different plugins and loaded into OF.

What we want is to move the camera according to the 1400 centimeters in Z, but to reach the end of the plane we can’t set the Z value of the camera to 1400 cause it will be much further than the end of the plane. If we tune it by hand and set to something close to -414 it will be at the end of the plane.

Is OF world coordinates different than Maya? Is there a specific unit that OF uses?

This is a simple explanation of what we need to do, but it will be easier to understand.

I saw a method cameraToWorld and worldToCamera, but I don’t understand the values that those methods returns and I can’t find more information about it.

Any help will be appreciated.

Thank you in advance.

Hi Pedro,

Moving the camera “1400 centimeters” is hard because all OpenGL stuff is set in screenspace units, i.e. relative to the size of the OpenGL window. I wrote a tutorial that might help a to explain how this works: http://www.openframeworks.cc/tutorials/graphics/opengl.html

1 Like

Hi Joshua,

Thank you very much for your input. I’ll take a look at the link you post and get back to you if needed.