Users browsing this thread: 1 Guest(s)
Ripping from My Om Nom Models
#16
How do you even obtain these .msh models, anyway? Because I wanna contribute!
Doing what I can to contribute~
MovieMaker X
Reply
Thanked by:
#17
Sad 
(12-10-2019, 08:08 PM)MovieMaker-X Wrote: How do you even obtain these .msh models, anyway? Because I wanna contribute!

No idea, but I also do want to contribute, sadly some models won't import correctly with TGE's importer, and I have no idea on how to make something similar that'd work with the rest  Sad
Reply
Thanked by:
#18
(12-25-2019, 12:47 AM)Luiluix Wrote:
(12-10-2019, 08:08 PM)MovieMaker-X Wrote: How do you even obtain these .msh models, anyway? Because I wanna contribute!

No idea, but I also do want to contribute, sadly some models won't import correctly with TGE's importer, and I have no idea on how to make something similar that'd work with the rest  Sad

Update: I have got the game files with me now. Is it possible to make an .msh importer for Blender? Just wondering so I can try and contribute! (I have barely any knowledge with Python, so I apologize) Thanks again~
Doing what I can to contribute~
MovieMaker X
Reply
Thanked by:
#19
(12-26-2015, 03:43 PM)TGE Wrote: Okay, I guess the script works for those files too
Code:
-- 3ds max maxscript
-- My Om Nom .msh importer
-- By TGE, contact me in case there's any issues ;p

gc()
clearlistener()
fn ReadUShort fstream =
(
    return (ReadShort fstream #unsigned)
)

fn ReadULong fstream =
(
    return (ReadLong fstream #unsigned)
)

fn ReadUByte fstream =
(
    return (ReadByte fstream #unsigned)
)

fn ReadVector2 fstream =
(
    return [(ReadFloat fstream), ((ReadFloat fstream) * -1)+1, 0]
)

fn ReadVector3 fstream =
(
    return [(ReadFloat fstream), (ReadFloat fstream), (ReadFloat fstream)]
)

fn GetOpenFile =
(
    clearlistener()
    local fname = getOpenFileName \
    caption:"Open Model" \
    types:"My Om Nom Model (*.msh)|*.msh" \
    historyCategory:"MYOMNOM Object Presets"
    if (fname == undefined) then
    (
        return undefined
    )
    else
    (
        local f = fopen fname "rb"
        return f
    )
)

fn ReadArrayInfo fstream =
(
    struct ArrayInfoStruct
    (
        type,
        elementCount,
        arrayLength
    )
    
    local a = ArrayInfoStruct()
    a.type = ReadUShort fstream
    fseek fstream 0x5 #seek_cur
    a.elementCount = ReadULong fstream
    a.arrayLength = ReadULong fstream
    return a
)

positionArray = #()
texCoordArray = #()
normalArray = #()
faceArray = #()

file = GetOpenFile()

if (file != undefined) then
(
    info = ReadArrayInfo file
    for i = 1 to info.elementCount do
    (
        positionArray[i] = ReadVector3 file
    )

    info = ReadArrayInfo file
    for i = 1 to info.elementCount do
    (
        texCoordArray[i] = ReadVector2 file
    )

    info = ReadArrayInfo file
    for i = 1 to info.elementCount do
    (
        normalArray[i] = ReadVector3 file
    )

    info = ReadArrayInfo file
    fseek file info.arrayLength #seek_cur

    info = ReadArrayInfo file
    fseek file info.arrayLength #seek_cur

    subMeshCount = ReadUShort file
    fseek file 0x01 #seek_cur

    for i = 1 to subMeshCount do
    (
        info = ReadArrayInfo file
        
        for j = 1 to (info.elementCount / 3) do
        (
            faces = [(ReadUShort file) + 1, (ReadUShort file) + 1, (ReadUShort file) + 1]
            append faceArray [faces[3], faces[2], faces[1]]
        )
        
        fseek file 0x07 #seek_cur
    )

    msh = mesh vertices:positionArray faces:faceArray
    msh.numTVerts = positionArray.count
    buildTVFaces msh
    for j = 1 to texCoordArray.count do setTVert msh j texCoordArray[j]
    for j = 1 to faceArray.count do setTVFace msh j faceArray[j]
    for j = 1 to msh.numfaces do setFaceSmoothGroup msh j 1
        
    max modify mode
    select msh
    addmodifier msh (Edit_Normals ()) ui:off
    msh.Edit_Normals.MakeExplicit selection:#{1..normalArray.count}
    EN_convertVS = msh.Edit_Normals.ConvertVertexSelection
    EN_setNormal = msh.Edit_Normals.SetNormal
    normID = #{}

    for v = 1 to normalArray.count do(
        free normID
        EN_convertVS #{v} &normID
        for id in normID do EN_setNormal id normalArray[v]
    )
    maxOps.CollapseNodeTo msh 1 true -- Collapse the Edit Normals modifier
)
gc()

Can you make a msh converter for blender too please.
There's models from an animation which is considered lost media in the game.
Reply
Thanked by:
#20
Hey! I used the Apple .ipa version available from the Internet Archive - just search it up. I used version 1.1.8. More details are in here.
applecuckoo - ripper of sounds, sprites and models

Places to get help:
DYKG/VG Resource Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by:
#21
yeah .ipa has all of the models inside of rooms/mainroom
Reply
Thanked by:


Forum Jump: