READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (._X3)

Post questions about game models here, or help out others!
uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (._X3)

Post by uyjulian » Mon Jul 17, 2017 6:12 am

I'm not that familiar with 3D formats, so I need help to convert model files (._X3) from Sora the 3rd to .obj or .ply files.
Here's a ingame screenshot a scene that contains the model:
Image
Another tool, called GameViewer, which is available at https://github.com/prefetchnta/gameviewer can view, but not export as 3D model, these model files:
Image

Here's a sample of the file + textures: https://transfer.sh/CG9oD/sora_3rd_sample.zip

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by shakotay2 » Mon Jul 17, 2017 8:32 pm

uyjulian wrote:Another tool, called GameViewer, [...] can view, but not export as 3D model, these model files
a viewer that doesn't have an export option? :D Very funny. :roll:

Anyways, the format appears to be simple, but there's about 721 assumed small submeshes (SMs) in the sample file.
So a script is required to gather them all.
You might try a 3D ripper on a scene loaded by that famous viewer, so that you can rip some meshes, hopefully.

I used hex2obj (view link in my sig) to get one of the bigger SMs displayed:
U7000_X3.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by uyjulian » Tue Jul 18, 2017 3:24 am

Thanks!
Image
Image
Image

I think all I need to do is figure out the space between CD3DFile_Mesh and the start of the vertices data.

uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by uyjulian » Tue Jul 18, 2017 6:40 pm

Here's my progress so far:
Image
https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc

Anybody know how to map textures?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2695
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 668 times
Been thanked: 1380 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by shakotay2 » Tue Jul 18, 2017 8:05 pm

well done, see you used python.

I wrote a short C program (not as short as your script :D ), same result:
U7000_X3-all.jpg
texturing, iirc goes like this: select object, create material, apply texture. (Or simply open an image in UV/Image editor.)

Since there's so many submeshes (SMs) it would make sense to create mtl files via code.
But there's 21 .png textures only which are listed at the beginning of the _X3 file. So some grouping of SMs is required, I guess.

I tried to apply U70i1104.png (books) manually but I couldn't find a fitting uv map.

U70i3804.png appears to fit nicely. So that's maybe a way to find the connection between texture and mesh(es) in the _X3 file.

Code: Select all

   cnt= 0 ;
   nValue[0]= 0; nValue[1]= 0; nValue[2]= 1; nValue[3]= 0; nValue[4]= 2; nValue[5]= 0;    // 0000 0100 0200
   do {
        offs2 = FindBytes(lpFBuf, j, dwFileSize-j, nValue, 6) ;       // j is offset here
        if (offs2!=0) {
            pFBuf += offs2 ; j += offs2 ;
            FIaddr_arr[cnt]= j ; pFBuf -= 4 ; j -= 4 ;
            GetDW(pFBuf, j, FIcnt, false) ; FIcnt_arr[cnt]= FIcnt ;
                //fprintf( stream, "# %3d 0x%x: %d\n", cnt, FIaddr_arr[cnt], FIcnt) ;
            if (cnt<1998) cnt++ ; else { chMB("Too many submeshes!\nbreak") ; j= dwFileSize ;}
        }
        { pFBuf += 7 ; j += 7 ; }     // 
   } while ((offs2!=0)&&(j<dwFileSize)) ;
   FIaddr_arr[cnt]= dwFileSize ;        // wichtig für Endabfrage

   cntMax= cnt ; cnt= 0 ;   //
   do {
        log_FIs(stream, FIaddr_arr[cnt], minFaceInd, maxFaceInd, lastFaceInd, FIcnt_arr, cnt) ;
        addrV= FIaddr_arr[cnt] -4 - vCnt_arr[cnt] * 40 ; Vsum += vCnt_arr[cnt] ;
        fprintf( stream, "# vertex addr: 0x%x\n", addrV) ;
        log_Verts(addrV, vCnt_arr[cnt], 40) ; logUVs(addrV+32, vCnt_arr[cnt], 40) ;
        cnt++ ;
   } while (cnt<cntMax);
   fprintf( stream, "# vertex sum: %d\n", Vsum) ;
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by uyjulian » Wed Jul 19, 2017 4:42 am

There appears to be multiple textures in a set of faces, and I have no idea which face goes with which texture.
Here's my progress so far:
https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc
Image
Here's some areas of the mesh area that I can't figure out:
Image
Image
Image

uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by uyjulian » Wed Jul 19, 2017 4:26 pm

Okay, so here's another sample:
https://transfer.sh/nu3jC/sora_3rd_2.zip

Image
The new sample was formatted a bit differently so I adjusted my script.
https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc

uyjulian
ultra-n00b
Posts: 7
Joined: Thu Dec 10, 2015 2:04 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by uyjulian » Thu Jul 27, 2017 5:52 am

Textures have been mapped!!!!
Image
New script at https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc

I'll make a blender plugin later

User avatar
lionheartuk
double-veteran
double-veteran
Posts: 674
Joined: Tue May 16, 2006 10:55 pm
Location: Tokyo, Japan
Has thanked: 24 times
Been thanked: 22 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by lionheartuk » Sat Nov 04, 2017 10:34 am

Were you ever able to create a blender script at all?

I saw your script above but I'm a little unsure how to use it, it doesn't appear to be a python script, but a .moon script, which is a subset of LUA?

I'm a little out of my depth here though.
"Lemons are people nice hardworking & honest people too..."

Karpati
mega-veteran
mega-veteran
Posts: 303
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 7 times
Been thanked: 58 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by Karpati » Sun Nov 05, 2017 3:54 pm

uyjulian,

Can you tell me which script did you use to extract the .dir/.dat files correctly?

I did try the following script on the
The Legend of Heroes Trails in the Sky SC (2015)
The Legend of Heroes Trails in the Sky the 3rd (2017), but did not work correctly.

http://zenhax.com/viewtopic.php?f=9&t=6 ... rails#p119


The ED6Unpacker.exe works fine.

User avatar
lionheartuk
double-veteran
double-veteran
Posts: 674
Joined: Tue May 16, 2006 10:55 pm
Location: Tokyo, Japan
Has thanked: 24 times
Been thanked: 22 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by lionheartuk » Mon Nov 06, 2017 4:03 am

Karpati wrote:uyjulian,

Can you tell me which script did you use to extract the .dir/.dat files correctly?

I did try the following script on the
The Legend of Heroes Trails in the Sky SC (2015)
The Legend of Heroes Trails in the Sky the 3rd (2017), but did not work correctly.

http://zenhax.com/viewtopic.php?f=9&t=6 ... rails#p119


The ED6Unpacker.exe works fine.
Use Falconvert from here:

http://www.pokanchan.jp/dokuwiki/softwa ... nvrt/start

It'll also convert the textures, it just doesn't work for the stages unfortunatly.

Note: For stages the PSP and the vita version (especially vita) use .it3 files, there is a converter for those but it doesn't work correctly a lot of the time.
"Lemons are people nice hardworking & honest people too..."

Karpati
mega-veteran
mega-veteran
Posts: 303
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 7 times
Been thanked: 58 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by Karpati » Thu Nov 09, 2017 8:03 pm

I got the same result also:
You do not have the required permissions to view the files attached to this post.

User avatar
lionheartuk
double-veteran
double-veteran
Posts: 674
Joined: Tue May 16, 2006 10:55 pm
Location: Tokyo, Japan
Has thanked: 24 times
Been thanked: 22 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by lionheartuk » Fri Nov 10, 2017 2:42 am

Karpati wrote:I got the same result also:
Are you using a special plugin to make that work?

Searching on the website I can't see support for the kiseki formats at all.
"Lemons are people nice hardworking & honest people too..."

Karpati
mega-veteran
mega-veteran
Posts: 303
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 7 times
Been thanked: 58 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by Karpati » Fri Nov 10, 2017 6:49 am

lionheartuk wrote:Searching on the website I can't see support for the kiseki formats at all.
The answer is very simple: it is an unreleased v6.521. The latest released version is v6.520.

User avatar
lionheartuk
double-veteran
double-veteran
Posts: 674
Joined: Tue May 16, 2006 10:55 pm
Location: Tokyo, Japan
Has thanked: 24 times
Been thanked: 22 times

Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.

Post by lionheartuk » Sat Nov 11, 2017 3:46 am

Karpati wrote:
lionheartuk wrote:Searching on the website I can't see support for the kiseki formats at all.
The answer is very simple: it is an unreleased v6.521. The latest released version is v6.520.
I see.

Will the new update support the file formats for environments from Sora no Kiseki FC and SC because those aren't ._x3

The First is .X so perhaps second is ._X2, I haven't checked the second games file format just yet.
"Lemons are people nice hardworking & honest people too..."

Post Reply