Pavel992 Posted January 4 Share Posted January 4 Hello everyone, I have *.mesh files (they were compressed using lz4). I can get a mesh from regular files (without zip 16 bytes per vertex [as 4 floats] and 16 bytes per uv [as 4 halfFloat channels]), but there are those that have ZIP in the name, then there are only 4 bytes per vertex, and on uv like this same 4 bytes. I wrote a script that reads vertices as UBYTE but they are flat, help me understand how to read them correctly. Thank you. (how to use the script, just drag *.mesh(Zip) onto it) Files.zip Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted January 4 Engineer Share Posted January 4 (edited) Guess they're not flat - you'll just need to scale them up in one direction: Edited January 4 by shak-otay 1 Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted January 4 Engineer Share Posted January 4 (edited) edit: that's weird. For x and y it works, but not in z-direction, as it would be required. You might need some matrix multiplication. Ask Durik. ☺️ hmm, start rotate by x until it matches the x-y plane. Then try to scale. It's probably required to recalculate all coordinates so that the pumkin's center aligns to blender's coordinate center. ("Geometry to origin") This world/local thing, probably (never got it...😝). Edited January 4 by shak-otay 2 Link to comment Share on other sites More sharing options...
Engineer Durik256 Posted January 5 Engineer Share Posted January 5 (edited) he he, i dtkn xD I already answered in discord about this, here is the quote: Quote Perhaps some bitwise shifts or something like that are needed. or perhaps they used some kind of constant for decompression. I just tried it like ubyte, with 1 byte missing. *and shift the entire buffer by 1 byte) it looks like a mesh, but its scale is wrong and the position of the parts is out of place. if using "y, z, w" in yor script for (Wing_Crabula_StripAnim_CompOcc_ZipPos_ZipUvs_StripNorm_U.mesh) *(but for example with Body this will no longer work) **(I also tried different bit shifts, for example x:10,y:10,z:12, but this did not give good results) I also made a plugin for another guy for this game, only for models without ZipVert someone did research on hydra for him "these are mesh related functions that i've compiled from Ghidra" here are the scripts: file.zip Edited January 5 by Durik256 1 Link to comment Share on other sites More sharing options...
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