3
$\begingroup$

I have an image of a scene and I extracted the projection matrix from that, so I have the camera calibration. Now, I want to add some 3D objects to this scene. I have already coded something with OpenGL. You can see the results here (the white wall is added in OpenGL):

Soccer Image

Now, I want to achieve the same thing with Blender, because it's easier to work with complex models and complex scenes. Can anyone give me any pointers on how to convert from OpenGL camera to Blender?

$\endgroup$
1
  • 2
    $\begingroup$ One thing that may be true for you here. Matrices that are normally used for OpenGL camera FOV are inverted to Blender, a higher value for OpenGL has the opposite effect in Blender. For aligning your two scenes-> "Camera Mapping" seems to be the official term used in Blender circles right now. youtube.com/watch?v=B9r9tKX5olY Feel free to return and also post the answer to your own question. Your math and OGL API usage looks solid, I'd be interested to see how you connect them to Blender. I use some dhpoware.com/demos code to convert .obj to OGL vertex arrays. $\endgroup$ Commented Sep 13, 2014 at 13:25

1 Answer 1

0
$\begingroup$

If you were using a video, you could use blender camera tracking, and add objects to the scene that way. Then, you could select the exact frame in the video that you wanted to add the objects to. For example, if you had a video of the soccer game, then you could use that.

Here is an tutorial on blender camera tracking: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CDIQtwIwAg&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCVPcT0dJmoY&ei=J4IoVOy7CIi9ggTB7YDwCA&usg=AFQjCNF6HngfToZ3LNcfFsj9NnkfFfc6hg&sig2=JLK58U_NvMz6XS_KS3IzCA

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .