what is the best way to save and load camera positions?
I can save its transform matrices, but then I get distortions when interpolating between different positions.
I can move the camera via its input pins and save those values, but it feels awkward and takes a lot of time.
I want to fly around with the orbit camera, save cam position and target to xml and feed those values into the camera. but how to convert from vector3 to langitude, longitude, length? Polar wont do the trick.
Interesting, I want to achieve exactly the same. I will try and work it out and will share any progress. I am using Dottores orbit cam with a 3dConnexion Space Mouse (which works amazingly well) and would love to save and restore the position.
you can find arcsin on the “function complex inverse” node.
ATAN2(y,x) returns the arc tangent of the two numbers x and y. It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result. The result is an angle expressed in radians.
Well, if you are using dottores cam, which I am with some modification, then its real easy. You just save the 4 values of target position, pitch, yaw and distance. Then you would feed the saved values into the marked switches which have the frame delay feedback loop and when you hit the switch the camera would jump to that position. Add a damper and you have smooth movements from one point to the next.
You can use the store node, or better yet if you want to store/read in XML use VL for that.
Hi,
for presets in general in big patches with many parameters this contribution is great Preset Recorder | vvvv. i used for camera presets too like this. save the presets in the iobox then disconnect the input and connect to the setmatrix
omg this contribution is so helpful, thanks a lot!
what worked best for me was decomposing (vector3D) the view transform and saving the position and rotation.
but I still can’t get my mind around on how to calculate the camera inputs from its outputs (position & interest). so any thoughts on that would be greatly appreciated =)
@schlonzo: I was looking for this for a while as well and have made this patch. It actually uses the polar node. Not sure why it was not working for you. And I’m not sure if this is a decent solution or e.g. if this can cause gimbal lock issues.