Page 1 of 3

[Request] DragonBall Online Mesh Viewer

Posted: Sun Aug 25, 2013 10:01 am
by LinkvsSangoku
Hello everyone, i'm new here and i'm french (sorry if my english isn't perfect)

Well i need a little help, does you have a way to read meshes from .DFF and animations from .AMN files from DBO (.PAK Files extracted) ?

I found a little trick to read some .DFF files (only work on some .dff i get dummy with other)

I tried to find a similarity in the headers of these files .DFF but I do not see how they can help me.

Anyone have a solution to use those files correctly ?

I upload some mesh and animations files here http://www.mediafire.com/download/5cl0v ... nd_ANM.rar

DBO Developper are NTL.
Publisher: Netmarble (KR) Cayenne Tech (Taiwan & Hong Kong)
Link for the game: http://dbo.wasabii.com.tw/
Thank you for your help

Re: [Request] DragonBall Online Mesh Viewer

Posted: Sun Aug 25, 2013 2:05 pm
by shakotay2
LinkvsSangoku wrote:Well i need a little help, does you have a way to read meshes from .DFF and animations from .AMN files from DBO (.PAK Files extracted) ?
'yes' for dff files:
Image, submesh head

If you're having some basic understanding of vertices and faces (and some coding skills)
I can tell you how to get the meshes on your own.

Re: [Request] DragonBall Online Mesh Viewer

Posted: Sun Aug 25, 2013 3:43 pm
by LinkvsSangoku
i don't have any skills in 3D.

I'm looking at the Wiki page XentaX and tutorials from this topic viewtopic.php?f=29&t=3739 to learn "basics"

So if you redirecting me in a tutorial for this it's would be nice

And can you give a try in the "n_hmy_m_b2.dff" file ?

Re: [Request] DragonBall Online Mesh Viewer

Posted: Sun Aug 25, 2013 9:07 pm
by shakotay2
LinkvsSangoku wrote:I'm looking at the Wiki page XentaX and tutorials from this topic viewtopic.php?f=29&t=3739 to learn "basics"

So if you redirecting me in a tutorial for this it's would be nice
chrrox tut is a good one.
After you read it I can give you some details for DragonBall dffs.
But so far I did only get one kind of submesh. There are other data to be explored.
And can you give a try in the "n_hmy_m_b2.dff" file ?
Image

Re: [Request] DragonBall Online Mesh Viewer

Posted: Sun Aug 25, 2013 9:14 pm
by LinkvsSangoku
i read it.
I better understand the functioning of the files and how to spot in the case of the tuto

Re: [Request] DragonBall Online Mesh Viewer

Posted: Mon Aug 26, 2013 7:36 am
by shakotay2
So here's a short approach on DragonBall online meshes (dff)
Basic knowledge of 3D formats assumed.

Sample n_hmy_m_b2.dff

May not apply to other samples.So don't be confused. :D

Skeletal bones being contained ("Bip01 L Foot") not handled here.

First of all the face indices to be found. Maybe BYTE or (unsigned) int.
int as 2 (WORD) or 4 bytes (DWORD)

Faces consisting of 3 (triangles) or 4 indices (quads).

Scrolling through the mesh file using a hexeditor the face index table easily to be found
looking like a swizzled ASCII table (N.Q.R., b.a.c. or something like that).

One table's starting offset to be 0x50B0E (yes, tend to start the search from file's end).

Looks like having 4 indices per faces. It's no quads because the uncommon 00 00 index to be overread.
Each index of WORD size.

For wavefront obj format the faceindices are starting from 1 instead of 0 so a one needs to be added to each index.

First three faces:

f 21/21 58/58 5/5
f 73/73 5/5 74/74
f 22/22 18/18 59/59

The notation says: first face's vertices are vertex 21,58,5
first face's texture coords are tex 21,58,5

Ignored normals because they can be created in blender automatically.
If to be used normals the notation would be f 21/21/21 58/58/58 5/5/5
(But some formats go like this: f 21/15/15 58/16/16 5/17/17 for example)

End of face index table at 0x50EAD. So face count would be 116 (928/8)

928 = 0x3A0 = 0x50EAE - 0x50B0E

Last three faces:
f 12/12 15/15 17/17
f 35/35 1/1 39/39
f 12/12 17/17 1/1

Now searching the vectors of vertices, normals and the texture coords.
Vertices and normals being composed of 3 floats (x,y,z), texture coords of 2 floats.

(square root of) Sum of square of the normals components being one (the length of the vectors). This way normals to be identified easily.

Position of tables in the files may vary. Often the order is vertices, normals, texture coords, faces.

In this case it starts with the table of tex coords then table of face indices follows.
Then vertices/normals table follows at 0x50EAE. (I thought - but was a hoax; true start is at 0x50EC6)

Ends at 0x515E5.
Means we have a block size of 1824. 3 floats occupy 12 bytes. 1824/12=152

In this case it's a vertices and a normals block. So there are 76 vertices followed by 76 normals.

The vertex count 0x4C (= 76 dec.) is 4C 00 00 00 in little endian notation.
Should be found somewhere in the file. In this sample it's at 0x508A6.
(Although there are 21 other findings.)

The first 3 verts:
v 0.206444 -0.003008 0.096340
v 0.197505 0.003211 -0.140815
v 0.143018 0.000008 0.136271

And the last three:
v -0.382032 0.145165 -0.214877
v -0.290796 0.125715 -0.214021
v -0.335196 0.136866 -0.217663

(Vertex block ends at 0x51255. Normals block ends at 0x515E5.)

Last not least the tex coords block. To be found at 0x508AE.
Yes, it's located before the face index block.

Texture coords consist of two floats (2D coords x,y) in the range of 0.0 .. 1.0.

First tex coord pair:
vt 0.300640 0.505262

Last one:
vt 0.085109 0.699195

Other face index blocks in this file containing FF FF.

Usually being a marker for ending of TriStrips.
Not applying in this case imho. Not sure how to handle these blocks.

So this was a crash course only. May contain errors.
Nevertheless: HTH

Re: [Request] DragonBall Online Mesh Viewer

Posted: Mon Aug 26, 2013 10:23 am
by LinkvsSangoku
Ok i'll try that thank you!

Theres is a way to "automated" the process? Like an extension for 3DsMax or other log ?

Re: [Request] DragonBall Online Mesh Viewer

Posted: Mon Aug 26, 2013 11:27 am
by shakotay2
If you knew python you could write a dff importer (python script) for blender or Noesis.

(For me it's more convenient to write some C code.)

If I find some time I could modify my FungWan mesh extractor for DragonBall online.
But before the format needs further exploration.

Re: [Request] DragonBall Online Mesh Viewer

Posted: Mon Aug 26, 2013 11:44 am
by LinkvsSangoku
i don't know Python

Is there any coder who could make that or a thread for a request ?

Re: [Request] DragonBall Online Mesh Viewer

Posted: Tue Aug 27, 2013 5:41 pm
by shakotay2
Here's an extractor:
.
DBallExtract.zip

Re: [Request] DragonBall Online Mesh Viewer

Posted: Wed Aug 28, 2013 11:18 am
by LinkvsSangoku
Hi
Thanks for your extracor.
It's working fine in some .DFF
but with some files, i get strange meshes

Picture from the file "n_gkn_a1.dff"
Image

I have two question about your extractor too, i need to open a .DFF file then press one of the two buttons, but why i need to close the exctractor for having the complete file (if i not closing the windows, .OBJ files are 0Kb)

The second is, does you need an archive with models to improve your extractor ?

And there is a way to conserve the Texture positionnement in meshes ?

Re: [Request] DragonBall Online Mesh Viewer

Posted: Wed Aug 28, 2013 12:40 pm
by shakotay2
Picture from the file "n_gkn_a1.dff"
Image I used the left button.
LinkvsSangoku wrote: (if i not closing the windows, .OBJ files are 0Kb)
The file is closed when the extractor is closed, yes. Because it was a log file before. Should be changed (some day).
The second is, does you need an archive with models to improve your extractor ?
Nope. The models are not that detailed. But you may upload a model that the extractor does not extract correctly. (Always try other button on a fail.)
And there is a way to conserve the Texture positionnement in meshes ?
What does that mean exactly? (In blender you load a texture file into the UV editor, then you move/mirror it to fit on the UV map. Is it this you mean?)

Re: [Request] DragonBall Online Mesh Viewer

Posted: Thu Aug 29, 2013 12:27 pm
by LinkvsSangoku
shakotay2 wrote:Picture from the file "n_gkn_a1.dff"
Image
How does you get a view like that ?
shakotay2 wrote:The file is closed when the extractor is closed, yes. Because it was a log file before. Should be changed (some day).
Ok i understand
shakotay2 wrote:Nope. The models are not that detailed. But you may upload a model that the extractor does not extract correctly. (Always try other button on a fail.)
i have other models : http://www.mediafire.com/download/ycjka ... Meshes.rar
shakotay2 wrote:What does that mean exactly? (In blender you load a texture file into the UV editor, then you move/mirror it to fit on the UV map. Is it this you mean?)
i mean textures files are "automatly" positionned in-game and DFF files contain the positioning of the texture and is there a way to see what file the mesh use in blender?

Re: [Request] DragonBall Online Mesh Viewer

Posted: Thu Aug 29, 2013 3:26 pm
by shakotay2
LinkvsSangoku wrote:How does you get a view like that ?
? blender bascis:
select mesh, choose edit mode, RMB on windows border, "Split Area", choose UV editor.

i have other models
thx - looks like a third button is needed. has to wait 'til my next spare hours.
is there a way to see what file the mesh use in blender?
Didn't find a texture extension (.dds, .tga, whatever) in the dffs. Search in DragonBall folder for files named n_gkn_a1 for example with other extension than .dff. One of these (if any) might be the corresponding texture file.

edit: there are the names B_Kinto_1..B_Kinto_9 contained in the dff
but this seem not to be material ore texture names because there are only 3 submeshes.

Re: [Request] DragonBall Online Mesh Viewer

Posted: Thu Aug 29, 2013 7:04 pm
by r3d
Hi, I am a soft-dev myself and I'd love to join the discussion. I have tried to do that some time ago but failed. Glad to see someone going further.

Is your software open source or are you willing to share it? If not, can you more or less sum up the the format? The description above is not really organized and I maybe you have found out something new :)

Not to mention I will love to help with any bug fixing