Jump to: Board index » General » Fusion

How can I use 'math.random' only for special keyframe?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

ilia_t

  • Posts: 22
  • Joined: Mon Apr 04, 2022 7:52 am
  • Location: Vladivostok
  • Real Name: Ilia Tishkin

How can I use 'math.random' only for special keyframe?

PostTue Sep 20, 2022 7:43 am

I want to create random camera movement animation, using CornerPositioner. Can someone help me?

Screenshot 2022-09-20 174222.jpg
Screenshot 2022-09-20 174222.jpg (34.41 KiB) Viewed 520 times
Offline

Sander de Regt

  • Posts: 3500
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: How can I use 'math.random' only for special keyframe?

PostTue Sep 20, 2022 9:17 am

What part isn't working for you? I'm not sure I understand the question.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

ilia_t

  • Posts: 22
  • Joined: Mon Apr 04, 2022 7:52 am
  • Location: Vladivostok
  • Real Name: Ilia Tishkin

Re: How can I use 'math.random' only for special keyframe?

PostWed Sep 21, 2022 2:17 am

Sander de Regt wrote:What part isn't working for you? I'm not sure I understand the question.

I want to create two keyframes. The first is on 0 frame and the second on 100 frame. I want to get random values of these keyframes and transpolation between them.

So each time when I play the video I'll get random camera movement.
Offline

John Holt

  • Posts: 197
  • Joined: Sat Mar 02, 2019 8:54 pm
  • Real Name: John Holt

Re: How can I use 'math.random' only for special keyframe?

PostWed Sep 21, 2022 4:50 am

Hello

If you need the same sequence when you call math.random(), then you must set math.randomseed(same number every time before calling) before calling math.random().

If you want a different sequence of random numbers, then pass math.randomseed(os.time()) before calling math.random() because os.time() will return the time in number of seconds so it will be different every time.

John
Windows 10 Pro
AMD Ryzen 5 3600 6-Core Processor 3.60 GHz
64GB RAM
GTX1650 4GB :(
Samsung SSD 970 EVO Plus 1TB 1000.2 GB
Dual Monitors 32" & 27" Samsung
BM Multidock
Speed Editor
DR Studio Latest Version Fusion Studio Latest Version

Return to Fusion

Who is online

Users browsing this forum: No registered users and 57 guests