Animated Textures on Indie version

Hi, as the title says, im just wondering if animated textures work on Indie Verison of Unity because i’ve tried using them and i havent been able to get’em to work. Maybe theres something wrong in what i’m doing in order to get animated textures.

Im not getting any error message, its just that the video file iim using to create the animated texture freezes at the first frame and stays as a regular texture…
This is what im doing:

1.-Get a video file (i’ve tried “.mov” , “.avi”, “.ogg”, and “.mpeg”)
2.-Import it (or Drag) to “my project” folder
3.-Create a plane
4.-Create a new texture
5.-Assign the texture to the plane
6.-Drag the video file to the new texture
7.-Create a new script and type:
Function Update()
{ renderer.material.mainTexture.Play(); }
8.-attach that code to the plane

and that must do the work… but it doesnt… it never plays…
Not even if i select the “loop” checkbox in the video preferences…

What am i doing wrong.?? does it even work with indie??
Thanks!

Videos do not work with Unity Indie. However for animated textures there are workarounds such as this technique:

Or alternatively you can write a routine that instead of animating a tiled texture, it flips through a series of separate textures instead. Both will work out great, the hardest part will be synch’ing any audio you might want to go along with it.

Thank you guys for the quick response, Both where really helpfull :smile: i appreciate it!.

Im scripting an offset routine for a tiled image.
Then ill try higgins way and see which one i managed to get working nice :smile:

Thanks again!

I have recently used this script aNTeNNa trEE Linked to and it worked quite well!

Just another hint for everyone who wants to use this: With Adobe Photoshop you can automatically put all images inside a selected folder or all opened documents into one single image… The function is called “Contact Sheet II” and is located in the “File” Menu. The only thing you have to do is calculate how big the final image has to be…

I have attached a Screenshot where you can see, what I have done with the other options (Sorry for the German screenshot, but I think the Layout is likely the same in other languages).
In this Screenshot my Image was 256x256 and I had an overall frame count of 42 Images, all located in the same folder. The width ist simply 256*42 wich makes 10752. The height is 256+2 because else Photoshop would have resized my image to 254x254 each frame. On the right side you can see what your image size will be in the final image.

After waiting several seconds until Phoposhop has finished merging, you have to correct 2 errors with the borders.

  1. You have to change the Canvas Size. If you put all images in one row, like me, you have to remove the top and bottom pixel rows, wich is simply changing the height from e.g. 258 to 256 while keeping the image in the center.

2.a Move everything one pixel to the left by dragging the pixel content
or
2.b Subtract one from the Canvas width while keeping the image on the right side, then adding one to the canvas size while keeping the image on the left side.

I hope that you all understand what I was trying to describe… If not, just ask and I’ll do my very best to help you.

At last one thing for our German speaking users or users with a german Photoshop-installation:
Die Funktion “Contact Sheet II” heißt in der Deutschen Photoshop-Version “Kontaktabzug II” und befindet sich im “Datei”-Menü, Canvas Size ist die Arbeitsflächengröße und ist (zumindest in Photoshop Elements) zu finden unter Bild->Skalieren->Arbeitsfläche…

One very last thing:
If the quality comes out too bad, like ist was with my “Animation”, it helps to increase the “Max Texture Size” in the Asset importer of the Texture file, and/or incresing the Anisoptric Filter mode to Bi- or Trilinear…

if you use this code:

function Update () {
     render......Play();
}

then it will restart the video playing process every frame. In other words, you will not see it ever playing. Same goes for the Audio.Play() command…