TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 24 of 24

Thread: TUTORIAL: Animated textures on objects

  1. #1
    Member
    Registered: Mar 2001
    Location: Ireland

    TUTORIAL: Animated textures on objects

    Using animated textures (for objects)
    Updated: 19 Jun 2006

    It is possible to animate any texture used in DromEd, be a terrain texture, interface image, bitmap particle effect, or custom object texture. This is done by creating each frame of the animation as seperate texture file and giving them all special names.

    The naming convention is as follows:
    The Dark Engine will animate any texture if the filename (in the .bin file for objects and meshes) ends with an underscore ("_"). It will animate it by cycling through all availiable images that have the same name, plus a number at the end. The extension of the files is ignored, so you can have .pcx and .gif frames as part of the same animation. These additional frames will not be loaded into the texture palette if you add the family that contains them to your mission.
    So, Test_.gif will be animated to Test_1.gif, Test_2.pcx, Test_3.gif, etc.
    Animated textures are looped, and also include the original filename (Test_.gif in this example) as the first frame.
    You can also use .tga textures in your animation, but since the Dark Engine's support for .tga images is somewhat temperamental, always save your work before attempting to do so.

    There are three limits:

    First, the texture names, including the _#, must be equal to or less than 8 characters plus extension. So, TestFile_1.gif will not be animated, but TestFi_1.gif will be.

    Second, every frame in the animation must use the exact same palette. (For a guide on creating common palettes using Bright, click here.

    Third, I think the maximum number of frames you can use in a single animation is 20 (*_ through *_19) - however, you could use a carefully timed Model tweq to overcome this limit.

    The rate (I haven't found a way to change it for objects yet) seems to be fixed at around 4fps.
    You can change the animation rate for brush textures by applying the Renderer->Texture Anim Data to the texture's entry in the textures section of the object hierarchy.

    Applying this property on any other type of object will crash DromEd.
    Last edited by Nameless_Voice; 19th Jun 2006 at 03:38.
    I colour the world with the hues of my madness.

  2. #2
    Member
    Registered: Jul 2003
    Location: United Kingdom
    Funny you should mention this, i was looking at that big object with the animating internals only a couple of days ago. Was it BigMotha or something? I noticed that line in the gif file but never thought that, that, was important to make it work.

  3. #3
    Vertical Contest Winner 2009
    Registered: Sep 2002
    Location: The Great White North
    just what i've been needing.

  4. #4
    ZylonBane
    Registered: Sep 2000
    Location: KC, KS, USA
    And (under SS2 anyway), there's a limit of 20 frames per texture -- *_ through *_19.

    You can extend an existing animated texture sequence, but you can't shorten one, because the internal filesystem will continue its search for the next texture into the CRFs.

    Actually I thought all this stuff was common knowledge over on the Thief side.

  5. #5
    Vertical Contest Winner 2009
    Registered: Sep 2002
    Location: The Great White North
    not a lot of call for things like animated computer screens over here, until my anachronistic project that is.

  6. #6
    Member
    Registered: Mar 2001
    Location: Ireland
    No, but animated textures have other uses. Such as robot boilers.

  7. #7
    Vertical Contest Winner 2009
    Registered: Sep 2002
    Location: The Great White North
    made three flat displays last night, they are very nice looking with animated data on them, also useful for moving gauges and dials, maybe other uses when i thing about it, object windows with moving silhouettes behind them. could be possible with some s+r to replace the standard window with the animated one when the guard inside passes by, thus displaying his movement past you through the window, sure a hole in the wall is well and good, but this is just a neat technical trick, and you can avoid the risk of too many polys looking out windows over a street.
    Last edited by Ottoj55; 19th Sep 2005 at 20:01.

  8. #8
    Member
    Registered: Jul 2003
    Location: United Kingdom
    When using an animated texture on a model, do you apply the first texture, example: clouds_1.gif or do you make another called clouds.gif and apply that one?

    BTW NV, did you figure out how to change the animation's rate?

  9. #9
    Member
    Registered: Mar 2001
    Location: Ireland
    You apply the one named Texture_.gif.

    * Edits first post regarding changing the rate*
    Last edited by Nameless_Voice; 19th Jun 2006 at 03:37.

  10. #10
    Member
    Registered: Jul 2003
    Location: United Kingdom
    Thanks.

  11. #11
    BANNED
    Registered: Oct 2005
    Location: The shadow
    Thanks for the info!

  12. #12
    Member
    Registered: Jun 2003
    Location: Sweden
    Sorry for the necromancy, but this doesnt work for me. For my new Eyeball plant i've made 4 different eye textures.

    First one is called eyeb_.dds, second is called eyeb_1.dds etc. It will only render the first frame so there's no animation. Any ideas?

  13. #13
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    What is the texture name on the object?

  14. #14
    Member
    Registered: Jun 2003
    Location: Sweden
    like i just wrote

    I've also tried eyeb.dds and eyeb_1.dds as the main texture.

  15. #15
    Summer Vacation Contest Winner 2010
    Registered: Sep 2003
    Location: PacificNorthWest...Near Forks
    Quote Originally Posted by vurt View Post
    like i just wrote

    I've also tried eyeb.dds and eyeb_1.dds as the main texture.
    The underscore_ should work fine. Did you keep the exact character count in the bin file when you named the textures? Did you change the .bin so that the extension was .dds ? Although in 1.19 .dds should get priority over the other formats.

  16. #16
    ZylonBane
    Registered: Sep 2000
    Location: KC, KS, USA
    What if you use GIF or PCX instead of DDS?

    If all else fails, you could use the material system to animate it instead.

    Wait... an animated eyeball?

  17. #17
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    You should be using eyeb_.dds (if dds is supported for object textures ... ). This is the CombatBot's model (robotcom) seen in a hex editor. You can see how it references the animated flame texture for the boiler's furnace as FURN_.gif. If you did not specify eyeb_.dds when you created the object in your 3d modeler (anim8or or blender or ...), that's your problem. If you did, try a gif format and see if that works. It may be that dds is not supported for object textures, or for object texture animations.

    AnimatedGif.png
    Last edited by LarryG; 17th Oct 2012 at 21:19.

  18. #18
    Member
    Registered: Jun 2003
    Location: Sweden
    Ah, i didnt think the naming inside blender mattered, i just named it to eyeb_.dds in 3dstobin. Now it works Thanks.

    ZB: yes i want to make it look even more freaky.. make the pupil move or expand or something. Ideas are welcome

  19. #19
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Suggestions:

    Blinking eye
    Pupil dilation
    Eyeball color change

    One thing that could be fun to do would be to use different models the way that the SecCamera2 does (5 different ones IIRC) using the script CameraAlert to change the security camera's light from inactive to active-green, -yellow, or -red according to whether it is turned on or off and what level of alert it is in. That way you could have the eyeballplant's eye color (and/or plant color) change based on whether or not Garrett was seen by it.

    Oh, and you can have different sounds based on alert level, so there could be a cricket sound for not alerted, silence for yellow alert, and an angry bee buzzing sound for red alert.

  20. #20
    Member
    Registered: Jun 2003
    Location: Sweden
    That would be a great feature, that would require scripting and stuff though, not my thing really. But yes pupil dilation, that's what i have now (really rough yet).

  21. #21
    ZylonBane
    Registered: Sep 2000
    Location: KC, KS, USA
    It occurs to me to try using the material UV offset functions to make the eyeball's apparent direction lazily wander about. I haven't gotten around to playing much with objects yet though, so it might not work that way. Mostly been messing with terrain textures.

    Mostly though, it seems that it would be tricky to make a looping animation of reasonable size that wouldn't look silly. Maybe something that actually almost makes biological sense, like pulsing veins or something like that.

  22. #22
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Quote Originally Posted by vurt View Post
    That would be a great feature, that would require scripting and stuff though, not my thing really. But yes pupil dilation, that's what i have now (really rough yet).
    No scripting. The script already exists. That's what I was saying, just duplicate the setup for SecCamera2 with your custom models and add the existing script and you are done.

  23. #23
    Member
    Registered: Jun 2003
    Location: Sweden
    Ok, i might take a look at that later on then because that would be pretty nice. For now the mod is just gonna be graphical tweaks.

    zb: the animations can be randomized though.. havent looked into that really yet. If every model acts the same way it's probably gonna look silly, or if lucky, freaky / scary-"hive mind"-behavior

  24. #24
    ZylonBane
    Registered: Sep 2000
    Location: KC, KS, USA
    Quote Originally Posted by LarryG View Post
    That way you could have the eyeballplant's eye color (and/or plant color) change based on whether or not Garrett was seen by it.
    That could potentially mislead players into thinking that it matters whether plants see them. They're just supposed to be a creepy environmental feature, not a gameplay element.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •