Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Need help with VMeshWire/VMeshData segment or cmp/3db files

Here you can discuss building custom ships, texturing and 3D modeling in Freelancer

Post Thu May 06, 2004 12:41 pm

Need help with VMeshWire/VMeshData segment or cmp/3db files

Help! As far as I've got (not far ) is

DWORD 00000010 // same for every wireframe
DWORD xxxxxxxx // crc of lod name under VMeshLibrary
WORD... // i think what follows is a list of vertex references
maybe used for 'lineto' style vector drawing for the
scanners wire frame view

*Edit solved the 2nd DWORD - dumb to have missed it in first place lol

+++ out of cheese error - redo from start +++

"Psycho-ceramics. We are the cracked pots of mankind.
Would you like me to decipher a Rorschach for you?"
- Dean Harding, 'One Flew Over The Cuckoos Nest' by
Ken Kesey

Edited by - Anton on 5/6/2004 2:37:23 PM

Post Fri May 07, 2004 1:23 am

this

could be helpful for u. i have no clue about that kind of stuff but the old excecia admin: Reven (he wrote the cmp importer) knew quite a lot about it.

hope it helped,
Fjord

---------------------------------
Excelcia Mod Leading Developer

Post Mon May 10, 2004 12:37 pm

Ta Fjord, I've had your forums on my favorite's menu for a while now very useful stuff. I've had some contact with Colin Sandby (CMP exporter v0.21 author) which i will post below.

Post Mon May 10, 2004 12:38 pm

Tony,

I have done some work on the VWireData and have a few ideas on how it can be
worked out. One possibility is using adjacency info and normals to work out the lines
which make up the outer boundaries, but still got some work to do.

Testing/debugging new exporters & importers at the moment, but I will keep looking for
info on how to create the perimeter wire/line list that is in the VWireData.

The info I have is as follows (bh_elite icon VWireData)

---- HEADER ----

Structure Size = 16.
VMeshLibID = 0xFEAC4C3A.
Unknown = 0x0000. - might be an offset into the vertex buffer
Vertex Quantity = 4.
Ref Vertex Quantity = 8.
Unknown2 = 4.
---- Line Vertex List -----
Line 0 = v0 to v1.
Line 1 = v2 to v3.
Line 2 = v1 to v3.
Line 3 = v2 to v0.

The ship/weapon model parts have the same 16 byte header with different values
and longer line lists.

I'm still learning C++ myself, so it may take a while.

Colin

Post Mon May 10, 2004 12:39 pm

Tony,

Go ahead and use the mail in the help thread.

The structure I used for the header is as follows

typedef struct _VWireData
{
int vwd_HdrSize; // Points to vertex line list
long vwd_VMeshLibID;
short vwd_Unknown;
short vwd_VertexQty;
short vwd_RefVertexQty;
short vwd_Unknown2;
} VWireData;
// line vertex pairs follow. Quantity = D3DLINE[vwd_RefVertexQty / 2

I don't know if this is correct, but it seems to fit the data.

The print out I have for the Anubis port wing looks like this

---- HEADER ----

Structure Size = 16.
VMeshLibID = 0xEFADA67C. - CRC of the Lod2 mesh
Unknown = 0x0227.
Vertex Quantity = 12.
Ref Vertex Quantity = 46.
Unknown2 = 40.
---- Line Vertex List -----
Line 0 = v3 to v6.
Line 1 = v6 to v12.
Line 2 = v0 to v12.
Line 3 = v0 to v3.
Line 4 = v12 to v26.
Line 5 = v0 to v1.
Line 6 = v2 to v3.
Line 7 = v9 to v19.
Line 8 = v6 to v9.
Line 9 = v1 to v22.
Line 10 = v19 to v26.
Line 11 = v1 to v26.
Line 12 = v19 to v22.
Line 13 = v2 to v9.
Line 14 = v36 to v39.
Line 15 = v19 to v36.
Line 16 = v26 to v39.
Line 17 = v1 to v39.
Line 18 = v1 to v22.
Line 19 = v19 to v26.
Line 20 = v22 to v36.
Line 21 = v1 to v26.
Line 22 = v19 to v22.

The line list has a lot of missing vertices, but that could be because they are part of 1
large flat surface made up of 3 or more triangles. The vertices that don't form part of a
corner aren't included. The mesh viewer docs supplied with the DirectX 9 SDK
call them creases.

One way to check this will be to plot the vertices of a small group of meshes in AutoCAD
and join up the relevant ones that are in the list. If I get a chance I'll have a go.

Regards

Colin

Post Mon May 10, 2004 9:30 pm

hope that workx, and it may lead to a perfect exporter that includes working multiple groups...


a message from firebase...

Post Tue May 11, 2004 1:02 am

I'm not a modelling person but the current version seems to support them ok (i've never tried this however). What I have noticed however while tinkering with other folks work is multiple meshes being used for single 'objects'. For example, the Jedi Starfighter has 19 meshgroups - 18 making up the hull and 1 for the glass. Obviously this is not an intrinsic problem as the ship looks very cool but (that nasty word again) i'm wondering if it would help if objects like hull, wings, engine blocks etc were 'regrouped' in milkshape into definite sections like they are (or seem to be) in original ships.

*disclaimer - this is a TIP (thought in progress) I may be talking out of my botty

Post Thu May 27, 2004 6:32 am

Ok... research has been done and it appears the vwire data can be worked out (thanks to Colin Sandby's help and his data structures above) on some custom ships if the vertices/edges the directx sdk calls 'creases' can be calculated. So far I've drawn a blank with this... Any one know how this is done?

Return to Freelancer 3D Modeling and Texturing Forum