logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,798
Posts: 95,842

Administrators:
DeeZire, Redemption

There are currently 30 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


LOTR: Battle For Middle Earth I & II Editing Discuss any modding related issues to do with the Lord Of The Rings: Battle For Middle Earth I and II RTS games here.

Reply
 
LinkBack Thread Tools
Old 07-03-2005, 04:38 PM   #81 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

Vertex arrays are used to build the model, without them, no hierarchy. Vertex normals are precalculated during export so the game engine doesn't have to do this, this speeds up the process. But why put in two addional arrays? Also both arrays are almost the same.

I had a look at the new mesh chunk in the Renegade 2 models when they were released. Their sole purpose won't be speeding up rendering as they completely replace the 'normal' mesh chunk. I couldn't find the complete layout of these chunks but as the game was canceled I didn't really care either. I didn't know BFME models contain them however seeing as it are only 3 models it could be exprimental and not be actually used in game.

I made some notes when I looked at these chunk, that's all I can give you.


Code:
Chunk Structure:

W3D_CHUNK_UNKOWN_B00
- W3D_CHUNK_UNKNOWN_B01
- W3D_CHUNK_UNKNOWN_B02
- W3D_CHUNK_UNKNOWN_B20
- - W3D_CHUNK_UNKNOWN_B21
- - W3D_CHUNK_UNKNOWN_B40
- - - W3D_CHUNK_UNKNOWN_B41
- - - W3D_CHUNK_UNKNOWN_B42
- - W3D_CHUNK_UNKNOWN_B43
- - W3D_CHUNK_UNKNOWN_B44
- - W3D_CHUNK_UNKNOWN_B47
- - W3D_CHUNK_UNKNOWN_B49
- - W3D_CHUNK_UNKNOWN_B4A
- - W3D_CHUNK_UNKNOWN_B4B
- - W3D_CHUNK_UNKNOWN_B45



W3D_CHUNK_UNKOWN_B00
Type: Root node



W3D_CHUNK_UNKNOWN_B01
Type: Leaf
Size: container name length + mesh name length + 1
Possible usage: identifier
Layout:

n bytes		- string: container name + mesh name



W3D_CHUNK_UNKNOWN_B02
Type: leaf
Size: 80 bytes
Possible usage: mesh header
Layout:

dword		- version???
dword		- attributes
dword		- numFaces
dword		- numVertices
dword		- numMaterials
dword		- ???
dword		- ???
dword		- ???
dword		- ???
dword		- ???
vector		- min???
vector		- max???
vector		- sphCenter???
float		- sphRadius???

Note: the three vectors could be 9 single float values



W3D_CHUNK_UNKNOWN_B20
Type: Node



W3D_CHUNK_UNKNOWN_B21
Type: Leaf
Size: 56 bytes
Possible usage: mesh header
Layout:

dword		- numFaces
dword		- numVertices
dword		- ???
dword		- ???
vector		- min???
vector		- max???
vector		- sphCenter???
float		- sphRadius???

Note: The three vectors could be 9 single float values



W3D_CHUNK_UNKNOWN_B40
Type: Node



W3D_CHUNK_UNKNOWN_B41
Type: Leaf
Size: 4 bytes
Possible usage: header for upcoming chunk
Layout:

dword		- number of textures in upcoming chunk???



W3D_CHUNK_UNKNOWN_B42
Type: Leaf
Size: variable, depends on texture names
Possible usage: unknown
Layout:

9 bytes		- unknown
1 byte	 	- size of upcoming string
n bytes		- string, always appears to be 'UnNamed'
14 bytes	- unknown
1 byte		- not sure but could be texture index seeing as this byte is 0 for the first texture and 1 for the second
1 byte		- size of upcoming string
n bytes		- string, some texture name
1 byte		- not sure but could be texture index seeing as this byte is 0 for the first texture and 1 for the second
1 byte		- size of upcoming string
n bytes		- string, some texture name
62 bytes	- unknown, some float values, some other values

Note: Maybe can contain more then two textures, not encountered yet.



W3D_CHUNK_UNKNOWN_B43
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B44
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B47
Type: Leaf
Size: variable, number of vertices * 8 bytes
Possible usage: texture coordinates
Layout (for every vertex):

float		- u
float		- v




W3D_CHUNK_UNKNOWN_B49
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B4A
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B4B
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B45
Type: Leaf
Size: variable, number of faces * 6 bytes
Possible usage: faces
Layout:

word		- vertexIdx 1
word		- vertexIdx 2
word		- vertexIdx 3

There are a few things I didn't understand from this.

- There are 5 vertex arrays but no vertex normals (or they are not normalized witch I highly doubt).
- None of the vertex arrays matches an vertex array from a normal mesh chunk (when you export the model again using our tools).
- The faces do not store any attributes nor do they store a normal.

All in all I think all this was still in development for Renegade 2 and is not really used.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-03-2005, 06:23 PM   #82 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

One more thing,

I modified my importer to use these chunks as input for vertices and faces.

W3D_CHUNK_UNKNOWN_B43 is the vertex array. I get a normal geometry when importing with this one.

All the other vertex arrays makes everything look like a sphere. Non of them takes the shape of an vertex normal array.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-03-2005, 06:46 PM   #83 (permalink)
Senior Member
 
Join Date: Dec 2002
Location: Brazil
Posts: 168
Default

Quote:
Originally Posted by Rene";p=&quot View Post
Vertex arrays are used to build the model, without them, no hierarchy. Vertex normals are precalculated during export so the game engine doesn't have to do this, this speeds up the process. But why put in two addional arrays? Also both arrays are almost the same.

I had a look at the new mesh chunk in the Renegade 2 models when they were released. Their sole purpose won't be speeding up rendering as they completely replace the 'normal' mesh chunk. I couldn't find the complete layout of these chunks but as the game was canceled I didn't really care either. I didn't know BFME models contain them however seeing as it are only 3 models it could be exprimental and not be actually used in game.

I made some notes when I looked at these chunk, that's all I can give you.


Code:
Chunk Structure:

W3D_CHUNK_UNKOWN_B00
- W3D_CHUNK_UNKNOWN_B01
- W3D_CHUNK_UNKNOWN_B02
- W3D_CHUNK_UNKNOWN_B20
- - W3D_CHUNK_UNKNOWN_B21
- - W3D_CHUNK_UNKNOWN_B40
- - - W3D_CHUNK_UNKNOWN_B41
- - - W3D_CHUNK_UNKNOWN_B42
- - W3D_CHUNK_UNKNOWN_B43
- - W3D_CHUNK_UNKNOWN_B44
- - W3D_CHUNK_UNKNOWN_B47
- - W3D_CHUNK_UNKNOWN_B49
- - W3D_CHUNK_UNKNOWN_B4A
- - W3D_CHUNK_UNKNOWN_B4B
- - W3D_CHUNK_UNKNOWN_B45



W3D_CHUNK_UNKOWN_B00
Type: Root node



W3D_CHUNK_UNKNOWN_B01
Type: Leaf
Size: container name length + mesh name length + 1
Possible usage: identifier
Layout:

n bytes		- string: container name + mesh name



W3D_CHUNK_UNKNOWN_B02
Type: leaf
Size: 80 bytes
Possible usage: mesh header
Layout:

dword		- version???
dword		- attributes
dword		- numFaces
dword		- numVertices
dword		- numMaterials
dword		- ???
dword		- ???
dword		- ???
dword		- ???
dword		- ???
vector		- min???
vector		- max???
vector		- sphCenter???
float		- sphRadius???

Note: the three vectors could be 9 single float values



W3D_CHUNK_UNKNOWN_B20
Type: Node



W3D_CHUNK_UNKNOWN_B21
Type: Leaf
Size: 56 bytes
Possible usage: mesh header
Layout:

dword		- numFaces
dword		- numVertices
dword		- ???
dword		- ???
vector		- min???
vector		- max???
vector		- sphCenter???
float		- sphRadius???

Note: The three vectors could be 9 single float values



W3D_CHUNK_UNKNOWN_B40
Type: Node



W3D_CHUNK_UNKNOWN_B41
Type: Leaf
Size: 4 bytes
Possible usage: header for upcoming chunk
Layout:

dword		- number of textures in upcoming chunk???



W3D_CHUNK_UNKNOWN_B42
Type: Leaf
Size: variable, depends on texture names
Possible usage: unknown
Layout:

9 bytes		- unknown
1 byte	 	- size of upcoming string
n bytes		- string, always appears to be 'UnNamed'
14 bytes	- unknown
1 byte		- not sure but could be texture index seeing as this byte is 0 for the first texture and 1 for the second
1 byte		- size of upcoming string
n bytes		- string, some texture name
1 byte		- not sure but could be texture index seeing as this byte is 0 for the first texture and 1 for the second
1 byte		- size of upcoming string
n bytes		- string, some texture name
62 bytes	- unknown, some float values, some other values

Note: Maybe can contain more then two textures, not encountered yet.



W3D_CHUNK_UNKNOWN_B43
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B44
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B47
Type: Leaf
Size: variable, number of vertices * 8 bytes
Possible usage: texture coordinates
Layout (for every vertex):

float		- u
float		- v




W3D_CHUNK_UNKNOWN_B49
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B4A
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B4B
Type: Leaf
Size: variable, number of vertices * 12 bytes
Possible usage: vertex array of some kind
Layout (for every vertex):

float		- x
float		- y
float		- z



W3D_CHUNK_UNKNOWN_B45
Type: Leaf
Size: variable, number of faces * 6 bytes
Possible usage: faces
Layout:

word		- vertexIdx 1
word		- vertexIdx 2
word		- vertexIdx 3

There are a few things I didn't understand from this.

- There are 5 vertex arrays but no vertex normals (or they are not normalized witch I highly doubt).
- None of the vertex arrays matches an vertex array from a normal mesh chunk (when you export the model again using our tools).
- The faces do not store any attributes nor do they store a normal.

All in all I think all this was still in development for Renegade 2 and is not really used.


Both B02 and B21 ends with min, max, Sphere Center and Sphere Radius.

What you found out was more or less what I figured out, except that you had better results on the B42. The final 62 bytes could related to material colours (ambient, difuse, specular, shineness (composed of 16 bytes) and shineness, opacity and translucence (3 floats (12 bytes))). But there are space for more, as you mentioned (62 bytes). The sample I took in that topic isn't very clear with this. If the material settings are there, then it probably has some atributes (dword) as well.


B43 is certainly the vertices. I thought B44 was normals, but as you said, it didn't match the normals...

The zip file linked below has all B00 chunks from Renegade 2. The name convention used by my program was simple: <name of w3d>.b0<number of mesh>

I.e.: v_svt_rtk.b010 (v_svt_rtk.w3d, mesh 10)


Download:
-> All samples from B00 Chunks from renegade 2 models in a zip
Banshee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-04-2005, 03:39 PM   #84 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

At the time I made those notes I didn't have the luxioury of an import script to back me up. Now that I have, I can confirm now that W3D_CHUNK_UNKNOWN_B44 are the vertex normals. If you leave out the translations caused by the hlod then the position of the vertices in this array equals the vertex normals of the vertices in W3D_CHUNK_UNKNOWN_B43.

I can't confirm W3D_CHUNK_UNKNOWN_B47 being texture coordinates but I also don't know what other data you want to store of this size.

W3D_CHUNK_UNKNOWN_B42 no doubt contains data on materials but as long as you don't know witch one goes where it's rather useless.

The mesh header probably contain data on vertex channels, face channels, damage stages, sorting levels and other stuff but same story here, as long as you don't know witch one goes where it's useless.

It's nice to have the binary data of the chunks but the code I wrote for my 3dsmax tools can perfectly read in an entire w3d file and convert it to an object structure. I didn't find out all this info by hand

If you want to continue on this, it's good to know that the gmax files and the w3d files released by westwood do not hold 100% the same model. This mostly involves scaling as the grisly w3d model is only 10% of the size of the gmax file.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-05-2005, 08:23 PM   #85 (permalink)
Administrator
 
DeeZire's Avatar
 
Join Date: Dec 2002
Posts: 1,913
Send a message via ICQ to DeeZire
Default

Im expecting to be back at EA sometime soon, Ill ask on this one
DeeZire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-06-2005, 12:57 PM   #86 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

Like I said, I asked it many times, expecially C00 and C01 as almost every skin model from BFME you open has those two chunks. I never got an reply on the actual contents. I hope you have more luck.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-15-2005, 12:10 PM   #87 (permalink)
Senior Member
 
Join Date: Sep 2001
Posts: 313
Send a message via ICQ to mad ivan Send a message via MSN to mad ivan
Default

Didnt have the chance to play BFME a lot but still:
1.Planes - both VTOL and Generals-style
2.The Hijacker Logic From Generals (is it at BFME now?)
3.SOMETIMES Bump Mapping Doesnt Appear properly in W3D Viewer.
4.Generals Railroads and Trains (Does it work in BFME at all?)
5.The use of Generals-style base-making along with the BFME-equivalent of base making is pretty good, but i guess it would take too much effort to put that in the game now.

Thats about it for now.Will add more later
mad ivan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-23-2005, 03:52 PM   #88 (permalink)
Senior Member
 
Join Date: Sep 2001
Posts: 313
Send a message via ICQ to mad ivan Send a message via MSN to mad ivan
Default

wow!so is still posting here usefull?
(*)FirePrimary/Secondary/ThirtiaryWeapon Command.
(*)The ZH Supply Drop (if not in there already)
(*)Deflector Code (i think it aint there last time i checked game.dat)
(*)Is powerplant code still available (and fully functional)?
mad ivan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-25-2005, 01:03 AM   #89 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 9
Default

A VP6 Codec!!
TKellyey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod Support from EA DeeZire Generals & Zero Hour Editing 0 03-09-2005 08:43 PM
What do you think of that? (FinalBIG INI editing support) Matze Generals & Zero Hour Editing 19 02-18-2005 06:19 PM
EA Support of BFME Chrizz LOTR: Battle For Middle Earth I & II Editing 21 01-15-2005 09:22 PM
Support weapons. Judgment Generals & Zero Hour Editing 0 11-05-2003 06:19 PM
XCC Mixer doesn't support NTFS? SJG Red Alert 2 & Yuri's Revenge Editing 3 03-21-2003 12:52 AM


All times are GMT -4. The time now is 03:15 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.