Renderware Delta Morph Mesh ripping and repacking - Printable Version +- The VG Resource (https://www.vg-resource.com) +-- Forum: The Resources (https://www.vg-resource.com/forum-109.html) +--- Forum: The Models Resource (https://www.vg-resource.com/forum-111.html) +---- Forum: Ripping Help (https://www.vg-resource.com/forum-115.html) +---- Thread: Renderware Delta Morph Mesh ripping and repacking (/thread-39756.html) |
Renderware Delta Morph Mesh ripping and repacking - Sonikku A - 10-08-2021 Renderware is a graphics suite used by most companies around the 7th console Gen. Most notably GTA SA-VC, though that unfortunately does not use DMA delta morphs The game in question is Shadow The Hedgehog, which uses Renderware version 3.7 In the event.one files, DFF and DMA pairs of the "cheek" files contain the facial mesh info for morphs. If RWanalyze is used, you can even see what the name for the morphs are For Sonic and co (bar Vector, he doesn't use morphs for the face), the mesh names are; cheek_a cheek_i cheek_u cheek_la cheek_ni For Gun Commander and the President; head_a head_i head_u head_e head_o head_la head_ni Unfortunately, the current DFF tools only rip the base "neutral" pose, and editing it while being unable to edit the other meshes causes issues Here are the files: https://mega.nz/file/xuxwAY7K#fL5Th115nk4TbRoWzLUKjV1PuCPIOstPChvV3Iybhho From my research and the RW SDK docs, it seems the DMAs simply are animation timers, while the morph PLG contains all the vertex info in the DFF I'd be grateful for the help, and hope to see custom facial anims for cutscenes! RE: Renderware Delta Morph Mesh ripping and repacking - loginmen - 12-12-2021 Hi, I'm also working on this issue (but only on another game Silent Hil Origins for ps2, I don't know the version of the engine). Here's what I was able to dig myself The structure delta morph plg (0x122) is as follows (at least in my version of the engine, it seems like yours, even the constants are the same): Code: struct Base{ Code: unknown unknown size count name Code: Travis_Eyes_Open data2 very close (in values) to mesh bounding sphere It remains to decrypt data0 and well done RE: Renderware Delta Morph Mesh ripping and repacking - Nooga - 12-12-2021 Xentax forums might be a good place to ask, they're pretty cluey about reverse engineering stuff. RE: Renderware Delta Morph Mesh ripping and repacking - loginmen - 12-22-2021 I found solution, simple lossless compression, RLE first bit flag (mask 0x80) if 1 then include indices else exclude, other bits data (mask 0x7F) data1 contains deltas, vertices, normals, colors and uv by flags from first unknown number (18 is vertices and normals) example Code: FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE 92 FE : 0xFE & 0x80 != 0 -> include, count: 0xFE & 0x7F = 0x7E = 126 92 : 0x92 & 0x80 != 0 -> include, count: 0x92 & 0x7F = 0x12 = 18 in result 126 + ... + 126 + 18 = 1908, include all indices from 0 to 1908 for my model eyes open and smile RE: Renderware Delta Morph Mesh ripping and repacking - Sonikku A - 01-25-2022 Woah, glad to see someone looked at this thread I wonder if there's a way to repack this for edits RE: Renderware Delta Morph Mesh ripping and repacking - loginmen - 01-25-2022 (01-25-2022, 04:48 AM)Sonikku A Wrote: I wonder if there's a way to repack this for editsMy game uses this too and I have no idea how its store as animation, I can extract only static meshes for every state. Animation data store in dma This video may be helpful https://www.youtube.com/watch?v=6Cain-u9_g4 uses states exported from dff and use dma params and create animation RE: Renderware Delta Morph Mesh ripping and repacking - Sonikku A - 01-25-2022 You have private messaging disabled. I can't respond to your message regarding discord RE: Renderware Delta Morph Mesh ripping and repacking - Sonikku A - 02-15-2022 In recent news, ripping delta morphs, and ripping/editing DMAs are now possible with Psycrow's Blender plugin here: https://github.com/Psycrow101/Blender-3D-SH-Dma-plugin There's one issue though: Custom morphs aren't possible yet, likely due to handling normals DeadlyFugu's notes on Deltas: ``````````` struct DeltaMorphPLG { // NOTE: for some absurd reason this struct is NOT aligned after each string, meaning most of the data is misaligned u32 targetCount; struct { u32 nameLength; char name[nameLength]; // null terminated, name length includes null character u32 flags = {2, 12}; // 0x10: has morphNormals u32 unknown = {2, 6}; u32 mappingLength; u32 morphVertexCount; // mapping is a series of bytes each representing a run of vertices // lowest 7 bits is length // if highest bit is 1 then vertices start..length are included // in morphVertices, else they are excluded // 'start' is the end of the run // e.g. 830281 means: // 3 vertices 0,1,2 included (0x83) // 2 vertices 3,4 excluded (0x02) // 1 vertex 5 included (0x81) // vertex 5 would have it's position delta stored in morphVertices[3] u8 mapping[mappingLength]; // values added to each vertex // mapping from morphVertex index to real vertex index given // by above mapping array struct { float x, y, z; } morphVertices[morphVertexCount]; if (flags & 0x10) { struct { float x, y, z; } morphNormals[morphVertexCount]; } // bounding sphere? float x, y, z; float radius; } target[targetCount]; } ````````````` |