EatTheFuture / camera_shakify

Other
1.11k stars 106 forks source link

Ability to pack/localize the shakes, to render on farm/another PC ect.. #27

Open loicbramoulle opened 6 months ago

loicbramoulle commented 6 months ago

Currently if we send a file on another computer or farm, if the addon isn't installed the shakes won't be there. Could be cool to have a button to pack or localize the actions that contains the shakes, as baking the camera animation is destructive and a bit of a pain to do back & forth as we tweak the files.

Griffynbraly commented 1 month ago

wait i had that issue were i couldnt see the shakes when i rendered the my aniamtion with shakfiy how do i fix it?

loicbramoulle commented 1 month ago

if you rnedered with another machine that's the issue, shakify isn't or can't be installed there, so you need to bake to action all your cameras, but then the shake is x2 on your PC and shown correctly on render machine that do'nt have the addon.

schroef commented 1 month ago

Cant you bake it, thats how its done i believe. Localize is for translation by the way

loicbramoulle commented 1 month ago

yea the only way currently is to bake, but that's very expenssive in time, and problematic as it's complex, you need to make sure your base action is set as fake user, properly named, otherwise you would lose it and have to restore it by appendign from a previous verison of the file, if you want to make any change to the shake, taht requires you to bake again ect..

Currently it's extremly simpler to actually extract the shakify data to blank actions, like baking a static camera anim with shakify, and then use the NLA to apply cleanly non-destructively these shakes however you want. But that defeats the purpose of shakify, as then you don't need the addon itself, just extracting the shakes to some action you store somehwere in your library to slap them cleanly on your cameras on any project. But that's the only clean way to have your shakify shakes work on render farms ect.. (because baking is way too slow and dirty.)

schroef commented 1 month ago

@loicbramoulle

I had a look at the addon. Never used it that much. But indeed i see what mean. Not even sure how we can bake this method into action. It used constraint and targets an empty which moves in huge numbers

Well you can duplicate the action, you should always make it fake no matter what.

You can indeed just "rip" the shake data. yet it uses all kinds of other settings as well to customize it further. Perhaps the addition of a bake tool in this addon is appreciated

We can easily make a custom bake function by the way. This will automate the process.

cessen commented 1 month ago

Sorry for the delayed response. Currently the only solution to this is, indeed, baking.

Packing the actions in the file won't fix the issue, because in fact they already are: the camera shake actions are created in the blend file when adding shakes. They aren't directly assigned to the camera, but they are in the blend file as just normal actions (not linked or anything like that). You can see them in the action selector in the action editor.

The actual reason the shakes don't work is because the setup relies on Camera Shakify's custom properties (namely, the list of shakes added to the camera), which don't exist without the addon being registered.

We could potentially work around this by automatically generating a Python file in the blend file, which auto-runs and registers those properties even when the addon isn't present.

schroef commented 1 month ago

But when you render you animation at a renderfarm, you also bake other stuff right. What is so difficult about baking this camera shake. I mean its not impossible.

I just tested it and its works fine, at least my simple test did, i used below settings. settings-to-bake camera

I made a test using a custom operator, which bakes using these settings. Bakes shakify into a new action with the wiggle

https://github.com/user-attachments/assets/c77ee6ff-2088-47f2-b8a8-80fb72019c1a

loicbramoulle commented 1 month ago

The issue is that sometimes it takes up to 10 minutes to bake one cam, because you have various things in your scene, and thousands of frames. And if you have 15 cameras then it can take an hour, and you still have to make sure that all your original camera actions are backed up as fake user, properly named, and you get 2X shake locally unless you set your shakes to zero, but then you do'nt know what were their value. it's basically a lot of potential sources of pain, either it just takes raw time, or just creates errors that you will need time to fix ect... (finding a camera action backup in an older file as you forgot fake user ect...)

Just my impression but if the shakes were applied via the NLA, it would all be blender vanilla by default, but maybe that's totally different than what shakify does currently.

schroef commented 1 month ago

Yeah 8 guess hea t scene will take time indeed. I just wonder if a render farm allows a user to run a script at runtime. That could fix the issue as @cessen suggested.

We could easily make the custom operator backup actions coree tly before baking. The settings I showed will bake everything properly and also clear the constraints, so you don't end up with double shake settings.

Ps isn't proper workflow to save a custom versions of your file file render and called perhaps _RENDER or _BAKED. That way you always have the original file.

The bake operator could also automatically go over all cameras with shakify active. Isn't that difficult to code