ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Dec 12, 2017 10:11 am

All times are UTC




Post new topic  Reply to topic  [ 28 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Sat Dec 02, 2017 7:41 pm 

Joined: Thu Nov 23, 2017 12:30 am
Posts: 20
Update.
More problems found: there are different ways to store data for vertices :(
But at least I have clues on how to start...
Code:
0x0001D436      MESHES_TABLE
46 64 B2 BD    BoundingBoxMinX =
52 5D F5 BD    BoundingBoxMinY =
C3 50 DF BE    BoundingBoxMinZ =
FD 66 7C 3E    BoundingBoxMaxX =
17 52 39 3E    BoundingBoxMaxY =
C8 9B 0C 3F    BoundingBoxMaxZ =
78 00 00 00    VerticesCount = 120
A4 00 00 00    TrianglesCount = 164
50 00 00 00    VerticesTableOffset = 0x50 + 0x0001D456 = 0x0001D4A6
0C 04 00 00    TrianglesTableOffset = 0x040C + 0x0001D45A = 0x0001D866
A4 00 00 00    TrianglesCount = 164
08 00 00 00    VertexDataSize = 8
00 00 00 80    SomeOffset = null
00 00 00 00    SomeCount = 0


VertexDataSize = 8, but it is 16 for ice_waste_animals.gsf (that is 128 bits instead of just 64), so I need to do some more tests to discover what bits to use for each field.


Top
   
PostPosted: Sun Dec 03, 2017 8:17 am 

Joined: Thu Nov 23, 2017 12:30 am
Posts: 20
The vertex and texture vertex uses the same bits for 8 or 16 bytes data, so I can let these extra 8 bytes for later.
I have discovered that some objects uses two sided textures; that is, after loading a .obj into blender, I see just one 'side' of the object being textured, while the other 'side' keeps black. I need more tests to find a way to solve this.

About reading all the inner files from program, instead of providing hardcoded offsets to read meshes, I got some advances.
The whole package structure seems like this:
Code:
--- GsfPack
GSF_PACK_HEADER
TREE_NODES
(Padding)
CONTENTS_TABLE
MATERIALS_HEADER
OBJECTS_TABLE
SUBOBJECTS_TABLE
DATA


The 'Data' part is:
Code:
--- Data
Object00
Object01
Object02
...
Objectnn


An object is:
Code:
PARTS_DEF
PARTS_TABLE
(if is first object)   SUBOBJECTS (Full, not just the childs of this object)
USED_MATERIALS_TABLE
(if is first object)   MATERIALS_TABLE (Full, not just the ones used by this object)
USED_TEXTURE_FILENAMES
PART_DEF_OFFSETS_TABLE
OBJECT_NAME


The 'PartsTable' is what needs to be parsed depending on object def, containing different chunks of data for each object type.
I will try to read a whole package and parse just the object types already implemented, so I can add later parsing for more types. For example, an 'Anim' will contain data chunks not used for a 'Char'.

All the offsets are written as relative, except the first one to give the location of the ContentsTable. So it should be possible to extract data just for an object, and include somewhere the relevant parts of the SubObjects and Materials, updating the needed offsets.


Top
   
PostPosted: Sun Dec 03, 2017 4:01 pm 

Joined: Fri Nov 24, 2017 4:54 pm
Posts: 14
If you can extract vertices and triangles data and convert it in the .obj
Can I convert vertices and triangles data from .obj to .gsf format and replace some model vertices and triangles data to new?
If the new model not bigger than the original


Top
   
PostPosted: Sun Dec 03, 2017 8:27 pm 

Joined: Thu Nov 23, 2017 12:30 am
Posts: 20
DryFun wrote:
If you can extract vertices and triangles data and convert it in the .obj
Can I convert vertices and triangles data from .obj to .gsf format and replace some model vertices and triangles data to new?
If the new model not bigger than the original

Yes, it could be done in both ways, packing and unpacking, even if the new models are bigger; the problem isn't that, but to find the right properties for the new models: besides mesh data, there is some other data stored in the gsf package.

Kharg wrote:
Please we really need help, we are the only team which is keeping this game alive :cry:

Are you related to this guy's team?

I will continue doing this just for fun, but just to be able to extract models; packing new models will require much more work, and I don't know if you are part of a team with coders, or just can edit/create models, and I wonder how many people could use anything that comes from this...


Top
   
PostPosted: Sun Dec 03, 2017 9:10 pm 

Joined: Fri Nov 24, 2017 4:54 pm
Posts: 14
Yes, we are from the same team
Rather it is the only one team about pw modding

This is our site: http://www.para-welt.com/ (offline/moves to https)
And discord: https://discord.gg/maauBUH

In general, we can create models right now, we simply dont have tools
And we have coders, one of them has already tried to do something with gsf but he didnt succeed
You can find his work in the Kharg's post


Top
   
PostPosted: Thu Dec 07, 2017 8:23 am 

Joined: Fri Nov 24, 2017 4:54 pm
Posts: 14
Is there any offsets to lod?
So I can change lod2 to lod1 or just delete all lods

I also didnt see any offsets to animations


Top
   
PostPosted: Thu Dec 07, 2017 10:40 am 

Joined: Thu Nov 23, 2017 12:30 am
Posts: 20
DryFun wrote:
Is there any offsets to lod?
So I can change lod2 to lod1 or just delete all lods

I also didnt see any offsets to animations

Hi.

I don't see yet any way to guess the LOD, except the amount of vertices/triangles for a single mesh. Maybe some of these bytes still unassigned to a meaning...
As for animations, there is a chunk specific for "Anim" that I have not studied yet, and I'm pretty sure it contains info on how to show the different frames for a single object, including the timing.

I have not gave up, just need 2-3 days to recover from illness, then I will continue.

DryFun wrote:
And we have coders, one of them has already tried to do something with gsf but he didnt succeed

The website keeps being offline (connection refused). If it can help the team, I will share my source code (C#), or even I could try to help a bit with C++ if you already have some guy working on that. You can send me a private message or post here a link to any repository, or I could just setup a new one.


Top
   
PostPosted: Thu Dec 07, 2017 12:14 pm 

Joined: Fri Nov 24, 2017 4:54 pm
Posts: 14
These are class names
Anim isnt animation, but animal
Char = characters (infantry)
Bldg = buildings
Deko = vegetation,trees,rocks...
Misc = weapons and other stuff
Thats names for flags

Machete with standard class (Misc)
Attachment:
scr_20171207_170620.jpg [133.59 KiB]
Not downloaded yet


And with Anim class
Attachment:
scr_20171207_170444.jpg [200.39 KiB]
Not downloaded yet


In fact, this only changes the names and the number of flags in sequences editor
New flags, which were not there before, dont affect anything
Flags effects still depend on what data are in gsf file for this model


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 28 posts ]  Go to page Previous 1 2

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited