Aller au contenu

Photo

Reading GFF Files and vertex data


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
BioSpirit

BioSpirit
  • Members
  • 261 messages
Is there any developper resources (source codes, headers, libraries) available for reading GFF files in C/C++ ?

Also the wiki states that version 4.0 of GFF is using 4-byte numerical labels instead of 16 byte strings for faster access. Then how should one know what number is used to represent a data like "MESH_CHUNK_VERTEXCOUNT" ?

Based on an informatio in the wiki, it would seem that Position, Normal and Tangent vestors, with in a vertex, are coded as 16-bit unsigned floats. Using a 16-bit floats is OK, but I really don't understand what is gained by leaving the sign bit out. Is that informatio accurate, if so, then how unsigned floats are used to represent vectors in 3-dimensions ?

Is there a converter code available for 16-bit floats ? If not, then what is the layout of the bit fields ?

This is a little offtopic but when rendering a lightmaps for custom models. The lightmapper will send a warning "Could not find meta data for <model> ". What is this meta data it's talking about ? It seems to be important, since, without it the lightmaps won't render.  I search everywhere and I was only able to find posts asking the same question.

Modifié par BioSpirit, 25 janvier 2010 - 05:41 .


#2
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
If you drag the GFF into the toolset, it seems to usually know the label names for a lot of things... when I was trying to figure out which were for GDA rows and columns, I think I just opened the GDA with a hex editor and compared it to what I saw in the toolset - editing stuff from both sides to see what changed.

It also helped to understand some of the GFF file format better... especially where the fields are so you know where to look in the file. Personally, I think the current GFF article on the wiki doesn't have nearly enough information to really understand what's going on.

I don't know if you've seen it, but there was this discussion on the format: http://social.biowar.../8/index/464166.

I also had this write-up on GDAs (which are GFFs): http://social.biowar...72/index/508109, which might help a bit.

The wiki article definitely needs clarification - I think there's just been a lot of hesitation to update it before getting a better understanding.

Modifié par FollowTheGourd, 26 janvier 2010 - 06:53 .


#3
BioSpirit

BioSpirit
  • Members
  • 261 messages
It looks like the field id list is stored in EditorGff40.dll and it can be viewed with notepad. That helps a lot. The article in a wiki ain't the best one I have seen but it contains just and just enough information to implement a reader for GFFs. I was hoping to avoid that but it's not too much trouble.

#4
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Nice find - sounds like something that should also go on the wiki.

Modifié par FollowTheGourd, 26 janvier 2010 - 02:34 .


#5
BioSpirit

BioSpirit
  • Members
  • 261 messages
I have the GFF Reader implemented now, but still I need to test it. I suppose a mesh file reader would be a proper test for the reader. One problem still remains, do you think it's legal to distribute the file from the EditorGff40.dll with the reader or upload it into the wiki. I can't see any reason why someone would object with that but still...

#6
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
I don't see there being a problem if we formatted it into a table - that's basically information you could get by a more tedious process of changing the value in a hex editor and then seeing what the toolset calls it (except for the comments part)... and I don't think they're trying to keep this info a secret anyway.

E.g., (forum formatting aside)

Label                          |    Value   |     Name     |  Description
-----------------------------+------------+----------------+-------------------
GFF_ITEM_STOLEN |   1003    | Item Stolen | true(1) or false(0) if the item can be stolen or not


Then break that up into separate tables depending on the range comments: e.g., "environment properties range reserved up to 3999" or "begin animation range". Maybe a separate wiki page for each table, linked by a contents page or category? (Depending on how much there all is...)

Modifié par FollowTheGourd, 27 janvier 2010 - 02:35 .


#7
BioSpirit

BioSpirit
  • Members
  • 261 messages
I don't think there is a need to make a table from it. A typical header file format would be good enough.