Jump to content

Photo

LI2 Msh Tools v1.0


  • Please log in to reply
5 replies to this topic

#1
legomoe

legomoe

    Regular

  • Silver Members
  • PipPipPip
  • 53 posts
In light of the recent discoveries on how to read LEGO Island 2's .msh model format, I thought that I would go ahead and update my old .msh to .obj converter tool.

I must admit, I got a little carried away. I completely rewrote the msh2obj tool, and I've written a brand new tool for converting .obj files back into .msh format.

To tools can't handle models that have animation data (SVWL and AVW2 sections), but I think they should be able to convert anything else.

I haven't had a chance to test anything beyond just moving vertices around, but feel free to experiment on your own and post what you find out in this topic.

Here's a link to both programs:

Please Login or Register to see this Hidden Content



NOTE: The .obj format can't handle the matrix transformation data in the .msh files for buildings with dynamic elements like doors that open, so the msh2obj tool will dump this data into a .matrix file with the same name as the .obj file when it does a conversion. Don't forget that the obj2msh tool will need that .matrix file passed in as a third parameter when you go to convert the .obj back to .msh format.
  • jamesster, Xiron and Le Vee thanked this

#2
jamesster

jamesster

  • Forum Moderators
  • PipPipPipPipPip
  • 2,794 posts
Awesome. I'll certainly be doing some stuff with this. Thanks!

#3
lu9

one question: I extracted the BOD and BOB of the idjarandomcharactersIforgotLGI, all the models are there, though, where are the minifig Body and legs? I only find Minifig's hat, hands, head, and some weird shape that looks like a camera...

#4
legomoe

legomoe

    Regular

  • Silver Members
  • PipPipPip
  • 53 posts

one question: I extracted the BOD and BOB of the idjarandomcharactersIforgotLGI, all the models are there, though, where are the minifig Body and legs? I only find Minifig's hat, hands, head, and some weird shape that looks like a camera...

I'm not exactly sure. The model data for each minifigure should be in with all the other models, but I think their 3D data might be distorted, since they're supposed to be paired with animations. So they may not be recognizable, even if you find them.

#5
Le Vee

Is it possible to convert all MSH files to OBJ in one command, like V2 of your BOD\BOB tool? The2Banned2One's converter is built for the old converter...

#6
legomoe

legomoe

    Regular

  • Silver Members
  • PipPipPip
  • 53 posts

Is it possible to convert all MSH files to OBJ in one command, like V2 of your BOD\BOB tool? The2Banned2One's converter is built for the old converter...

No, but you can do it with a batch script.

@ECHO OFF
setlocal EnableDelayedExpansion
call :recurse
PAUSE
goto :eof
:recurse
SET mfile
FOR /f "usebackq delims=|" %%f IN (`dir /b "*.msh"`) DO (
    SET mfile=%%f
    ECHO Converting file %%f...
    msh2obj.exe %%f !mfile:.msh=.obj!
)
ECHO Finished


Here a link th the file as well:

Please Login or Register to see this Hidden Content



Just put this batch file, along with msh2obj.exe, in the same folder as all the .msh files you want to convert and double click the batch file.

Tell me if it gives you any problems!
  • jamesster, Xiron and Le Vee thanked this