Загрузка видео...

Не удалось загрузить видео

На главную

Did you know that in Blender you can easily animate oscillating objects with a single driver expression? ✨ 1. Select your object 2. In its rotation write: "# sin(frame / 300 * pi * 2 * 3) * 0.5" where 3 is the number of swings it does, and...

296,083 просмотров • 3 лет назад •via X (Twitter)

Комментарии: 11

Фото профиля passivestar
passivestar2 лет назад

wait I can repost old stuff and still get likes? 😳

Фото профиля Quackers
Quackers3 лет назад

Great tip! Another thing you might want to know is that "2 * pi" is a value that pops up quite often in formulas that there's a name for it. It's called "tau", and Blender actually recognizes it as a constant, which is pretty sweet as it makes a lot of expressions simpler.

Фото профиля passivestar
passivestar3 лет назад

yeah I checked and tau actually works, good catch! 👍

Фото профиля SMOUSE 🔸
SMOUSE 🔸3 лет назад

I'm relatively new to drivers... Sin(frame/15.9)*0.5 gives the exact same result. Are the extra variables just for human readability and control?

Фото профиля passivestar
passivestar3 лет назад

yes, exactly! those kind of micro-optimizations aren't relevant even in realtime code anymore (like gamedev), let alone blender driver expressions that only run once per frame. compilers are smart enough to do those optimizations for you in most cases anyways

Фото профиля Bleddy
Bleddy3 лет назад

Oi! Blender is hard enough already! No need to throw math in there as well.

Фото профиля passivestar
passivestar3 лет назад

😅

Фото профиля Carlos Barreto
Carlos Barreto3 лет назад

Great tip. You are not passive star, you are active for sure, so many tips 😍

Фото профиля passivestar
passivestar3 лет назад

Thanks 😅

Фото профиля kureii
kureii3 лет назад

For optimization, you should simplify your formula: frame /300 * pi *3 * 2 can be simplified to frame/50 * pi. This will remove 2 multiplications from what the CPU has to do per frame.

Фото профиля passivestar
passivestar3 лет назад

No need to, python precalculates those for you

Похожие видео