XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Nov 18, 2018 9:06 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (._X3)
PostPosted: Mon Jul 17, 2017 6:12 am 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
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


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Mon Jul 17, 2017 8:32 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2493
Location: Nexus, searching for Jim Kirk
Has thanked: 599 times
Have thanks: 1277 times
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:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Tue Jul 18, 2017 3:24 am 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
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.


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Tue Jul 18, 2017 6:40 pm 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
Here's my progress so far:
Image
https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc

Anybody know how to map textures?


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Tue Jul 18, 2017 8:05 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2493
Location: Nexus, searching for Jim Kirk
Has thanked: 599 times
Have thanks: 1277 times
well done, see you used python.

I wrote a short C program (not as short as your script :D ), same result:

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:
   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) ;


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Wed Jul 19, 2017 4:42 am 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
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


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Wed Jul 19, 2017 4:26 pm 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
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


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Thu Jul 27, 2017 5:52 am 
Offline
ultra-n00b

Joined: Thu Dec 10, 2015 2:04 pm
Posts: 7
Has thanked: 2 times
Have thanks: 2 times
Textures have been mapped!!!!
Image
New script at https://gist.github.com/uyjulian/db43b5 ... 00bc78cfdc

I'll make a blender plugin later


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Sat Nov 04, 2017 10:34 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 654
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
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..."


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Sun Nov 05, 2017 3:54 pm 
Offline
mega-veteran
mega-veteran

Joined: Thu Dec 07, 2006 11:25 pm
Posts: 302
Has thanked: 6 times
Have thanks: 58 times
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=60&hilit=trails#p119


The ED6Unpacker.exe works fine.


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Mon Nov 06, 2017 4:03 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 654
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
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=60&hilit=trails#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..."


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Thu Nov 09, 2017 8:03 pm 
Offline
mega-veteran
mega-veteran

Joined: Thu Dec 07, 2006 11:25 pm
Posts: 302
Has thanked: 6 times
Have thanks: 58 times
I got the same result also:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Fri Nov 10, 2017 2:42 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 654
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
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..."


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Fri Nov 10, 2017 6:49 am 
Offline
mega-veteran
mega-veteran

Joined: Thu Dec 07, 2006 11:25 pm
Posts: 302
Has thanked: 6 times
Have thanks: 58 times
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.


Top
 Profile  
 
 Post subject: Re: Trails in the Sky / Sora no Kiseki SC / th3rd 3D file (.
PostPosted: Sat Nov 11, 2017 3:46 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 654
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
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..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot], Randomizator and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group