Hello!
Finally I could setup the environment for a fixed camera pre-rendered survival horror.
Everything ok, now I’ve (I hope) the last obstacle to across, the camera.
I installed in blender the OGRE exporter, and I exported the entire scene and loaded into JME.
I found on the forum the code for import the blender camera from a .scene file, and it seems working, but I’ve got some problematics:
- position it seems ok, but rotation no, I used this method:
public void setSceneCamera(Camera cam, String cameraName, Spatial scene) {
Node n = (Node) (((Node) scene).getChild(cameraName));
if (n != null) {
cam.setLocation(n.getWorldTranslation());
cam.setRotation(n.getWorldRotation());
}
}
And I tried even with the different setRotation that i found on the forum:
cam.setRotation(new Quaternion(-n.getWorldRotation().getZ(), -n.getWorldRotation().getW(), n.getWorldRotation().getX(), -n.getWorldRotation().getY()));
But in both cases it seems not working, are some values not correct?
- I’ve information about the camera position and orientation, but no information about:
- Focal length
- Sensor size
Is it possibile to set these values inside JME3? Otherwise if is not possibile there are some default values that I can set inside blender before the rendering? (Because what my fixed camera will show me in JME3 must overlap exactly with my rendered image).
I will design my application only for one resolution (1280x720) for the moment, so for now I’ve not to manage pre-rendered backgrounds for multi resolutions.
Could you help me please?
Thanks again for all support.