Problem with the turntable animation script

Forums: Problem with the turntable animation script
Forum for OctaneRender Lua scripting examples, discussion and support.

Problem with the turntable animation script

Postby grimm » Mon Dec 08, 2014 2:56 am

grimm Mon Dec 08, 2014 2:56 am
This is about the official one, not the one I did. :D It looks like the script is calculating the time incorrectly. I was testing it with my animated texture script and the texture rendered out 4 times too slow. I think that the number of frames per second is getting swapped with the number of frames in the animation. Which in my case I set to 100, which looks like the turntable script was taking it as 100 frames per second. I had set all the settings to 24 frames per second in the Alembic file, my animated texture script, and the turntable script. These two lines (483 and 486) look suspicious to me (I was wondering why number of frames was defaulting to 25). ;)

Code: Select all
        -- update the time for the next frame
        currentTime = frame * (1 / nbFrames)

        -- update the progress bar
        progressBar.progress = frame / nbFrames


Jason
Linux Mint 20 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 460.56
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1321
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Problem with the turntable animation script

Postby stratified » Thu Dec 11, 2014 10:22 pm

stratified Thu Dec 11, 2014 10:22 pm
Hey Jason,

I played around with the turntable animation here but I don't see anything wrong. Can you post a .orbx file which I can use to reproduce this. Are you using the exact frame rate everywhere (script, texture animation & abc file)?

cheers,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Problem with the turntable animation script

Postby grimm » Mon Dec 15, 2014 1:19 am

grimm Mon Dec 15, 2014 1:19 am
Hi Thomas,

Did my PM make sense? Do you need anything more? Thanks, :)

Jason
Linux Mint 20 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 460.56
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1321
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Problem with the turntable animation script

Postby stratified » Mon Dec 15, 2014 9:51 pm

stratified Mon Dec 15, 2014 9:51 pm
Hi Jason,

Yep, what you said makes total sense.

The turntable and daylight animation work correctly but the problem is they configure their animators over a normalized time interval (time in [0,1]). This means they calculate their own frame rate ignoring the one configured in the project. And that's the reason why they don't play nice with your script. Your script makes the (reasonable) assumption that the frame rate is respected but then all of the sudden something is updating the time in way smaller increments than the agreed frame rate dictates.

Attached are updated versions of both daylight and turntable scripts. They will also ship in the next release.

turntable-animation.lua
(19.24 KiB) Downloaded 309 times

daylight-animation.lua
(17.9 KiB) Downloaded 307 times


thanks,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Problem with the turntable animation script

Postby grimm » Mon Dec 15, 2014 11:53 pm

grimm Mon Dec 15, 2014 11:53 pm
Cool, thanks Thomas. :)
Linux Mint 20 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 460.56
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1321
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 12 guests

Thu Apr 18, 2024 3:11 pm [ UTC ]