Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[Q/P] DFF file format questions


Beholder
 Share

Recommended Posts

First, thanks everybody for help with the ifp stuff. smile.gif

 

For learning purposes, I'm writing VC/SA model viewer/animator and have a few questions regarding the dff format.

 

1. How do I determine the length of the triangle strips? Or the the start and end of each strip? Same thing.

 

2. What is the format of the Inverse Bone Matrices? I thought it would be something like 3x3 or 4x4 of floats but that doesn't appear to be the case.

 

3. In the Bin Mesh PLG, what are the Split Indices for? The VC Player.dff has 2549 of them!

 

That's all I can think of for now, but I'm sure once I get get the basic mesh rendering I'll probably have more. monocle.gif

 

Thanks again,

-Beholder

 

--

I made it to the top Mount Chiliad and all I got was this lousy shirt!

Link to comment
Share on other sites

1 and 3: I'm not quite sure about what you're talking about, but I can explain how the mesh is saved in a dff file:

In the geometry struct there are normals, uv coords, vertices, faces and vertex colors.

The faces aren't actually used since the bin mesh plg takes care of that. The first three vertices in the bin mesh plg form a face and every following vertex forms the next. Just google for vertex strip.

The index is simply the number of the vertex that is specified in the geometry struct.

Link to comment
Share on other sites

Word, HERO! Thanks, that's good stuff! tounge.gif

 

I currently have it rendering Tommy with his skin now. Now if I can find out the IBM format I can start working on the animations.

 

Cheers!

-Beholder

Link to comment
Share on other sites

 

1. How do I determine the length of the triangle strips? Or the the start and end of each strip? Same thing.

In the Geometry Section, there are no start and end of separate triangle strips/lists. You could only use the indices there if you want to render just the mesh without materials. Otherwise ignore the faces there.

 

 

2. What is the format of the Inverse Bone Matrices? I thought it would be something like 3x3 or 4x4 of floats but that doesn't appear to be the case.

No idea about the format, but for rendering animations you don't really need them either. All you need can be calculated from the local transformation matrices.

 

 

3. In the Bin Mesh PLG, what are the Split Indices for? The VC Player.dff has 2549 of them!

A "split" in the Bin Mesh PLG section is a segment of the mesh using a certain material. Each split subsection contains the material ID and an array of indices into the vertex array in the Geometry Struct section (i.e. the faces for that segment). If a model uses only one material, there would only be one split.

 

When do we get first screenshots of your animation viewer? wink.gif

Link to comment
Share on other sites

 

 

Question: how actually do the modulate car colors work? I have written my own .dff exporter for VC but I recently noticed that it lacks support of that feature.

 

Thanks.

 

Alex

 

Link to comment
Share on other sites

I haven't gotten that far yet, but when I do, if you haven't figured it out and nobody replies, I'll be sure to look in to it with you.

 

I'm about at wits on something here... for the VC cars, how do you know which frames correspond to which geometries?

 

For example. the 3rd geometry in the admiral.dff is the damaged right rear door, but the last frame in the frame is the ok right rear door, and vice-versa. The order doesn't seem right.

 

I was thinking I could traverse the frame list backwards and the bin mesh list forwards, after loading the chassis_hi, vlo, and extras. This is driving me bonkers sad.gif

 

Thanks,

 

-Beholder

Edited by Beholder
Link to comment
Share on other sites

Sorry to bump this, I had edited the last post, thinking that it would bump it. I don't usually post on forums so I'm not used to these things. I put the bone animation stuff on the back-burner until I can get it to view all VC dffs (or at least the ones I'm willing to test with, I'm not gonna go thru 4,600+ files (ok, that's a lie, I probly will eventually, cuz I have no life biggrin.gif ))

 

Thanks,

 

-Beholder

Link to comment
Share on other sites

 

Question: how actually do the modulate car colors work? I have written my own .dff exporter for VC but I recently noticed that it lacks support of that feature.

the game identifies the material to use by the material color. if you want a material to be carcols compatible with say, the primary color for that vehicle, then the material color needs to be RGB: 60,255,0.

 

By default, renderware materials that are non white (that are not 255,255,255) have the modulatematerialcolor flag set in the geometry flags.

 

 

I'm about at wits on something here... for the VC cars, how do you know which frames correspond to which geometries?

i've mainly worked with SA, but the following should still be applicable;

Viewing a particular dff in Renderware Analyze, scroll to the section of Atomic(s) near the end of the file. The atomic struct should contain all the info you need for matching a frame to a geometry. Both the frame and geometry index are 0-based. I recommend trying to load a very simple model, such as the arrow.dff in the models/generic folder. it has one geometry and one frame. Vehicles can be confusing to start with as they have many, many frames and geometries.

Link to comment
Share on other sites

Uh, that would be my missing link alright. I totally forgot that the Atomic sections even existed. blush.gif I'm sure there will be more questions to come but at least I can move forward now. I'll try to post a preliminary screenshot tomorrow.

 

Thanks a grip DexX!

 

-Beholder

Link to comment
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
 Share

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

×
×
  • Create New...

Important Information

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