XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Jul 21, 2018 1:17 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Wed Jun 28, 2017 4:14 am 
Offline
veteran

Joined: Mon Jun 04, 2012 1:45 am
Posts: 98
Has thanked: 17 times
Have thanks: 1 time
I was wondering if anyone could create a script for these files if possible.
Heres some samples of "pc00":
https://mega.nz/#!i4NXwKDI!6-TYJWoJeOxGPi6juFRinsKQSMYGOcqj5oUwUuYAKJY
Ones with _anm are animation I believe, and .BTX are the textures.
The .bnc each have a header with "PSCa" and the BTX files seem to have something close to a DDS header.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Thu Jun 29, 2017 2:44 am 
Offline
beginner

Joined: Mon Jul 23, 2007 7:11 pm
Posts: 21
Has thanked: 14 times
Have thanks: 10 times
Luckily I was able to rip some textures with a profiler, because BTX files are DDS with repeating bytes trimmed.
https://mega.nz/#!7MtjFIiD!DtLV0KJQaSy_R_smzP8ClD3N8jgDmGeGbyVsQIDyppc This has a btx and a complete DDS that I ripped.
There is something going on with these that I don't fully understand, hopefully these will help someone smarter than me.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Thu Jun 29, 2017 3:56 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
anime663 wrote:
I was wondering if anyone could create a script for these files
noone can create a script before the format is known. So the first request would be for getting the format.
Anyways, the first submesh only (as always):


Attachments:


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


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Sat Jul 15, 2017 7:15 am 
Offline
n00b
User avatar

Joined: Mon Jun 05, 2017 10:50 am
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
Has any progress been made on figuring these files out? I`d like to rip the models myself sometime


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Mon Aug 28, 2017 9:02 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
the format appears to be rather simple so I don't know why you don't care for yourself since I showed how to get the first submesh?

There's some ugly extra faces, though, but I don't have the time to care for.

search for 0000 0100 0200 gives 5 finds where the first one is not valid, I guess.

So these are starting points of face indices blocks (fi count):
0x83C50 (2307) 1st submesh
0x84e56 (1941) 2nd SM
0x85d80 (294)
0x85fcc -0x862FC (408)

assumed start address of vertices for 2nd SM:
0x333e8 +2143x72 (dec.) = 0x58EA0

H2O file for 2nd SM:

0x84E56 1941
Vb1
72 24
0x58EA0 1778
020000
0x0 255


Attachments:


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


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Mon Mar 19, 2018 5:00 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
Has anyone made some progress with this?

I tried giving it a go, using shakotay's example, and got the meshes like this :
Image

First one is okay, but the second one seems to have some vertices in wrong coordinates. I believe the data is read correctly, so I don't know why it ends up like that. I mean every vertex has a block size of 72 bytes with no exception, so it isn't like the program is skipping to wrong offset or anything.

The third and the fourth meshes seem really wrong too but I want to focus on the second one first. Any help or opinion would be appreciated.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Mon Mar 19, 2018 7:29 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
akderebur wrote:
First one is okay, but the second one seems to have some vertices in wrong coordinates.
I don't care for those models, just for sake of the superfluous faces. For one model I found it simple to just erase them manually:

but there's a good chance to solve it via code, simply replace all vertices like v 0.000000 -0.090487 0.003321
(x coord==0.0) by v 0.0 0.0 0.0


Attachments:


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


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Mon Mar 19, 2018 8:48 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
shakotay2 wrote:
but there's a good chance to solve it via code, simply replace all vertices like v 0.000000 -0.090487 0.003321
(x coord==0.0) by v 0.0 0.0 0.0


I tried that, but it ended up like this :
Image

Also I have tried getting the first mesh from "pl00_bodyD1.bnc" and got something completely broken. It might be that I have the offsets wrong but I think I got them right. UV seems fine.
Image

Can you take a look when you have the time? Do you think the problem is just related to the faces? It looks too broken to me to just be faces, but I am not sure.

Thank you very much for your help.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Tue Mar 20, 2018 1:53 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
Hmm I have found out something interesting. In the "pl00_ac_face.bnc" there is this byte set right after the uvs in every vertex block : FE FE FE FF. For the first mesh vertices I have noticed that it is always followed by lots 0s. For other meshes it is occasionally followed by "00 00 80 3F", "00 00 00 40", "00 00 40 40". So 1, 2, 3 in float but I don't know what it should represent. Basically it is a value other than 0.

So for those vertices that don't have "00 00 00 00" right after "FE FE FE FF", I set the vertex coordinates to 0 0 0. It turned out much better. It seems to have just affected those vertices that were positioned away from the face.
Image

I am starting to think that those values after the "FE FE FE FF" are related to reading the vertices correctly. I mean it couldn't be a coincidence that the wrong/out of place vertices are being affected.

Edit:
It actually looks like bone indices and weights. After "FE FE FE FF" there are 4 floats (why floats?) for bone indices, and 4 floats for weights.

So there isn't like any extra offset or something to fix the vertex positions. I can just conclude that the vertices that have influences other than bone0 appear in wrong position. I have no idea how to fix that though. Do you think we need the skeleton?


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Tue Mar 20, 2018 7:52 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
akderebur wrote:
So for those vertices that don't have "00 00 00 00" right after "FE FE FE FF", I set the vertex coordinates to 0 0 0. It turned out much better.
So is it fixed or not? :)

Quote:
I can just conclude that the vertices that have influences other than bone0 appear in wrong position. I have no idea how to fix that though.
Is there something special with bone ids or weights for those extra vertices which need to be set to v 0.0 0.0 0.0

Quote:
Do you think we need the skeleton?
So you mean face bones? Dunno.
I think it could help if you made a list with vertices, bone ids and weights with the extra vertices marked.

such as
v 0.004502 -0.058517 0.011331 0 1 2 3 0.2 03 0.25 0.25
v 0.000000 -0.045317 0.013346 1 2 3 4 0.2 03 0.2 0.3 -> set to v 0.0 0.0 0.0

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Tue Mar 20, 2018 8:43 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
shakotay2 wrote:
So is it fixed or not? :)

No, I couldn't fix it completely. Setting the vertices to v0 0 0 just kinda hides them, it isn't the right coordinate.

shakotay2 wrote:
Is there something special with bone ids or weights for those extra vertices which need to be set to v 0.0 0.0 0.0

Are you sure those are extra vertices?. It seems to me like they are normal vertices but they just have different bones influencing them, and for some reason they have weird coordinates. Only vertices that have correct coordinates are the ones that are just influenced by bone0 (all of the first mesh and some vertices of the other meshes).

With models that have more bones you can see that it gets worse. For example these are the meshes from the body model "pl00_bodyD1.bnc" :
Image

The vertices are all over the places. I haven't seen a proper mesh there. Most of the vertices have 3-4 bones influencing them in this model.

From what I see if the vertices are influenced by bone0 only (which I think has the coordinate 0 0 0, so it isn't really doing anything), the mesh loads fine, meaning all of the vertices are in correct coordinates. If there are other bones, the coordinates become wrong. I don't want to say wrong but maybe they are relative to the bones that influence them? I don't know if something like that is reasonable/possible in a model format.

I will try making a list like you suggested. Btw if you have the time can you try getting a mesh from one of the body models? I want to make sure that I am not reading the wrong data. Like maybe the first mesh from "pl00_bodyD1.bnc".

Also thank you again for looking into this.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Tue Mar 20, 2018 10:47 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
akderebur wrote:
Like maybe the first mesh from "pl00_bodyD1.bnc".
yep, looks weird. Chosing 500 face indices only makes it look better but I don't know where to proceed with the next vertices to get a proper (sub) mesh.

It's strange that pl00_weapon00 doesn't have such problems, maybe because it has no bones:


Attachments:


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


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Tue Mar 20, 2018 11:14 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
shakotay2 wrote:
It's strange that pl00_weapon00 doesn't have such problems, maybe because it has no bones:

Exactly. There is no problem with no bones/no skinning. As soon as there are some bones and weights it gets messy.

I may be completely wrong here but I think it might be similar to md5mesh. Like how vertex positions are stored based on the joint/bone space. So you would need to calculate the actual vertex position using the bone transformations and weight influences. I think the models like that weapon load fine because all vertices are connected to a single root bone placed at the origin(0, 0, 0). That would mean the joint space is same as the world space, so the vertex positions are fine.


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Sun Mar 25, 2018 8:49 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2311
Location: Nexus, searching for Jim Kirk
Has thanked: 524 times
Have thanks: 1198 times
I think I found some good information here:
https://stackoverflow.com/questions/108 ... -smd-model
Especially the part Vertex transformation.

(Not sure whether this will solve the problem here but there's a good chance, I guess.)

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: PC Danganronpa Despair Girls .BNC, .BTX Help
PostPosted: Sun Mar 25, 2018 10:03 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 194
Has thanked: 26 times
Have thanks: 147 times
That is somewhat what I had in mind, but maybe in reverse. Notice that in that link you posted it says all the vertex positions are in model space and need to be converted to bone space? I think in danganronpa files all of the vertices are already in bone space, and need to be converted to model space. I mean if they were in model space the meshes should have showed up fine just with vertex positions.

Anyway I think it is worth a try, but we need the skeleton. I have found these offsets, that might give some info.

Body - pl00_bodyD1
Offset (hex): 20 - 4 bytes - 125 (value) - I think it is the bone count
Offset (hex): 0CD0 - bone count * 16 bytes - So 16 bytes for each bone, I am thinking 4 floats. Last float is always 1. I suspect first 3 floats to be local bone position (relative to parent). I am not sure though.

For the face model offsets are 20 and 140.

There should also be something like a parent table that shows which bone is the parent of a specific bone. For the body model I am suspecting the data is either at A4 or 8A0, but it doesn't seem to match up with the bone count exactly.

I am not sure about these at all. It might be that there are matrices for bone transformations somewhere, or maybe blocks with both a position vector and quaternion for rotation. It is just that I haven't seen anything like that, so I though those floats might be the bone positions. Also they were near the bone names :D I will look further into it when I have the time.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 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