Page 1 of 2

research on an obj to vkm converter

Posted: Tue Aug 11, 2015 4:36 pm
by faridkamil
hello,

i need some help on researching an obj to vkm converter for a game called fung wan online. right now shahkotay2 has sucesfully created the vkm to obj standalone exporter at viewtopic.php?f=16&t=10618. any help would be appreciated. Thanks :).

Re: research on an obj to vkm converter

Posted: Tue Aug 11, 2015 5:33 pm
by shakotay2
As you all may know it's often not too hard to do a 'somewhat-3D-format' to (wavefront) obj conversion
(and create a converter or max script).

But most people expect the reverse way to be comparable simple.

Be told that it's not. Because you have to understand/rebuild the complete format of a 3D mesh file for example to get it loaded by the game engine without crashing.

While on analysing (vkm to obj for example) you can skip many bytes/data and your obj file will be fine, though.

With this said I'll try to build/show a concept for the "obj to vkm" conversion.

But it will take some time and: don't expect too much.

Feel free to contribute.

Re: research on an obj to vkm converter

Posted: Tue Aug 11, 2015 7:09 pm
by faridkamil
thanks. please take your time. i can wait for it :)

Re: research on an obj to vkm converter

Posted: Sun Aug 16, 2015 7:53 am
by shakotay2
having a look at PC18Body.vkm reveals:

first submesh "PC18_Upper Body"
vertex start: 0x78, 307 vertices, vertex stride 44

0x353C, 410 faces,
0x3540..0x4878, DWORD face indices

2nd submesh
0x6095 "PC18_Lower Body"

There's unknown data from 0x4890 to 0x607C.

You could overwrite these bytes with zeroes, put the vkm back to the game and see whether it crashes.
(If it doesn't we could dare the next step.)

Re: research on an obj to vkm converter

Posted: Sun Aug 16, 2015 9:52 am
by faridkamil
hi .. i think to start with PC18Body.vkm maybe a bit too hard because it contains animation. can we use something smaller and dont have any anim such as the CNY mask. if so .. i attach the file with this post.

:wink:

Re: research on an obj to vkm converter

Posted: Sun Aug 16, 2015 11:09 am
by shakotay2
would make sense
header

Code: Select all

Offset 0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00000 56 4B 59 4D 69 00 00 00  01 00 00 00 00 00 00 00   VKYMi...........
00010 01 00 01 00 00 00 00 00  34 16 00 00 43 6C 6F 6E   ........4...Clon
00020 65 66 72 6F 6E 74 20 66  61 63 65 00 00 00 00 00   efront face.....
00030 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
00040 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
00050 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
00060 F8 55 73 3F 90 72 50 C0  6C 2F 03 41 EE CD E1 40   øUs?rPÀl/.AîÍá@
00070 6F C2 0D 41                                        oÂ.A
five floats at 0x60 - so one float missing or it's not bounding box values?
at 0x74 DWORD vertex count: 89 vertices from 0x78 to 0xFC3
at 0xFC4 DWORD face count= 138

from 0xFC8 to 0x163F, 414 DW face indices

data after face indices (0x166C: "cnymask.dds"):

Code: Select all

Offset 0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
01640 00 00 00 00 00 00 00 00  01 00 00 00 24 02 00 00   ............$...
01650 00 00 00 00 95 95 95 01  95 95 95 01 E5 E5 E5 01   ....•••.•••.ååå.
01660 00 00 00 01 CD CC CC 3D  01 00 00 00 63 6E 79 6D   ....ÍÌÌ=....cnym
01670 61 73 6B 2E 64 64 73                               ask.dds
0x1677 to end of file: zero fill

Re: research on an obj to vkm converter

Posted: Sun Aug 16, 2015 11:57 am
by faridkamil
five floats at 0x60 - so one float missing or it's not bounding box values?
by this do u mean that the item have holes in it? if it is so then yes.
ss1.jpg
is there any thing u want me to edit or to try at this vkm?

Re: research on an obj to vkm converter

Posted: Sun Aug 16, 2015 3:08 pm
by shakotay2
faridkamil wrote:by this do u mean that the item have holes in it? if it is so then yes.
I don't know what it means. A bounding box is the smallest box the object just fits into.
is there any thing u want me to edit or to try at this vkm?
we need to understand the meaning of the header data
(DWORD at 0x18 might be an offset address for example) and the data before the dds filename.

"Clonefront face" should be the name of the mesh.

Re: research on an obj to vkm converter

Posted: Sun Nov 15, 2015 2:30 pm
by WazerHD
Hello shakotay2. We've met before :) I was asking you about the converter too. I'm interested to know about the converter too. It will help this little game live.
I hope you can make this converter happen. I will appreciate it if you could help.

Re: research on an obj to vkm converter

Posted: Sun Nov 15, 2015 3:36 pm
by shakotay2
Hello WazerHD,
I don't own/play the game.

so see my post as of Sun Aug 16, 2015 7:53 am -

Take PC18Body.vkm, for example,
overwrite the unknown data from 0x4890 to 0x607C with zeroes,
put the vkm back to the game and see whether it crashes.

If it does not we've done a step further.

edit: viewtopic.php?f=16&t=13184&p=131049&hil ... ed#p131049

Re: research on an obj to vkm converter

Posted: Sun Nov 15, 2015 4:59 pm
by faridkamil
Hi .. thanks for the explaination. i have replaced 0x4890 to 0x607C for PC18Body.vkm. FYI PC18Body.vkm is for female type 3 character. It does not make the game crash. only make the upperbody of the character disappear.

Refer attachment


shakotay2 wrote:Hello WazerHD,
I don't owe/play the game.

so see my post as of Sun Aug 16, 2015 7:53 am -

Take PC18Body.vkm, for example,
overwrite the unknown data from 0x4890 to 0x607C with zeroes,
put the vkm back to the game and see whether it crashes.

If it does not we've done a step further.

Re: research on an obj to vkm converter

Posted: Sun Nov 15, 2015 6:40 pm
by shakotay2
faridkamil wrote:It does not make the game crash. only make the upperbody of the character disappear.
yeah, no crash, that's great.

But I still don't have a clue about the structure of this section. (Might be 307x20 bytes, for example.)
Dividing it up into six 1k blocks:

0x4C90-508F
0x5090-548F
0x5490-588F
0x5890-5C8F
0x5C90-608F
0x6090-647C (+19 zeroes)

Do you get a partial vanishing of the upper body if you zero out the last or the 2nd block?

btw, just to recall why we're doing this. faridkamil suggested using a simpler mesh without animations.

If you simply just want to mod the game I'd really recommend to start with inserting your own chest, for example.
Because with new chars/armours skinning will be required as soon as you add/change some vertices.

Re: research on an obj to vkm converter

Posted: Mon Nov 16, 2015 2:20 am
by WazerHD
If the converter is out can i have it too?
I'd like to test it so i could help a little.
I believe the weapons and some other stuff only have 1 part instead of 2 parts in the body model.

Re: research on an obj to vkm converter

Posted: Mon Nov 16, 2015 9:26 am
by ujang
WazerHD wrote:If the converter is out can i have it too?
I'd like to test it so i could help a little.
I believe the weapons and some other stuff only have 1 part instead of 2 parts in the body model.

i don't think so it can use into this game.
btw in this thread i seriously not understand .. hahaha
it like i become from teletubies land.

Re: research on an obj to vkm converter

Posted: Mon Nov 16, 2015 10:21 am
by shakotay2
hahaha, yeah, long time no seen any trolls here in this forum.
Feel ignored from now on.

@WazerHD:
WazerHD wrote:If the converter is out can i have it too?
don't see a reason why not -
but we're far from having one atm.