Animated Texture Flag (explained better)

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Animated Texture Flag (explained better)

Post by FragMe! »

Decided to play around with the animated texture flag (7). Despite the name it is not for making flip book animations that you can put on a screen and watch a stick figure jump up and down.
Rather it is a different kind of scolling texture function. It will move the texture by a factor set in data0 and at a rate set by data1. Important to note data0 must be at least 4, not totally sure why but any less and it won't do anything and if it is 0 it crashed the game with a windows error.

In the example video (sorry for choppiness) the first model is a landing pad I had made using scrolling texture, the next version is using the animated flag with a data0 = 80 and a data1 = 6
the box in the middle is using the same numbers and is there to show what is really happening to the texture.

Now what is it good for? Well you can make colorful changing lights on a console, I believe the hoth_prop_command_console_a and _c use this flag.

But now here is the video.

Image
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Animated Texture Flag

Post by mswf »

That looks pretty sweet!
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Animated Texture Flag (explained sort of)

Post by DarthD.U.C.K. »

it CAN be used to make something like a flipbook anim and is good for many things like animted fire without using an effect- if you set the texture up correctly (its the same texture-anim-system as in other games)
it will jump from one picture to another, like a gif
the textures just have to be set up like this:
Image
(from the common effects)
The Docs wrote:Animated
This render type is used for animated textures. All the frames must be on the same texture. Your UV’s should be mapped to the first cell (not the entire texture). Each individual cell is always square and is determined automatically from the number of frames. The number of frames must be a perfect square (ie. 1,2,9,16,25,36…).
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Animated Texture Flag (explained better)

Post by FragMe! »

Ah yes you are indeed correct my friend. And so l couldn't resist making one.

Image

Forgive my ego there.

Some factual bits now, your animation sequence should go from top right to bottom left.
The animation must contain a minimum of 4 frames, therefore the minimum number that can go in data0 is 4. Now your animation shouldn't have to be created using a factor of 4 but I think it is just easier if you do so.
For example
1 2
3 4
or
1 2 3 4
5 6 7 8
etc

Animation speed is still determined by data1.
This should be able to be hex-edited into a msh for those that do not use the Pandemic exporter as it would be the same as adding in a scrolling texture.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Animated Texture Flag (explained better)

Post by AceMastermind »

FragMe! wrote:...I believe the hoth_prop_command_console_a and _c use this flag.
Neither of those msh files use the animated flag, they use the normal scroll flag (3).

hoth_prop_command_console_a.msh
  • Material0 - 00 00 00 00
    Material1 - 14 00 00 00
    Scene_Material0 - 00 00 00 00
    Material3 - 05 03 7f 00
    Material5 - 01 03 0f 00
    Material7 - 01 03 0d 00
    Material9 - 01 03 f5 00
    Material11 - 01 03 06 00
    Material13 - 01 03 f1 00
    Material15 - 01 03 10 00
    Material17 - 01 03 f9 00
    Material19 - 01 03 0a 00
    Material21 - 01 03 09 00
    Material23 - 01 03 f8 00
    Material25 - 01 03 0c 00
    Material29 - 01 03 19 00
hoth_prop_command_console_c.msh
  • Material0 - 00 00 00 00
    Material1 - 14 00 00 00
    Material2 - 00 00 00 00
    Material4 - 04 00 00 00
    Scene_Material0 - 00 00 00 00
    Material13 - 05 03 7f 00
    Material14 - 05 03 33 00
    Material15 - 05 03 4d 00
    Material20 - 05 03 2b 00
    Material21 - 05 03 52 00
    Material23 - 09 03 1c 00
    Material25 - 09 03 27 00
    Material33 - 09 03 24 00
    Material35 - 01 03 05 00
    Material37 - 01 03 f9 00
    Material39 - 01 03 0c 00
    Material41 - 01 03 f5 00
    Material43 - 01 03 06 00
    Material45 - 01 03 0a 00
    Material47 - 01 03 09 00


I have yet to find a msh that uses this animated flag (7) but there has to be at least one in the assets. If anyone comes across one that uses this flag then let us know so it can be documented as a shipped example.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Animated Texture Flag (explained better)

Post by FragMe! »

I think it is a bit more than a scroll but whatever.
Did find another animated texture but still no msh that uses it.

But I did look at the mesh for the thing I made and for settings of flag 7 data0 = 16 and data1 = 2 here is what follows the hbatrb
0400 0000 0007 1002

Hope that helps anyone who likes to hexedit (note I did remove the transparency setting of 2 I had but with it in the numbers would be 0400 0000 0807 1002)
Post Reply