Page 1 of 1

Request : Alan Wake .binmsh

Posted: Mon Apr 13, 2015 12:45 pm
by artworkplay
Could anyone take a look at these .binmsh files from Alan Wake? Maybe create a python or maxscript-based skeleton/weights extractor for the models?

http://sta.sh/0174ots6sv5g

Re: Request : Alan Wake .binmsh

Posted: Tue Apr 14, 2015 4:24 am
by mariokart64n
I worked on this format over at the facepunch forums and skin weights were "extractable" at the time, but flagged off in the script.
I was UNABLE to figure out the BONES, so I figured there was no use enabling it

Anyway here I've enabled the flag for you, having fun FIXING bones:

Image


maxscript:
BINMSH.zip
http://facepunch.com/showthread.php?t=1 ... st47254771
mariokart64n wrote:format is strange, as we don't get much of a header to work with.
it gives a few counts or sizes for the main vertex and index buffer but then thats it

then you jump past that and land at skeleton and material data blocks and some unknown data??? I'm also missing the skeleton hierarchy info :/
anyway after which you'll finally come to the mesh table, which in most games I see are at the top with the header.
In this format everything seems in reverse, which makes my implementation very UNSTABLE.

as the format does not supply an address to the mesh table I have to parse through the material table to get to it.
The material table is dynamic, so without picking apart the material calls in a disassembler I can only accommodate what I was provided with in the OP's sample.
In other words if there is a new material call the program will land at the wrong address and CRASH :'(

I have created a 3dsmax maxscript that imports the OP's provided sample file. Probably WILL NOT WORK on other files, so don't bother trying

Image

Re: Request : Alan Wake .binmsh

Posted: Tue Apr 14, 2015 2:10 pm
by shakotay2
impressive work, as always!
mariokart64n wrote:Anyway here I've enabled the flag for you, having fun FIXING bones:
surely had. I manually created an array containing the parent ids (face bones unresolved):

Code: Select all

BPar_ID = #(-1, 1, 2, 3, 4, 5, 6, 7, 8, -1,-1,-1, 3, 13, 14, 15, 16, 17, -1, 2, 20, 21, 22, --23
            20, 24, 25, 9, 21, 28, 29, 30, 24, 32, 33, 34, -1, 9, 37, 38, 9, 40, 41, 9, 43, 44, 27, 46, -- 47
	    9, 48, 49, 18, 51, 52, 18, 54, 55, 18, 57, 58, 18, 60, 61, 18, 63, 64, --65
	    1, 
	    66, 67, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -- 78
	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
	    -1,-1,-1,-1,-1,-1,-1,-1)
Not sure whether Spine0 should be a child of the pelvis and as always I've spoiled the skinning:
Alice_move.JPG

Re: Request : Alan Wake .binmsh

Posted: Tue Apr 14, 2015 5:11 pm
by artworkplay
Awesome work as always. Fixing the bones and assigning the materials ...not a problem but some of the weights "don't exist" like in the screenshot...

Image

Re: Request : Alan Wake .binmsh

Posted: Sat Jun 06, 2015 5:47 am
by d875j
What about map models and coordinates and ect?

Re: Request : Alan Wake .binmsh

Posted: Sat Apr 25, 2020 10:21 pm
by Tosyk
Mario updated the script and I'm happy to share it with you.
BINMSH_r2020_04_26.zip
How to use:
  1. Import the Skeleton from the havok File (\Alan Wake\data\ep999-000\skeletons\) into 3dsmax first with:
    https://lukascone.wordpress.com/2019/03 ... ax-plugin/
    import settings:
    • scale = 97
    • Coord. setup - tick Invert Top
    • Coord. setup - Back - choose Top from dropdown
    • Coord. setup - tick Right
    • Coord. setup - Right - choose Right from dropdown
  2. then run script, flip the toggles around with settings:
    • Clear scene: OFF
    • Enable Skin: ON
    • Flip X Axis of Mesh: ON

Note: it's important that you use the correct skeleton, and thats about it.
also seems all bones called "ragdoll*" can be removed

Image