[SFxT] Working with Animated Textures

An archive of SFxT mods forum board. Original guide was made by bbbSFXT.

Uploader avatar
Submitted at February 24, 2021
[SFxT] Working with Animated Textures
[SFxT] Working with Animated Textures

This tutorial will be covering how to have animated textures. There are 3 different ways you can use animated textures that I am aware of. I will start with the most basic one.

Simple texture animation

To have a texture to just simply animate, open up an emm file with EMMedit.

Select the material you wish to have animated.

On that material, rename the shader to SpcMaskScrEmi_W

On the right where is says other parameters, replace all the text there with the following:

MatScale0X 0000000000000000 MatScale0Y 0000000000000000 MatScale0Z 0000000000000000 MatScale0W 0000000000000000 AlphaTest 0100010080000000 TexScrl0U 0000000000000000 TexScrl0V 0000000000000000 AlphaSortMask 0100010001000000 AlphaBlend 0100010001000000 AlphaBlendType 0100010000000000 BrushA 0000000000000040 BrushB 000000000000803F BrushC 0000000066662640 BrushD 000000000000C03F

Now this next step depends on what direction and what speed you want the texture to animate.

TexScrl0U 0000000000000000 is horizontal animation and TexScrl0V 0000000000000000 is vertical animation and having both together is diagonal animation

Keeping those parameters as is will not make the texture animate, you will have to adjust them depending on the speed you want. To change the speed, you must replace the last 2 0's with one of the following:

3A 3B 3C 3D 3E 3F 40 41

3A being the slowest and 3F being the fastest - NOTE: 3A and 3B are very slow speeds and is very hard to notice so you probably wouldn't want to have it any slower the 3C

So, for example, if I wanted the texture to move horizontally at the 4th speed setting, I would have TexScrl0U 000000000000003D in my parameters.

If you want a speed that is in between 2 of those settings, for example - you want it to be faster then 3C, but slower then 3D, then you must use the slower speed (3C in this case) and replace the 6 0's in front of that with the folowing code:

CDCC4C

which, in this example will make the parameter look like this - TexScrl0U 00000000CDCC4C3D

Now save your emm and check in game how it looks. best way to see is in character customization so you rotate the model and see it on all angles.

Note - TexScrl0U only moves left, TexScrl0V only moves down, and both together only move diagonally down left. If you wish for it to move in the oposite direction of one of those, you must rotate both your UV and texture by 180 degrees. There might be a way to simply do it by editting the text, but I have not discovered it.

Have a separate animated texture on top of another texture

To have a seperated animated texture on top of another texture, you must extract that object with EMGSWAPv3 and append that emg to you emo using that same tool.

Then open up your emo file in a hex editor and scroll all the way to the bottom and click on the last character in the file. then hit ctrl F and type the name of the object that you have appended and select Backward for search direction (this is so that you find the new appended object, and not your original). Then rename that object to what ever you want(I like to simply replace the last letter with an a to let me know its the animated one). Save and close the hex editor.

Now after that, you must add new textures to the emb file and reference your new appended object using DDSREFEDIT to the new textures.

Now open up your new texture in photoshop and go into the alpha layer and make it all black and then paint whatever pattern you want animating ontop of your object in white. (make sure no white touches the border or else you will have cut off textures.)

After that is complete, inject that texture back into your emb file and check it out ingame.

Animate along a specific path

Now if you want something to animate in a specif path like pacman on mokujins back, you must have a plane cropped to the shape of the path you want like this example - after you have created your path plane, you must edit your UV so its in a straight line like this - After you have done that, make sure the texture you want going along the path is somewhere in that line.

Since your UV is now a straight line, despite what ever shape your plane is, your texture will have no choice but to follow that path.

Those are the 3 ways of texture animating that I am aware of. There is one more thing to note about this. Animated textures are not colour customizable, however if you want the player 1 and player 2 colours of them to be different it is possible.

Now normally if we wanted to have to seperate colours for something uncustomizable, we would have to use the double model with full alpha channel trick, however most likely you will be using your alpha texture for your animation so this method is no longer possible. but no worries, I accidently discoved how to solve this issue.

Making player 2 colour

You will still have to make the duplicate object with different name, but the different step for this would be having your emm for player 1 have its TexScrl0U or TexScrl0V code on the duplicated object to have it display the following

TexScrl0U 00000000000000CC

or

TexScrl0V 00000000000000CC

Once that is done, open up the animated texture in photoshop and add a thin black bar on top of the alpha channel like so - if a texture already has alpha in it, leave it all as is and add the black bar, the other alpha wont cause any issues if the texture is already black in top of the alpha, then its already fine and nothing needs to be added.