Engineer shak-otay Posted January 28 Engineer Posted January 28 (edited) We'll need another method than usual to create triangle strips without extra lines/faces: indices (groups) g SM1 f 30/30 32/32 31/31 f 31/31 32/32 33/33 f 32/32 34/34 33/33 f 33/33 34/34 35/35 g SM4 (2) f 44/44 46/46 45/45 f 45/45 46/46 47/47 f 46/46 48/48 47/47 f 47/47 48/48 49/49 f 48/48 50/50 49/49 f 49/49 50/50 51/51 g SM5 (3) f 50/50 52/52 51/51 f 51/51 52/52 53/53 f 52/52 54/54 53/53 f 53/53 54/54 55/55 f 54/54 56/56 55/55 f 55/55 56/56 57/57 A further split of sub mesh 2) shows the problem, two overlapping faces (which share one vertex only, interestingly): edit: there's 3 overlapping faces, to be precise. (If we decided to claim the upper face being the wrong one we'd loose a vertex, btw. So the lower one is the troublemaker, imho. Instead of the most right lower vertex it should connect to the more left one... I swapped its indices but lost overview somehow... Edited January 28 by shak-otay 1
huckleberrypie Posted January 29 Author Posted January 29 13 hours ago, shak-otay said: We'll need another method than usual to create triangle strips without extra lines/faces: indices (groups) g SM1 f 30/30 32/32 31/31 f 31/31 32/32 33/33 f 32/32 34/34 33/33 f 33/33 34/34 35/35 g SM4 (2) f 44/44 46/46 45/45 f 45/45 46/46 47/47 f 46/46 48/48 47/47 f 47/47 48/48 49/49 f 48/48 50/50 49/49 f 49/49 50/50 51/51 g SM5 (3) f 50/50 52/52 51/51 f 51/51 52/52 53/53 f 52/52 54/54 53/53 f 53/53 54/54 55/55 f 54/54 56/56 55/55 f 55/55 56/56 57/57 A further split of sub mesh 2) shows the problem, two overlapping faces (which share one vertex only, interestingly): edit: there's 3 overlapping faces, to be precise. (If we decided to claim the upper face being the wrong one we'd loose a vertex, btw. So the lower one is the troublemaker, imho. Instead of the most right lower vertex it should connect to the more left one... I swapped its indices but lost overview somehow... Could this be at least worked around tho?
Engineer shak-otay Posted January 29 Engineer Posted January 29 (edited) Why not - but how? I had success with other PS2 models when removing doubles before creating faces. Didn't work here so far. v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 v -6.245219 -2.955531 1.904739 vt 0.543824 0.324257 v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 edit: I was so focussed on uvs that I didn't realize how weird this mesh is; need a better one as an example. Here it worked: Edited January 29 by shak-otay
huckleberrypie Posted January 29 Author Posted January 29 12 hours ago, shak-otay said: Why not - but how? I had success with other PS2 models when removing doubles before creating faces. Didn't work here so far. v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 v -6.245219 -2.955531 1.904739 vt 0.543824 0.324257 v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 edit: I was so focussed on uvs that I didn't realize how weird this mesh is; need a better one as an example. Here it worked: You mean I should remove the lines "v -6.143348 -2.421984 4.871326" or similar in the models?
Eraea Posted January 29 Posted January 29 12 hours ago, shak-otay said: Why not - but how? I had success with other PS2 models when removing doubles before creating faces. Didn't work here so far. v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 v -6.245219 -2.955531 1.904739 vt 0.543824 0.324257 v -6.143348 -2.421984 4.871326 <<<<< vt 0.539001 0.373505 edit: I was so focussed on uvs that I didn't realize how weird this mesh is; need a better one as an example. Here it worked: A little thoughts on this, I've been working on a PS2 model file also and encounter this. In my file there seem to be a sort of identifier for that the vert index being in the pack is the start of a UV Island and when I built submeshes based on those I got a cleaner model, but I checked sample files from this and I don't see the same structure as mine. 1
Engineer shak-otay Posted January 30 Engineer Posted January 30 7 hours ago, huckleberrypie said: You mean I should remove the lines "v -6.143348 -2.421984 4.871326" or similar in the models? No. I meant to use blender to remove doubles.
huckleberrypie Posted January 30 Author Posted January 30 1 hour ago, shak-otay said: No. I meant to use blender to remove doubles. I see. So the only recourse for now would be to fix the model manually. 😛
Eraea Posted February 3 Posted February 3 (edited) On 1/23/2025 at 11:14 AM, roocker666 said: OK, each mesh has a header and some unknow bytes are there. I chose these as ID "80 00 00 00 40 02 30 12 05 00 00" to collect all meshes but bytes "40 02" changes in some meshes so now I chose only these bytes as ID: 30 12 05 00 00. Now it reads all meshes but we have a new problem, there are a lot of extra faces, lol(this shit always happens with PS2 models). I guess you can delete those manually. Yes, UVs look fine I think. Here is the script if you want to test it fmt_the_sopranos_ps2_sgp2.py 1.46 kB · 7 downloads Was checking out the samples and in 0x15300 the Integer value of 59600 corresponds with the what I refer as the model's chunk size. Assuming the first 16 bytes are header info we skip the value right at the start of the chunk data 0x15310 we end up at the end of the mesh. Each model should be made of multiple submeshes, where the information is also stored alongside it's name, in 0x15310, the submesh has 54 verts packed in 32 bytes, in total 1728 bytes, where the vert data starts at 0x1530C, and an additional 4 bytes of 00 00 00 17 that end the submesh chunk. Reading only within the model's total chunk gives me 21 Submeshes in total, which are built correctly, and if I build more it gets broken. Also, I think the 4 bytes right before the vert data is how it should build the faces to fill blanks but curious as to why its only per submesh that it changes, and not stored as a flag along with the verts This was actually alot closer to the PS2 Format I was working on before than I thought when I looked more clearly into the file's structure Edited February 3 by Eraea typo fix and some additional info 3
huckleberrypie Posted February 4 Author Posted February 4 On 2/3/2025 at 9:36 AM, Eraea said: Was checking out the samples and in 0x15300 the Integer value of 59600 corresponds with the what I refer as the model's chunk size. Assuming the first 16 bytes are header info we skip the value right at the start of the chunk data 0x15310 we end up at the end of the mesh. Each model should be made of multiple submeshes, where the information is also stored alongside it's name, in 0x15310, the submesh has 54 verts packed in 32 bytes, in total 1728 bytes, where the vert data starts at 0x1530C, and an additional 4 bytes of 00 00 00 17 that end the submesh chunk. Reading only within the model's total chunk gives me 21 Submeshes in total, which are built correctly, and if I build more it gets broken. Also, I think the 4 bytes right before the vert data is how it should build the faces to fill blanks but curious as to why its only per submesh that it changes, and not stored as a flag along with the verts This was actually alot closer to the PS2 Format I was working on before than I thought when I looked more clearly into the file's structure I can't wait for the update 😄
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now