READ THE RULES: Click here

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

PC Danganronpa Despair Girls .BNC, .BTX Help

Post questions about game models here, or help out others!
anime663
veteran
Posts: 104
Joined: Mon Jun 04, 2012 1:45 am
Has thanked: 22 times
Been thanked: 2 times

PC Danganronpa Despair Girls .BNC, .BTX Help

Post by anime663 » Wed Jun 28, 2017 4:14 am

I was wondering if anyone could create a script for these files if possible.
Heres some samples of "pc00":
https://mega.nz/#!i4NXwKDI!6-TYJWoJeOxG ... oUwUuYAKJY
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.

Simguy
beginner
Posts: 25
Joined: Mon Jul 23, 2007 7:11 pm
Has thanked: 16 times
Been thanked: 24 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by Simguy » Thu Jun 29, 2017 2:44 am

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_ ... yVsQIDyppc 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.

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Thu Jun 29, 2017 3:56 am

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):
pl00_ac_face-bnc.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."

User avatar
Supurreme
advanced
Posts: 40
Joined: Mon Jun 05, 2017 10:50 am

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by Supurreme » Sat Jul 15, 2017 7:15 am

Has any progress been made on figuring these files out? I`d like to rip the models myself sometime
Hey I'm Mimi! Please have mercy on me, I'm still learning!

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Mon Aug 28, 2017 9:02 pm

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.
pl00_ac_face_2SMs.jpg
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
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."

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Mon Mar 19, 2018 5:00 pm

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.

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Mon Mar 19, 2018 7:29 pm

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:
pl00_ac_face.jpg
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
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."

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Mon Mar 19, 2018 8:48 pm

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.

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Tue Mar 20, 2018 1:53 am

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?

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Tue Mar 20, 2018 7:52 pm

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? :)
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
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
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."

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Tue Mar 20, 2018 8:43 pm

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.

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Tue Mar 20, 2018 10:47 pm

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:
bodyD1.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."

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Tue Mar 20, 2018 11:14 pm

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.

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: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by shakotay2 » Sun Mar 25, 2018 8:49 pm

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.)
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."

akderebur
ultra-veteran
ultra-veteran
Posts: 395
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 50 times
Been thanked: 391 times

Re: PC Danganronpa Despair Girls .BNC, .BTX Help

Post by akderebur » Sun Mar 25, 2018 10:03 pm

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.

Post Reply