Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Net Render Callback - Getting currentTime
  RSS 2.0 ATOM  

Net Render Callback - Getting currentTime
Rate this thread
 
63550
 
Permlink of this thread  
avatar
  • Total Posts: 573
  • Joined: 12 April 2007 08:40 PM

I have a script that changes the text in a Text Object every frame. Since I can’t keyframe that text in Max I have to set it in a preRender callback. I get the callback to work but the currentTime doesn’t seem to be correct.

This is the callback code I began testing with

tNum currentTime as integer --(frm as integer)
dNum =  (tNum - (24 200)) /200
dNum 
dNum 3.66 
if dNum 131 then dNum 132.0 
dNum 
dNum as integer
$'Count132'.text dNum as string

This works but I have to run it locally as a render loop on one machine

dNum =  (tNum - (60 200)) /200
dNum 
dNum 11.5 
if dNum 344 then dNum 345.0
dNum 
dNum as integer
$'Count345'.text dNum as string
actualFrm  
tNum 200
oFile 
"\\\\bomber\\out\\driving\\stopping_distance\\secondCount" + (actualFrm as string) + ".tga"
render progressBar:true frame:frm vfb:false outputfile:oFile

So basically I am looking to get the current Frame being rendered during a net render on all machines.

Thanks..



Replies: 2
/img/forum/dark/default_avatar.png
currentTime.frame -- ?

<
time>.ticks -- Time as ticks
<time>.frame -- Time as frames
Author: Anubis

Replied: 14 January 2012 10:26 AM  
/userdata/avatar/baadwq4zg_robot_100.jpg

Thanks Anubis..

The docs say “If a render is being performed, currentTime contains the frame being rendered. “

I was using “currentTime” which worked locally. I will try currentTime.frame and see if that is updated correctly during a render..

Author: jona vark

Replied: 14 January 2012 11:09 AM