Get values from a different frame than the current one. Is that possible?

As the title says: Is it possible to get values from a different frame than the current one? For example get the position of two objects to calculate the distance between it in the frame before the current one?
 
Would it be a bad idea to evaluate every frame in the scene to search for a specific condition like some specific distance between two vectors? I want to detect when something happens for the first time, so i figured this would be easy if you do a f10 render but if you do a LWSN render you have to check the whole sequence every time. How would you do this?
 

Prince Charming

New member
Would it be a bad idea to evaluate every frame in the scene to search for a specific condition like some specific distance between two vectors? I want to detect when something happens for the first time, so i figured this would be easy if you do a f10 render but if you do a LWSN render you have to check the whole sequence every time. How would you do this?

What are you trying to do exactly? There may be nodal way to do it...
It sounds like you want to detect when something goes over a certain speed for the first time? That is doable with nodes in a few ways...
 
I'm trying to create a "trigger" node because I'm trying to learn how to program in c++. But the idea to create a trigger node came from a visual effect shot I'm working on. I'm creating a bullet time effect like in the matrix but cool. There's a women with a high pressure cleaner shooting a man. I made air objects that warp the space around the water beam.(Lens shaped objects with a dielectric shader) I made one mesh and baked the animation of the wave that's on this air object to an mdd. I wanted to automate timing so the mdd files get "triggered" by the object when it is in a certain range, so I don't have to move all those separate objects manually every time the timing of the beam changes. I actually figured out a nodal way. Check the Screenshot.
How would you do it?

TriggeredMDDs.PNG
 
Last edited:

Prince Charming

New member
I'm trying to create a "trigger" node because I'm trying to learn how to program in c++. But the idea to create a trigger node came from a visual effect shot I'm working on. I'm creating a bullet time effect like in the matrix but cool. There's a women with a high pressure cleaner shooting a man. I made air objects that warp the space around the water beam.(Lens shaped objects with a dielectric shader) I made one mesh and baked the animation of the wave that's on this air object to an mdd. I wanted to automate timing so the mdd files get "triggered" by the object when it is in a certain range, so I don't have to move all those separate objects manually every time the timing of the beam changes. I actually figured out a nodal way. Check the Screenshot.
How would you do it?

View attachment 135405

Ah, yes, the allusive trigger. I have been wanting that as well for about 10 years now... So please continue with your learning of programming ;)
As far as a nodal version you are on the right track. The only problem with using distance is that its not really a trigger, it can be used in some cases though. If you want an actual trigger (a way to store a variable after a condition is met and keep it like that no matter what the distance is after)... One way is to use points to store a state, and reference those points for your values instead of the distance. I have been working on this very thing myself the past few days.

This thread shows the basics of how a trigger can be made. There is a better way to go about it that I have found using points and hard fx. I will put together a file that gives a better example to what you are trying to do.
http://forums.newtek.com/showthread.php?151518-Ratcheting-animation&highlight=ratchet
 
When I try to pass a value to an output I created LW crashes.
What's wrong with this?

outputfuncs->setValue( Value, final_color );
outputfuncs->setValue( Value, triggeredv);
 
Could someone explain to me how to debug a .p plugin? How do I start the debugger? Can I start the same one somehow you get with LScript, or do I need to connect the Lightwave exe in visual studio or something?
 
Last edited:
Top Bottom