Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • drubrkletern: be honest with me boss
      December 06, 2019, 01:31:52 AM
    • drubrkletern: now is it really that unique
      December 06, 2019, 01:31:47 AM
    • SuperNativeZ: COME PLAY THE MOST UNIQUE CUSTOM RSPS #1 [link][link][link]
      December 05, 2019, 09:22:55 PM
    • SuperNativeZ: FASTEST GROWING #1 UNIQUE CUSTOM RSPS [link][link][link]
      December 05, 2019, 09:22:42 PM
    • ragnoroker: New Server - Unique - Awesome Community - Start your adventure - 60+ online : [link]
      December 05, 2019, 02:48:39 PM
    • ragnoroker: New Server - Unique - Awesome Community - Start your adventure - 40+ online : [link]
      December 05, 2019, 02:48:31 PM
    • Cole1497: you click any of these links? those boner pills theyre selling are wicked
      December 04, 2019, 05:58:03 PM
    • Cole1497: oh shit vain whats crackin
      December 04, 2019, 05:57:49 PM
    • ArtexAdv: FASTEST GROWING #1 UNIQUE CUSTOM RSPS [link]
      December 04, 2019, 06:30:27 AM
    • Vain_: where the boys at
      December 01, 2019, 03:20:36 PM
    • black evil111: They should close this down, mostly the downloads section. The mods dont know how to do their jobs worth shit and its no excuse like "we have real life stuff going on" everyones replacable. Speaking of replacable, fix download links! Before I go to rune-server.
      December 01, 2019, 01:50:26 PM
    • ragnoroker: New Server - Unique - Awesome Community - Start your adventure - 40+ online : [link]
      November 28, 2019, 12:41:24 PM
    • ragnoroker: New Server - Unique - Awesome Community - Start your adventure - 40+ online : [link]
      November 28, 2019, 12:40:42 PM
    • 1strangler77: how do i post pictures on a post
      November 24, 2019, 05:16:18 PM
    • ragnoroker: New Server - Unique - Awesome Community - Start your adventure - 40+ online : [link]
      November 23, 2019, 08:23:51 PM
    • Freja1793: Hi
      November 22, 2019, 07:58:41 PM
    • xdarklordxx: JOIN NOW [link]
      November 22, 2019, 03:19:16 PM
    • xdarklordxx: RUNITY IS BACK AND BETTER THAN EVER VERY NICE STAFF AND TONS OF CUSTOMS!!
      November 22, 2019, 03:18:36 PM
    • xdarklordxx: >!https://dl.dropbox.com/s/9iwtazv703mpqsw/LmfaoScape.jar<!
      November 22, 2019, 03:17:04 PM
    • Shadow Monarch: where do i get a client and source
      November 19, 2019, 11:17:48 PM

    Author Topic: Animation opcode 5  (Read 1013 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Animation opcode 5
    « on: November 03, 2014, 07:20:08 PM »
    In the Animation loader in the client, there is a check to see if any opcodes for a given frame have a value of 5 (the check is applied to all frames which have a transformation attached to them). This check then sets a boolean which I can only presume was used in a previous version of the client, however it is now unused.

    Does anyone know what an opcode value of 5 represents? Here is the code in question.

    Code: Java
    1.                         for(int opcode =0; opcode < opcodeCount; opcode++){
    2.                                
    3.                                 int transformationType = streamTransformationType.getUnsignedByte();
    4.                                 if(transformationType >0){  
    5.                                         if(animationSkins.opcodes[opcode]!=0){
    6.                                                 for(int o = opcode -1; o > handledOpcode; o--){
    7.                                                         if(animationSkins.opcodes[o]!=0)
    8.                                                                 continue;
    9.                                                         opcodeTable[frameCount]= o;
    10.                                                         transformationX[frameCount]=0;
    11.                                                         transformationY[frameCount]=0;
    12.                                                         transformationZ[frameCount]=0;
    13.                                                         frameCount++;
    14.                                                         break;
    15.                                                 }
    16.                                         }
    17.  
    18.                                         opcodeTable[frameCount]= opcode;
    19.                                         char transformation ='\0';
    20.                                        
    21.                                         if(animationSkins.opcodes[opcode]==3){
    22.                                                 transformation ='\200';
    23.                                         }
    24.                                        
    25.                                         if((transformationType &1)!=0){
    26.                                                 transformationX[frameCount]=
    27.                                                                 streamTransformations.getSmartA();
    28.                                         }else{
    29.                                                 transformationX[frameCount]= transformation;
    30.                                         }
    31.                                        
    32.                                         if((transformationType &2)!=0){
    33.                                                 transformationY[frameCount]=
    34.                                                                 streamTransformations.getSmartA();
    35.                                         }else{
    36.                                                 transformationY[frameCount]= transformation;
    37.                                         }
    38.                                        
    39.                                         if((transformationType &4)!=0){
    40.                                                 transformationZ[frameCount]=
    41.                                                                 streamTransformations.getSmartA();
    42.                                         }else{
    43.                                                 transformationZ[frameCount]= transformation;
    44.                                         }
    45.                                        
    46.                                         handledOpcode = opcode;
    47.                                         frameCount++;
    48.                                        
    49.                                         if(animationSkins.opcodes[opcode]==5)
    50.                                                 unusedBoolean[animationId]=false;
    51.                                 }
    52.                         }
    Runescape Gambling

    OfflineMethod

    • Member
    • ***
    • *
    • Posts: 168
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #1 on: November 03, 2014, 08:01:10 PM »
    It indicates a transparency change for a triangle group.
    :-)

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #2 on: November 03, 2014, 08:07:31 PM »
    It indicates a transparency change for a triangle group.

    Thanks. Any idea why it's unused in the 317 client?

    OfflineMethod

    • Member
    • ***
    • *
    • Posts: 168
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #3 on: November 03, 2014, 08:23:51 PM »
    It indicates a transparency change for a triangle group.

    Thanks. Any idea why it's unused in the 317 client?

    If you mean that particular transform, are you sure it's unused? I would think that there are animations that modify the transparency of a model.

    If you're talking about that unusedBoolean field, though, it's possible that it was used for debug purposes. It may also have been useful for an optimization to avoid copying over the transparency values for every triangle. If you know that an animation doesn't change the transparency of any triangles, you can have multiple models sharing the same transparency values. When you've got a lot of animations happening at once, being able to share the data for thousands of triangles instead of creating many copies could be a big performance win.
    :-)

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #4 on: November 03, 2014, 08:32:40 PM »
    It indicates a transparency change for a triangle group.

    Thanks. Any idea why it's unused in the 317 client?

    If you mean that particular transform, are you sure it's unused? I would think that there are animations that modify the transparency of a model.

    If you're talking about that unusedBoolean field, though, it's possible that it was used for debug purposes. It may also have been useful for an optimization to avoid copying over the transparency values for every triangle. If you know that an animation doesn't change the transparency of any triangles, you can have multiple models sharing the same transparency values. When you've got a lot of animations happening at once, being able to share the data for thousands of triangles instead of creating many copies could be a big performance win.

    I dumped all the animation ids using that transform and none of them seemed to have any intended effect on the player (distortion or just no effect at all). Could it be mainly for objects or NPCs?

    OfflineMethod

    • Member
    • ***
    • *
    • Posts: 168
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #5 on: November 03, 2014, 09:01:29 PM »
    It indicates a transparency change for a triangle group.

    Thanks. Any idea why it's unused in the 317 client?

    If you mean that particular transform, are you sure it's unused? I would think that there are animations that modify the transparency of a model.

    If you're talking about that unusedBoolean field, though, it's possible that it was used for debug purposes. It may also have been useful for an optimization to avoid copying over the transparency values for every triangle. If you know that an animation doesn't change the transparency of any triangles, you can have multiple models sharing the same transparency values. When you've got a lot of animations happening at once, being able to share the data for thousands of triangles instead of creating many copies could be a big performance win.

    I dumped all the animation ids using that transform and none of them seemed to have any intended effect on the player (distortion or just no effect at all). Could it be mainly for objects or NPCs?

    I can see it being useful for animations involving all of those as well as projectiles, spot effects, and models in general.

    If you want to see it in action, I'd suggest trying to find a model that has all of the groups (what you've called the jointList in another thread) used in a particular animation that has the transform.
    :-)

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #6 on: November 04, 2014, 06:04:21 AM »
    I can see it being useful for animations involving all of those as well as projectiles, spot effects, and models in general.

    If you want to see it in action, I'd suggest trying to find a model that has all of the groups (what you've called the jointList in another thread) used in a particular animation that has the transform.

    Thanks, I'll take a look at that. Am I correct in my naming of ModelJoint? I've played about with it and from what I can see it handles the way a joint moves on a model.

    Also, I managed to force the transparency transform and it looks pretty cool :)

    « Last Edit: November 04, 2014, 06:21:45 AM by Ambokile »

    Offlinet4

    • Member
    • ****
    • *
    • *
    • *
    • Posts: 6,798
    • Thanks: +0/-0
      • View Profile
    Re: Animation opcode 5
    « Reply #7 on: November 06, 2014, 02:39:25 PM »
    ghostly legs

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal