Page 1 of 1
constrain layer to camera
Posted: Sun Jun 11, 2023 11:21 am
by mattmos
Hey mohos,
is there a way to constrain a layer to the camera? I have an animated image seq which was rendered out from blender, and want to pin that layer to the camera so that i can animate the camera and match the movement (roughly) of the 3d camera.
Or would it be possible to import animation from a 3d camera into moho?
Cheers,
Matt
Re: constrain layer to camera
Posted: Sun Jun 11, 2023 12:29 pm
by Lukas
In the layer settings there is a checkbox to set a layer “immune to camera movements”. It has to be in the root of the document. So not in a group.
Re: constrain layer to camera
Posted: Sun Jun 11, 2023 12:33 pm
by mattmos
Ah brilliant, thank you so much!
One last question, is it possible to copy keyframes from a layer to a camera? I'm tryin in the motion graph but don't seem to be able to paste frames onto the camera channels, even after seperating into each axis.
Re: constrain layer to camera
Posted: Sun Jun 11, 2023 12:42 pm
by Lukas
You can only copy camera keys to the camera channels. If you want to do it any other way you need to use custom scripts.
Re: constrain layer to camera
Posted: Sun Jun 11, 2023 1:28 pm
by hayasidist
If you get to the point of wanting to script a solution, this (nearly 10 years old and untouched since) might at least steer.
https://www.mediafire.com/file/upewb49h ... 0.zip/file
It was originally designed to unload camera keys from one moho doc and load them into another; but native moho functionality took over (copy / paste between docs). However, it could form the basis of unloading from one group of channels to create a data file that could be loaded into the camera channels.
e,g. Export takes a "source" layer and creates its output file in which
translation becomes camera position
x/y rotation become tilt / pan
z rotation becomes roll
z scale becomes zoom
Then import works as before.
All, ofc, with updates to support whatever has changed in AS/Moho since then...
Re: constrain layer to camera
Posted: Sun Jun 11, 2023 3:57 pm
by mattmos
cool, thank you for the quick help.
And thanks for the script idea, I'll take a look but right now its probably just one shot that i need to replicate the movement so it might be overkill. Will save it for later though
