Christine Tang
Forum Replies Created
-
It opens within seconds but for some reason it renders out in After Effects fine but when I try to render it out in Media Encoder, my trains with the code on it is missing but my backgrounds and other layers are rendering fine.
Any reason why it doesn’t work in media encoder?
-
Thank you Filip,
I’ve spent the last day working with your file and it works extremely well! Your explanations make it easy to understand with my little knowledge of expressions, thank you.
I ran into the same problem you mentioned with dataValue(), it renders faster but in that it slows after effects down extremely. Your work around is much better!
This final tip I will explore today as that was something I was struggling with. My .csv’s take hours to import and when I close my after effects and re-open my file it takes hours to open as well.
I’ll edit this text blurb to let you know if all is successful but once again I appreciate your time guiding me through this! Thank you so much.
-
Thank you, please go into detail as I had help coming to my current expression…
Here is the file. If I had help starting it off for the X axis I can continue and adapt the expression to my Y and Rotational axis. I use POINT_X_0 and POINT_Y_0 for one train and POINT_X_1 and POINT_Y_1 another train. In the example earlier “ML1_X” is the same as “POINT_X_0” in my document, I just renamed it for my clarity.
My goal is to plot pos X and pos Y from my data set to animate a Train moving by each frame. You mentioned the linear() might not needed, if there are better ways to approach this and make after effects less laggy, please let me know.
Apologies for my lack of expression knowledge. I am new to learning expressions. I took a look at your thread you linked and tried out footage() but did not figure out how to adapt it to work like my original expression did.
-
Data needs to stay live as it would constantly be changed/edited unfortunately..
-
My columns show, OBJECTID, POS X, POS Y, Rotational Angle, per object I am animating through the .csv. There’s roughly 50 objects with 3 values each. OBJECTID is a time value per frame.
How do I then change my code I posted earlier:
myData = thisComp.layer(“CompiledTrainsReduced2.csv”)(“Data”)(“Outline”);
i= timeToFrames(time);
if( i > 0 && i < myData(“OBJECTID”).numProperties-1)
{
initTime = myData(“OBJECTID”)(“OBJECTID ” + (i-1)).value;
endTime = myData(“OBJECTID”)(“OBJECTID ” + i).value;
initPosition = eval(myData(“ML1_X”)(“ML1_X “+(i-1)).value);
endPosition = eval(myData(“ML1_X”)(“ML1_X “+(i)).value);
linear(time,initTime,endTime,initPosition,endPosition)/7.9
}ML1_X is my data set’s position X. And this expression is plugged into my layer, position x.
Using your footage code, I am trying to grab the data value from POS X to link to Position X in my layer and have it play by frame by frame by OBJECTID (which is time in my document).
-
Thank you Andrei, everything worked perfectly! I appreciate you taking your time out to help me out.
-
I have data of Time and KMpoint. KM starts from 105769 to 120458 with stops in-between. I was wondering if it was possible to animate this on a path and have my .CSV provide the points in-between.
I tried using a Trim Path but trim path’s work by percentage so I couldn’t do that.
I was wondering if there’s a way to create a path and my train image can be attached and travels along the path by my .csv data.—
This is my alternative attempt to accomplish the same thing:
I tried your other method above, where I had Times, PositionX, and PositionY. I separated my position coordinate and had the expression:myData = thisComp.layer(“PositionXPositionY.csv”)(“Data”)(“Outline”);
i=1;
while(myData(“Times”)(“Times “+i).value < time && i < myData(“Times”).numProperties-1) i++initTime = myData(“Times”)(“Times ” + (i-1)).value;
endTime = myData(“Times”)(“Times ” + i).value;
initPosition = eval(myData(“PositionX”)(“PositionX “+(i-1)).value);
endPosition = eval(myData(“PositionX”)(“PositionX “+(i)).value);linear(time,initTime,endTime,initPosition,endPosition)
Problem with this method is my PostionX and PositionY coordinates are extremely large values like, 1,000,000. This expression is for the screen aspect ratio, 1080p for me so it would not work unless I increase my ratio to the same size.
I was wondering if you had a solution to any of these scenarios? My intention is to have an animation of my train following my .csv position points accurately. I have tried 2 alternatives to make this work but I don’t know which would be better.
Thank you.
-
Hi Andrei,
Do you know how you would get this to work on a path? To keep receiving data from a .csv but also for the animation to stay within the path or keep it within a maximum or minimum so it cannot stray away from the path outline?
I am trying to animation a train with data from a .csv as accurately.
Thank you.
