Time context

 
 
 
Posted by:jcdeblok
Data created:17 October 2012

Lets say I need the velocity from the vertices.  I need to get their position for the current frame and the previous frame and subtract those..is there an easy way to get node data at different times then the current time?  (Entering 'time' doesn't yield any rusults)

Not at the moment but I think I have a good way of implementing it in one of the next few builds. Basically I want to allow graphs to take a function input where you can pass in time and it produces something (polygon mesh for mesh inputs, floating point for float controllers, etc.).

Marsel Khadiyev (Software Developer, EPHERE Inc.)

How about replicating contexts like we have them in 3ds Max?

So each node had a context in which it would evaluate it's values, the default being none?

Martin

Martin

 

Can you expand on that a bit? Specifically what does a context mean in this case?

Marsel Khadiyev (Software Developer, EPHERE Inc.)

In maxscript there is an 'at time' context so you do thing like this:

 

t=currentTime - 10f

at time t  ( oldpos= $nodeA.position )

nodeB.position= oldpos

(nodeB will chase nodeA with a 10 frame delay)

 

More context types: http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/files/GUID-E48C4EA4-E86B-424E-8AFF-19333049DA60.htm

 

Yeah, what Johan said. basically, it is like a scope that can be changed. When you query a value from the 3ds Max scene database, you can specify the context, e.g. the time along the timeline at which the parameter should be evaluated.

In the SDK, this can be seen when a Time value is passed - which does not have to be the current time:

void SampleProCtrl::GetValue(TimeValue t, void *ptr, Interval &valid, GetSetMethod method)

from
http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-A39314EC-15B4-4919-BB1B-318FFDC05DD8.htm,topicNumber=d30e4570

Martin

 

Martin

 

in the release note it says:

"time input is visible in the UI and pblock"

Where exactly can this be found?

The time input was previously visible in the UI/pblock, the new build actually removes it from there.

To add a time input, right click on the graph's internal inputs and you should see an "Add Scene Time Input" option. It'll only appear if time input wasn't added already.

Marsel Khadiyev (Software Developer, EPHERE Inc.)