Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTAForums Annual Awards 2018

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

GTX3

SA DFF - Frames relations

Recommended Posts

GTX3

Hello, I've managed to parse and load geometries using OpenGL, but I've hit a wall with these frames (and atomics) within DFF structure.

I parsed and loaded Infernus model from SA - which is a bit too complex to start with, but nonetheless, I successfully parsed it. The only problem is components - wheels to be specific. Only 1 wheel (front-right) seems to be added.

 

My main questions are: How do frames work? What exactly is parentFrame? Does it inherit geometry too?

I know frames and geometries are connected in atomics section.

 

Here are atomics:

Spoiler
{ frameIndex: 35, geometryIndex: 0 }
{ frameIndex: 14, geometryIndex: 1 }
{ frameIndex: 33, geometryIndex: 2 }
{ frameIndex: 34, geometryIndex: 3 }
{ frameIndex: 31, geometryIndex: 4 }
{ frameIndex: 32, geometryIndex: 5 }
{ frameIndex: 29, geometryIndex: 6 }
{ frameIndex: 30, geometryIndex: 7 }
{ frameIndex: 27, geometryIndex: 8 }
{ frameIndex: 28, geometryIndex: 9 }
{ frameIndex: 25, geometryIndex: 10 }
{ frameIndex: 26, geometryIndex: 11 }
{ frameIndex: 23, geometryIndex: 12 }
{ frameIndex: 24, geometryIndex: 13 }
{ frameIndex: 21, geometryIndex: 14 }

 

 

Here are frames:

Spoiler
{
   "numberOfFrames":36,
   "frames":[
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":-1
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.7049300670623779,
            2.6824448108673096,
            -0.19089847803115845
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.9549999833106995,
            -1.713217854499817,
            -0.3499998450279236
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.9549999237060547,
            1.7133152484893799,
            -0.3499998450279236
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.9549999237060547,
            -1.713217854499817,
            -0.3499998450279236
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.3112165629863739,
            -2.5187630653381348,
            -0.460594117641449
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.4885503053665161,
            0.054920684546232224,
            -0.208757221698761
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.8522705435752869,
            -2.465158462524414,
            0.04337269067764282
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.9549999237060547,
            1.7133152484893799,
            -0.3499998450279236
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0.5262758731842041,
            -2.4754104614257812,
            0.04337269067764282
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            1.090787410736084,
            -2.102478265762329,
            0.09285789728164673
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            1.8192598819732666,
            0.08981150388717651
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.9589149951934814,
            -0.04876403510570526,
            0.20417189598083496
         ],
         "parentFrame":0
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0.8621568083763123,
            0.4102972149848938
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -1.0966349840164185,
            1.1359740495681763,
            -0.15000027418136597
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            1.097000002861023,
            1.1359740495681763,
            -0.15000027418136597
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.8500000238418579,
            2.444544792175293,
            -0.5072647333145142
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            1.294224739074707,
            0.21875160932540894
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.8999999761581421,
            -2.332406997680664,
            -0.36549872159957886
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":8
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            -0.08715125173330307,
            -0.9044771790504456,
            0.2192676067352295
         ],
         "parentFrame":21
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":20
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":20
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":19
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":19
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":18
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":18
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":17
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":17
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":16
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":16
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":15
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":15
      },
      {
         "rotationMatrix":[
            1,
            0,
            0,
            0,
            1,
            0,
            0,
            0,
            1
         ],
         "coordinatesOffset":[
            0,
            0,
            0
         ],
         "parentFrame":3
      }
   ]
}

 

 

There are 15 geometric objects, but there is too much data. I can give you indices and name of the object:

Spoiler

0: wheel

1: chassis_vlo

2: windscreen_ok

3: windscreen_dam

4: door_lf_ok

5: door_lf_dam

6: door_rf_ok

7: door_rf_dam

8: bump_front_ok

9: bump_front_dam

10: bonnet_ok

11: bonnet_dam

12: bump_rear_ok

13: bump_rear_dam

14: chassis

 

Essentially, only these listed above show up in the viewer. I tried connecting frames using parentFrame, but the result is the same.

Edited by GTX3

Share this post


Link to post
Share on other sites
The Hero
Posted (edited)

RwFrames form a tree. Every frame can have a parent and children. The parent id in the dff file tells you which frame in the list is the parent of that frame. Id -1 is the top of tree, it has no parent. Not all frames are connected to atomics and hence to geometry data, these are usually called dummy frames.

Edited by The Hero

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.