So I was right. Thats why Daemon failed.
@howfie: http://www.2shared.com/file/QReIYGqm/nina1u.html
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Tekken Hybrid
-
- Moderator
- Posts: 1007
- Joined: Mon Mar 23, 2009 2:57 am
- Has thanked: 44 times
- Been thanked: 505 times
Re: Tekken Hybrid
Quite the contrary, actually. Daemon Tools or any other virtual disc image software should work fine and for most PSX games and will allow you to copy data files straight out of the image. If it's failing then you probably have a screwed up disc image, although it's also possible you've stumbled upon an unusual game without a standard filesystem.gjinka wrote:So I was right. Thats why Daemon failed.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Tekken Hybrid
So I got a copy of tekken 3, mounted it, saw some files, but can only look at two of them (SCES_012.37, TEKKEN3.BNS)
The rest are the same situation.
The rest are the same situation.
Re: Tekken Hybrid
It's probably not a screwed up disk because I tried two and finale00 tried himself,MrAdults wrote: Quite the contrary, actually ... If it's failing then you probably have a screwed up disc image. filesystem.
And that's what I assumed, doesn't that make my assumption right?although it's also possible you've stumbled upon an unusual game without a standard filesystem.
Anyway, it seems somewhat similar to the standard ISO because few small file can be read.
You can have a look at a 4mb slice of the file I posted in the first post if you want. I'm not sure if it's worth it, though, Tekken Hybrid contains Tekken Tag Tournment HD, which has the same models from Tekken 3 (same design), only highpoly.
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Tekken Hybrid
Almost there... I figured out how the model is divided into surfaces... however... the tristrip format is really strange. For example, nina has the following surface indices:
Now this is where things get strange... the first surface, which are her breasts and upper back triangles, says there are 878 indices used, which means 876 triangles total. When rendered as a typical tristrip, all the triangles are there and are perfect, however, it appears that after a degenerate triangle occurs in the tristrip (which is quite common), the winding tends to, but not always, reverses itself, resulting in the following model (degenerate triangles have been removed).
Of course, if I render this as double sided, you see this:
It's really weird... there also appears to be duplicate surfaces... if I take one of them and flip it it seems to generate the right model. Ha ha ha, what a weird, wasteful way of doing this.
Code: Select all
size of vertex buffer in bytes = 160000
number of vertices = 5000
size of index buffer in bytes = 27132
number of indices = 13566
sum of surface indices = 13566
indices = 13566
leftover = 0
surface indices = 878
surface indices = 1266
surface indices = 878
surface indices = 577
surface indices = 88
surface indices = 95
surface indices = 31
surface indices = 126
surface indices = 41
surface indices = 577
surface indices = 96
surface indices = 99
surface indices = 115
surface indices = 178
surface indices = 116
surface indices = 743
surface indices = 12
surface indices = 21
surface indices = 154
surface indices = 34
surface indices = 18
surface indices = 14
surface indices = 102
surface indices = 72
surface indices = 26
surface indices = 1251
surface indices = 98
surface indices = 743
surface indices = 110
surface indices = 113
surface indices = 271
surface indices = 162
surface indices = 173
surface indices = 30
surface indices = 186
surface indices = 60
surface indices = 212
surface indices = 1064
surface indices = 34
surface indices = 102
surface indices = 26
surface indices = 33
surface indices = 5
surface indices = 41
surface indices = 36
surface indices = 12
surface indices = 12
surface indices = 28
surface indices = 28
surface indices = 28
surface indices = 28
surface indices = 18
surface indices = 23
surface indices = 38
surface indices = 38
surface indices = 34
surface indices = 30
surface indices = 22
surface indices = 22
surface indices = 317
surface indices = 8
surface indices = 164
surface indices = 20
surface indices = 94
surface indices = 15
surface indices = 36
surface indices = 17
surface indices = 36
surface indices = 16
surface indices = 16
surface indices = 30
surface indices = 4
surface indices = 27
surface indices = 8
surface indices = 40
surface indices = 11
surface indices = 22
surface indices = 9
surface indices = 20
surface indices = 25
surface indices = 28
surface indices = 8
surface indices = 16
surface indices = 14
surface indices = 30
surface indices = 6
surface indices = 40
surface indices = 33
surface indices = 76
surface indices = 8
surface indices = 58
surface indices = 302
surface indices = 186
surface indices = 18
surface indices = 122
surface indices = 18
surface indices = 200
Of course, if I render this as double sided, you see this:
It's really weird... there also appears to be duplicate surfaces... if I take one of them and flip it it seems to generate the right model. Ha ha ha, what a weird, wasteful way of doing this.
Re: Tekken Hybrid
Can you remind me what degenerate triangles are? You say they appear normal when filpped, which sounds like a normals issue.
Good job. Is there anything left in the file. Please post where stuff are (like a wiki) when you get the time.
Good job. Is there anything left in the file. Please post where stuff are (like a wiki) when you get the time.
-
- Moderator
- Posts: 1007
- Joined: Mon Mar 23, 2009 2:57 am
- Has thanked: 44 times
- Been thanked: 505 times
Re: Tekken Hybrid
Nope. That has nothing to do with whether Daemon Tools can successfully mount it. If you can't mount it then you've found quite a rarity amongst PSX games or you have a bad rip. If you can mount it but don't see files representing all of the data, then you simply have a case where the game is accessing additional data from extra-filesystem sectors.gjinka wrote:And that's what I assumed, doesn't that make my assumption right?
From what I read, all you posted was the first 4MB of the actual disc image, which isn't particularly useful. I also don't have the disc myself, I only have Tekken Tag Tournament for PS2, which exposes all of the data directly through the standard disc filesystem.gjinka wrote:You can have a look at a 4mb slice of the file I posted in the first post if you want. I'm not sure if it's worth it, though, Tekken Hybrid contains Tekken Tag Tournment HD, which has the same models from Tekken 3 (same design), only highpoly.
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Tekken Hybrid
A degenerate triangle is a triangle that has lost one or more dimensions. A non-degenerate triangle can only be drawn on a plane and its area is never zero. So triangle indices 0-1-2 marks a full triangle. 2-2-3 marks a degenerate one because now you don't have a triangle, you have a line since only two points are used to define the triangle. 3-3-3 is also degenerate since it's point. They commonly occur in tri-strips so they can change direction and skip over spaces. Degenerate triangles are also important in the optimization algorithm of Nelder and Mead.gjinka wrote:Can you remind me what degenerate triangles are? You say they appear normal when filpped, which sounds like a normals issue.
Good job. Is there anything left in the file. Please post where stuff are (like a wiki) when you get the time.
Yes, I haven't processed the skeleton yet. That is easy too... it's a header section followed by 0x40 byte entries where the first 3 floats per entry are the joint locations and the rest of the data is some kind of matrix. It is the only thing left in the file. Animations are stored somewhere else. These parts comes last. I will update post when I fix the tri-strip problem.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Tekken Hybrid
Oh, that's why I see a bunch of repeating indices all over the place.
Is there a common algorithm for processing those kinds of index buffers?
More over, you should add that to the wiki!
Is there a common algorithm for processing those kinds of index buffers?
More over, you should add that to the wiki!
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Tekken Hybrid
here is an example loop in max its pretty easy to follow.
StartDirection = -1
f1 = (ReadBEword f)
f2 = (ReadBEword f)
FaceDirection = StartDirection
while (ftell f) < (END) Do (
f3 = (ReadBEword f)
if (f3==0xFFFF) then (
f1 = (ReadBEword f)
f2 = (ReadBEword f)
FaceDirection = StartDirection
) else (
f3 += 1
FaceDirection *= -1
if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then (
if FaceDirection > 0 then append Face_array [(f1),(f2),(f3)]
else append Face_array [(f1),(f3),(f2)]
)
f1 = f2
f2 = f3
)
)
StartDirection = -1
f1 = (ReadBEword f)
f2 = (ReadBEword f)
FaceDirection = StartDirection
while (ftell f) < (END) Do (
f3 = (ReadBEword f)
if (f3==0xFFFF) then (
f1 = (ReadBEword f)
f2 = (ReadBEword f)
FaceDirection = StartDirection
) else (
f3 += 1
FaceDirection *= -1
if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then (
if FaceDirection > 0 then append Face_array [(f1),(f2),(f3)]
else append Face_array [(f1),(f3),(f2)]
)
f1 = f2
f2 = f3
)
)
Re: Tekken Hybrid
What? You are saying the same thing as last time.MrAdults wrote:Nope. That has nothing to do with whether Daemon Tools can successfully mount it. If you can't mount it then you've found quite a rarity amongst PSX games or you have a bad rip.
I can't add anything more to what I've said:
It's probably not a screwed up disk because I tried two and finale00 tried himself,MrAdults wrote: Quite the contrary, actually ... If it's failing then you probably have a screwed up disc image. filesystem.And that's what I assumed, doesn't that make my assumption right?although it's also possible you've stumbled upon an unusual game without a standard filesystem.
"Extra filesystem sector"?If you can mount it but don't see files representing all of the data, then you simply have a case where the game is accessing additional data from extra-filesystem sectors.
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Tekken Hybrid
Ok just panning out some thoughts... this is what's going on... all of a sudden the tristrip draws flipped triangles. It's not clear what the reset condition is because sometimes it does this after degenerates, but sometimes not. In the example above, the strip flips after 4 degenerates. It looks like 3 in the picture but LightWave says there's 4 so . Here's the data:
Code: Select all
00 00 01 00 02 00
03 00 04 00 05 00
06 00 07 00 08 00
09 00 0A 00 0B 00
0C 00 0D 00 0E 00
0F 00 10 00 11 00
12 00 13 00 14 00
15 00 16 00 17 00
18 00 19 00 1A 00
1B 00 1C 00 1D 00
1E 00 1F 00 20 00
21 00 21 00 22 00
22 00 23 00 02 00
24 00
degenerate: 20 00 21 00 21 00
degenerate: 21 00 21 00 22 00
degenerate: 21 00 22 00 22 00
degenerate: 22 00 22 00 23 00
strip flip: 22 00 23 00 02 00
So what's the data look like? As you can see... four consecutive degenerates again, but this time, the strip doesn't flip.
Code: Select all
3D 00 3E 00 3F 00
40 00 40 00 41 00
41 00 42 00 43 00
44 00 45 00 46 00
degenerate: 3F 00 40 00 40 00
degenerate: 40 00 40 00 41 00
degenerate: 40 00 41 00 41 00
degenerate: 41 00 41 00 42 00
stip noflip: 41 00 41 00 42 00
Code: Select all
surface 0
0
0
68 (always 68)
27228 (chest identifier)
3
0
0
0
0
2
0 (texture identifier)
65537
0 (offset)
878 (number of indices in surface)
Code: Select all
surface 2
1
1
68 (always 68)
27228 (chest identifier)
0
0
0
0
0
2
2 (texture identifier)
65536
2144 (offset)
878 (number of indices in surface)
Surface 0 uses:
Surface 2 uses:
So we're back to square one... each surface should draw the geometry correctly without the problem with the strips. It's definitely not a front/back surface type of thing. So guess what? It is time to give up lol. I'm going to conclude that this game uses double-sided polygons and that the triangle strips are fine. However, modelers like lightwave and maya are going to only use the vertex normals from the OBJ export for lighting and not for polygon direction. So in other words, when you load the model into a modeler you are going to see crap if using OBJ.
-
- double-veteran
- Posts: 929
- Joined: Fri Jul 08, 2011 12:06 pm
- Location: Torrance, CA
- Has thanked: 10 times
- Been thanked: 274 times
Re: Tekken Hybrid
Fixed! Had to write a function that flips triangles if computed normals do not match up with the average of the vertex normals. Almost ready for release.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times