1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Moving textures

Discussion in 'Modeling & Animation' started by Ezekiel12, Mar 15, 2012.

  1. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,053
    Resources:
    0
    Resources:
    0
    I read the Animated Textures Tutorial but I still cant figure out how to do moving textures as I want.

    The problem starts here:
    Code (Text):
    100: { 0, 0, 0 }
    250: { 0, 0.8, 0 }
    251: { 0, -0.8, 0 }
    500: { 0, 0, 0 }
    Ok, the first number is the keyframe but what are the next three ones in brackets? I experimented a lot with it but couldnt get it to work on my model (basically just a flat rectangle on the x/y axis)

    Is there any indepth tutorial or can you explain me what the numbers mean? If possible for Rotation and Scaling too..
     
  2. Infrisios

    Infrisios

    Joined:
    Feb 21, 2005
    Messages:
    106
    Resources:
    7
    Models:
    7
    Resources:
    7
    They look like coordinates of some sort, but on the other hand they are called TVertexAnimation... which would require only two coordinates since you can only move in U/V direction, which is also what the first two values seem to do.
    I never used this a lot, all material animations I did so far were with nonstatic textures.
    Gonna try around a bit.

    Edit:
    The first number moves the texture in X(or U)-direction, the second number in Y(or V)-direction.
    They range from -1 to 1, so if you want to "slide" the whole texture through the geoset make a linear movement from -1 to 1, using the first number in the brackets for horizontal movement and the second for vertical movement.
    I tried around with the third one a bit, but I haven't seen any effect on the texture.

    Edit 2:
    A gif says more than a thousand words.
    The model is a simple rectangle with the ping circle texture centralized.
    (if anyone tells me how to do spoilers I'll use them, but right now they're not even 1MB together so I hope they aren't too annoying)

    [​IMG]

    [​IMG]


    If you put these:
    Code (Text):
    WrapWidth,
    WrapHeight,
    in the texture information, they fill empty space by repeating the texture.
     
    Last edited: Mar 16, 2012
  3. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,053
    Resources:
    0
    Resources:
    0
    Okay, thanks a lot. My test also didnt show any use of the third number in brackets.

    Do you have any information about rotation?
    The scheme for rotation is
    Code (Text):

    0: { 0, 0, 0, 0 }
    I tried looking into wc3 models but none seems to use this : (
     
  4. Infrisios

    Infrisios

    Joined:
    Feb 21, 2005
    Messages:
    106
    Resources:
    7
    Models:
    7
    Resources:
    7
    Yeah I spent a lot of time checking rotations, but I don't know much.
    I mostly edit them using trial-and-error, or using some templates I took out of WC3 models (for example a 360° rotation over time which I got from lightning shield.

    I am pretty sure that they use quaternions, but I fail to understand how they work.
     
  5. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,053
    Resources:
    0
    Resources:
    0
    Okay, I found this here:
    http://www.wc3c.net/showthread.php?t=79038

    I read it and tried a simple rotation as given there as example but my texture did not move a bit : (

    e:when you say you edit them using trial-and-error, can you give me an example that works? I need a very easy rotation..
     
    Last edited: Mar 16, 2012
  6. Infrisios

    Infrisios

    Joined:
    Feb 21, 2005
    Messages:
    106
    Resources:
    7
    Models:
    7
    Resources:
    7
    Well I just played around with values and checked what happened.
    It's actually not too difficult, once you got something moving into the right direction you can just decrease/increase the values until it fits.
    Should use linear interpolation for that, of course.

    One example would be a "Reaper's Scythe" swing I made:
    Code (Text):
    Rotation 7 {
            Linear,
            0: { 0, 0, 0, 1 },
            600: { -0.2, 0, -0.4, 1 },
            1200: { -0.4, -0.1, -0.8, 1 },
            1300: { 0, 0, -0.3, 1 },
            1400: { 0, 0, 0.1, 1 },
            1500: { 0.4, -0.1, 0.5, 1 },
            2000: { 0.4, -0.1, 0.5, 1 },
        }
    I planned how it should look like, i.e. where it should be at which time, started with the extreme positions like the starting point, the final haul-off-point etc. and interpolated a bit until I was content with it.

    Here's what I had in the end (only the scythe without proper materials here, not all the effects and transparency and stuff):
    [​IMG]
    (gif doesn't have many frames, looks quite smooth ingame or in the editor)

    Looks a bit weird now that I know what the values mean of course... had basically no idea what I was doing back then, as you can see when checking the 4th coordinate.
     
  7. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,053
    Resources:
    0
    Resources:
    0
    Ok thank you for the example.

    I know now why my rotation didnt work at all. Somehow the Texture animation Id which I can choose in the 'Material Manager' is never the same like the one in the 'Texture Animation Manager'.

    Do you know how I can fix this? I know how to convert to mdl and open it.
     
  8. Infrisios

    Infrisios

    Joined:
    Feb 21, 2005
    Messages:
    106
    Resources:
    7
    Models:
    7
    Resources:
    7
    Ummm don't know much about editing outside notepad, but it sounds like you assigned the wrong texture to the geoset.
     
  9. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,053
    Resources:
    0
    Resources:
    0
    Hm ok, could you explain what I have to do?

    Here my problem in detail:

    In 'Material Manager' in the only material I use I can choose as 'Animated Texture ID' the 'TextureAnimation 0165BB98'.

    But in the Texture Animation Manager' my actual animation is 'TextureAnimation 0166BB30'


    e: wait, what is this? All other example models I use which use translation as texture animation also have different IDs in those two places but work -.-....
     
    Last edited: Mar 21, 2012