IDANAND Posted Monday at 01:51 PM Posted Monday at 01:51 PM Need help with Marmalade SDK (.group.bin) 3D mesh extraction - Tone Sphere Hello everyone! I am trying to extract 3D meshes from the mobile game Tone Sphere (Marmalade SDK). I used a script to split the mono .group.bin file into separate assets. Now I have a 1.4 MB file (dc3c2177) which definitely contains a 3D mesh. Here is what I found out using HEX and Model Researcher: Faces / Indices Offset: starts exactly at 0x15C550 (Format: 16-bit Unsigned Short). Maximum Index: 60288 Vertices: Located right before the faces, but they seem to use fixed-point math (IwFixed / Short_Signed with scaling), which causes a huge mess and wrong scaling when reading via Model Researcher. UV / Normals: Also packed right before the vertices. Could anyone help me write a quick Noesis plugin or a Python script to properly parse this mesh? I can provide the sample file! Thanks in advance! dc3c2177.zip
Engineers shak-otay Posted yesterday at 09:16 AM Engineers Posted yesterday at 09:16 AM (edited) Hi, you missed to tell where the vertices start? I could only find some strange point cloud: edit: big parts seem to contain texture data: Edited yesterday at 09:38 AM by shak-otay
IDANAND Posted yesterday at 11:04 AM Author Posted yesterday at 11:04 AM Indices Offset: 0x15C550 Indices Type: UInt16 (Short) Indices Count: 16 026 (5342 triangles) Max Index Value: 2667 (Which means Vertex Count = 2668) Vertices Offset: 0x1586C8 Vertex Type: Int16 (Short) Stride: 6 bytes (Pure X, Y, Z by 2 bytes each) Coordinate Scale (Fixed-point): Try dividing by 4096.0 or 256.0 (Standard Marmalade SDK shift).
IDANAND Posted yesterday at 11:06 AM Author Posted yesterday at 11:06 AM I can assume that there are 3 models there at once
Engineers shak-otay Posted yesterday at 12:06 PM Engineers Posted yesterday at 12:06 PM (edited) Thanks. Which file is it for? For dc3c2177 your face index parameters would break the file end (15C79F), 0x15C550 + 16026x2 (dec.)= 0x164284 Your vertex offset doesn't show me a decent mesh: edit: the vertices start at 0x155D38, see one of my next posts Edited yesterday at 01:53 PM by shak-otay
IDANAND Posted yesterday at 12:28 PM Author Posted yesterday at 12:28 PM (edited) thank For file dc3c2177. Honestly, I don't quite understand how to search for vertices, so I'm just pointing my finger at it. Perhaps I've send the parameters for a different file altogether. I was checking the lesson level file. What I send is the title screen. And I also know there may be multiple models embedded there. Or it's not a model at all, but a level scene. And file 8081e087 is just its name, it says title screen there Edited yesterday at 12:29 PM by IDANAND
IDANAND Posted yesterday at 12:37 PM Author Posted yesterday at 12:37 PM https://drive.google.com/file/d/1JLP_TtjDKwTE8OJrBkzFC87Lxj9s7vlv/view?usp=drive_link Here's a link to all the assets used there. The models are also in group.bin.
Engineers shak-otay Posted yesterday at 01:04 PM Engineers Posted yesterday at 01:04 PM In Backgroundcubes.group.bin I found this but it's hard to extract from the point cloud:
Members other1 Posted yesterday at 01:04 PM Members Posted yesterday at 01:04 PM In dc3c2177 there are multiple meshes, for the last one: At 1421408, 320 x 3 shorts (position?) At 1423344, 320 x 3 shorts in range [-4096;4096] (normals?) At 1425278, 320 x 2 shorts (UV, divide by 4096) At 1426576, 384 shorts (indices) UV looks fine, but mesh is a mess 2
Engineers shak-otay Posted yesterday at 01:20 PM Engineers Posted yesterday at 01:20 PM (edited) When you use unsigned shorts it looks more like a cube: edit: another one (I'd create a tool as soon as we get the meshes nicer): Similar for the background_cubes group.bin: Edited yesterday at 02:06 PM by shak-otay
IDANAND Posted 16 hours ago Author Posted 16 hours ago Here are the ingame screenshots of what these meshes should look like. First one is the single crystal Or a few crystals.
IDANAND Posted 16 hours ago Author Posted 16 hours ago 13 hours ago, other1 said: In dc3c2177 there are multiple meshes, for the last one: At 1421408, 320 x 3 shorts (position?) At 1423344, 320 x 3 shorts in range [-4096;4096] (normals?) At 1425278, 320 x 2 shorts (UV, divide by 4096) At 1426576, 384 shorts (indices) UV looks fine, but mesh is a mess Hey! Thanks for the render, but the mesh geometry looks distorted. In the original game, this crystal is a perfectly symmetrical, sharp, elongated octahedron (diamond shape). On your screenshot, it looks flattened and skewed on one side. Look a screenshot.
IDANAND Posted 16 hours ago Author Posted 16 hours ago 13 hours ago, shak-otay said: In Backgroundcubes.group.bin I found this but it's hard to extract from the point cloud: In this file, the wall should be completely white.
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