So I have a file containing a list of frames to animate a texture and reading that file is no problem, buthow to add that animation frames to a textureß
Forum topic · General Scripting
How to animate texture in maxscript?
By gtafan · 2017-09-18
Forum topic · General Scripting
By gtafan · 2017-09-18
So I have a file containing a list of frames to animate a texture and reading that file is no problem, buthow to add that animation frames to a textureß
Comments (9)
Comment policy
.
With animate on
You can use
with animate on
(
at time frame expression
)
for eg:
meditmaterials[1]=noise()
with animate on
(
at time 1 meditmaterials[1].phase=0
at time 100 meditmaterials[1].phase=50
)
Hope that helps
My fault, have not really good specified what I want. I have an array of frames:
frames=#()
and every element of that array look like this:
frame=#(time, uOffset, vOffset, wRotation)
Now I want to add all the frames from that array to the map. That stuff about animate on I know and I need a for loop to go through the array and to do something like:
at time frames[i][1]...
but thats all I know.
.
here's the bitmaptexture example since you didn't specify what type of map you try to animate
Don´t really know any other maps than bitamaps, so for me it´s more or les the same. So thanks, it looks like exactly what I need. However have some questions:
1. Would it worck with a custom bitmap? I mean own plugin having bitmap as superklass.
2. Is the way to write the frames later back to the array also as simple?
.
1. It depends. But it will work for any map that has Coords property that is StandardUVGen class.
2. Example below assumes that all of the properties has equal keys count and are animated at same time.
Thanks again. At least for the stuff imported with your previous script properties should always have equal keys count, or am I wrong? Is there really cases, when properties don´t have equal keys count?
.
Yes, in your case all the properties will have equal keys count. But in general there could be any arbitrary or zero keys for for the property you may wish to export.
What you mean with zero keys? Values of 0 or just undefined?