AWS Thinkbox Discussion Forums

Xmesh Wiring

Hello all,

This is more of a max script question but I thought I would get a better answer here. It seems quite simple but I am having difficulties as newbie to maxscript.Basically I am trying to create a pulsing effect and I want to use the value of the playbackgraph to scale up another object (a sphere), but with a delay of x frames.

so far I tried
assign a scale script controller to the sphere.
Create a variable called “linkobj”
do a assign node to the xmesh object
and then use this code
at time (currenttime - 5f) (linkobj.position)

(linkobj.position) this i know is wrong but I dont know what the right function? is.

I also tried using a wire parameters which works but I read that you cannot do a time/frame offset with wire expressions.

Thanks

I don’t understand completely.
The PlaybackGraph is just a controller that defined what frame to load at the current time. So it remaps time. How do you want to convert that to a Scale?
You could for example divide the value of the PlaybackGraph controller by the current time. If they are equal, you will get 1.0 and you could use it as 100% scaling. If the PlaybackGraph is greater than the current time, you would get a value > 1.0, if it is less, you would get less than 1.0.

But I am really not sure what you expect to see. Can you describe it with simple sentences? Remember, the XMesh mesh is not moving in world space, its vertices are loaded at different locations. So reading the Position makes no sense (but you already know that).

Hi Bobo,

I just wanted to use the value of the playbackgraph to drive another objects scale. So when the playback graph is at 10 the scale will be at 10 and so forth but with a delay in the time. so if the playback graph is 10 then after 2 frames the scale will be 10.Hope thats clearer.

Makes little sense to me. Why would you like to do that? PlaybackGraph is a time track describing what frame to load. Scale is something else entirely.

But anyway, the simplest way to do this would be to:
*Assign a Scale Script Controller to the Scale track of the object
*Open the Controller’s Properties
*Create a Graph variable
*Assign Track, pick the PlaybackGraph controller of the PRT Loader
*Enter a Tick Offset representing the frames you want to read ahead or back. At 30 fps, one frame is 160 ticks, so -320 will assign the PlaybackGraph value 2 frames later.
*Change the Expression to [1,1,1]*Graph and press Evaluate.
Of course, if you want a PlaybackGraph value of 100 to produce a scale of 1.0, you can divide the Graph by 100.0…

Once again, this is a general approach and to me it makes no sense whatsoever to connect a PlaybackGraph frame to the scale of something, but since you asked… :wink:

HI

Yes I can see why it would not make sense but if you watch the video it will make more sense. :smiley:. The white line going across the neuron is an xmesh. It is two slice modifiers cutting through a copy of the neuron geo. There will be a new of these lines going across the neuron. When they reach the end the then the spheres need to starting growing in sequence one after the other. I am trying to automate the process so that I can just control the xmesh and the spheres will follow.

Thanks for the info I managed to get it to work, but I am having a problem when I loop the xmesh. If you watch the pulse_loop.avi (2.95 MB) video you see the spheres are already there at the first frame. If I remove the Tick offset I can get rid of this issue but then I am stuck with the problem of offsetting the spheres growing.
pulse_no_loop.avi (2.98 MB)

Privacy | Site terms | Cookie preferences