Page 2 of 15

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 1:11 pm
by Acewell
from g_ad.xbx :D
g_ad_xbx.png
the same character in g_ad.ps3 has the same settings except for the start addresses
step1 start address = 11d0e0
step3 start address = e3220

the characters appear as one mesh but there is submeshes in the file,
i don't know if they are accessories or what though (:

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 4:09 pm
by Bigchillghost
AceWell wrote:from g_ad.xbx :D
g_ad_xbx.png
the same character in g_ad.ps3 has the same settings except for the start addresses
step1 start address = 11d0e0
step3 start address = e3220

the characters appear as one mesh but there is submeshes in the file,
i don't know if they are accessories or what though (:
I've read the tutorial on hex2obj but didn't get the point how exactly to find the address. Even with the addresses you provided, I still don't know why they mark the start of the meshes. Moreover, there's gonna be plenty of work to get all the meshes by hand. Is it possible to write a tool with hex2obj built in to extract them automatically? If only I know what to do about it.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 4:31 pm
by daemon1
Bigchillghost wrote:Moreover, there's gonna be plenty of work to get all the meshes by hand. Is it possible to write a tool with hex2obj built in to extract them automatically?
There are about 10 characters here. It will be MORE work to write a tool than to get all the meshes by hand.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 5:00 pm
by Acewell
i don't think this is a good way to learn Hex2obj either because you are looking
in an archive for model data as opposed to a typically much smaller model file.
you should look through past model threads here on Xentax and practice with several
actual model file samples opened with a hex editor and compare the data you see,
i think you will learn to find the correct data and patterns in no time. :)

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 5:57 pm
by Bigchillghost
daemon1 wrote:There are about 10 characters here. It will be MORE work to write a tool than to get all the meshes by hand.
There're still other two games of Ben 10 powered by the same engine that I'd like to get models from.
Actually there are over 17 characters in this game, so plus the other two there're gonna be more.
I know it's much easier to get them by hand than to write a tool but honestly I don't have enough experience to handle it, let alone time's litmited for me the following days.
Maybe I should first learn it piece by piece with much more simple samples as AceWell suggested when get enough time. Sorry for asking for that much.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Thu Dec 15, 2016 7:07 pm
by daemon1
Bigchillghost wrote:There're still other two games of Ben 10 powered by the same engine
Note that its possible in those other games format may be slightly different, and may require 3 different tools. I've seen that many times.

I'm not saying you're asking for too much, but understand, we also don't have much time.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Sat Dec 17, 2016 2:31 pm
by Bigchillghost
daemon1 wrote:Note that its possible in those other games format may be slightly different, and may require 3 different tools.
You're right. They are different, at least the textures no more start at 90 43 40 00. Well, it's getting harder for me then
coz I have no idea about how to identify the start address of these textures when they're put into one xbx file. How am
I supposed to do that? Is it really pure experience? There should be some reasons, right?

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Sat Dec 17, 2016 2:49 pm
by daemon1
Bigchillghost wrote:
daemon1 wrote:I have no idea about how to identify the start address of these textures when they're put into one xbx file. How am
I supposed to do that? Is it really pure experience? There should be some reasons, right?
The ways people store their data is very diverse. The only way is to learn how textures may look like, find some patterns inside of data, and then find a way to detect this.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Sat Dec 17, 2016 3:19 pm
by Bigchillghost
daemon1 wrote:The only way is to learn how textures may look like, find some patterns inside of data, and then find a way to detect this.
I can compare several dds files to figure out their common characteristics however these characteristics may only shared by the several files I compared. Namely I'm not likely to find out the real dds texture patterns. I really have done some research myself, by comparing dds maps with different sizes, but only find that they do have a 0x80 header like this:
0x80.jpg
And the four bytes of 0x0000000C to 0x0000000D and 0x00000010 to 0x00000011 are the data of their sizes. But that's all I can do I'm afraid.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Sat Dec 17, 2016 7:44 pm
by shakotay2
Bigchillghost wrote:Is it possible to write a tool with hex2obj built in to extract them automatically? If only I know what to do about it.
Such tool can be created using this project: viewtopic.php?f=29&t=12756

It requires that you do a format analysis and have some C coding skills.

There's some assumed pattern in g_ad.ps3 (B401581D00000000) which could hint to submeshes (10x?):
g_ad-ps3.JPG
H2O file for 6th submesh (table at 0x129000):

0x12ABA0 1728
Vb1
20 12
0x1291C0 330
120000
0x0 255

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Tue Dec 20, 2016 2:07 pm
by Bigchillghost
daemon1 wrote:Models are simple 1-mesh models (at least from the first look)

Image
I've read the tutorial again and again and indeed I've learned a little more than before. However I'm still not quite good at this:
g_hm_ps3.jpg
(Also tried the g_hm.xbx, with similar results)
Seems I'm on the right track of the trick. But how should I exactly identify the correct start address of the face indices ? I've tried almost every address of these zero bytes between the gap but the vertices are always wrong.

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Tue Dec 20, 2016 2:11 pm
by Bigchillghost
And here the result for the g_hm.xbx:
g_hm_xbx.jpg

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Tue Dec 20, 2016 3:19 pm
by shakotay2
Bigchillghost wrote:But how should I exactly identify the correct start address of the face indices ?
This is the code for *.ps3 files (pFBuf: pointer to file buffer):

Code: Select all

            pFBuf= pTmp ; pFBuf += addr[cnt+1]-24 ; j = addr[cnt+1]-24 ;    // use next address [cnt+1]
            while (*pFBuf==0){
                pFBuf--; j-- ;
            } 
            addrFI = j - 2*dwFaceIndCnt[cnt] ; addrFI++ ;
where addr[] contains the addresses of the pattern I spoke of in a former post.

As you can see it's very simple code. So I'd suggest to learn C (or any other programming or script language).

Up to then you might try out this tool (for ps3 only) to create the H2O files for you:
MakeH2O-bins-Ben10UA.zip
btw: H2O file for the last submesh is always wrong; no time to care for that
(also tested on three *.ps3 files only)

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Tue Dec 20, 2016 3:31 pm
by Acewell
Bigchillghost wrote:Image
g_hm.ps3 :D
g_hm_ps3.png

Re: How to Get Ben 10 Ultimate Alien: Cosmic Destruction Mod

Posted: Tue Dec 20, 2016 6:17 pm
by Bigchillghost
AceWell wrote: g_hm.ps3 :D
g_hm_ps3.png
Thanks! Actually I did have tried that startaddr of the face indices, but using a wrong vertices startaddr. Since 4532*44(dec) equals 0x30af0, subtract it from 0x1b3b00 we get 0x183110. Then why should the correct address be 0x182fe0? And I'm still confused about the FVFsize and UV pos. How can I know the vertex block size is 44 bytes and get the correct UV pos? Is that acquired by trial 'n error? Or are there other ways to do that?