Handburger Posted April 16 Posted April 16 Hello, So I'm a mod developer for MHGU and I'm struggling with converting the game's lmt file (which are the animation files) into a blender format ie .glb. Currently right now PredatorCZ's Revillib has some functionality but it doesn't quite work well. I tried that with a batch.json which didn't work, I've also tried to import the original .mod into 3dsmax 2017 and then import the .lmt directly which worked, but was unable to bring it into .glb. I do have to say that I don't know how to use 3dsmax nor Blender so this probably isn't the most reliable information.. The only thing I can get is the glb. Attached are the original animation files from MHGU directly Here's what I'd like: Full .mod importation into blender (needs a script) lmt to glb conversion Please reach out if you know anything! em042_00_0lmt.zip em042_00glb.zip
DrFolly Posted October 4 Posted October 4 I know this is from April but I want to give my two cents on this because I just figured out how to do this myself and I hope this can help other people as well. I'll try and simplify this in a step-by-step format as best as I can. Preliminary requirements Programs you will need include: Ryujinx (or any application that can extract NSP files) RevilLib (for file conversions) Kuriimu2 (for .arc file viewing & exporting) (Optional) Notepad++ or VS Code, I prefer these to create and format .json files in. 1. Getting the extracted files Using Ryujinx is the easiest way to convert the switch rom format (NSP) into something that will be readable by other programs. Right click on the game in the game list>Extract Data>RomFS. It will ask you where you want to output the files, I recommend somewhere you'll easily remember. This will take a few minutes. 2. Locating the desired files After you're done exporting the NSP, open Kuriimu and find the .arc file that you want to open. I haven't (for now) put together a library of monster IDs, but know that large monsters start with "em_xxx" in their file IDs, and small monsters are "ems_xxx". This is where the model and texture files for whatever monster you have selected will be (generally). The "mot" folder has the .lmt files in it though, so I would recommend exporting those into the same folder as the model and texture files. 3. Converting the .mod file(s) This is by far the easiest step. You can simply drag and drop the .mod file onto the mod_to_gltf batch file in RevilLib's folder and it should automatically convert the .mod file to .glb in the same location where the .mod file is stored. 4. Converting the .lmt files After exporting your .lmt files, make sure that your .mod file is in the same location. This will speed up the rest of this process, and is also necessary for the spike batching we're about to do. In the same folder as the .lmt and .mod files, create a .json file (I usually just name it "batch.json). Open it up in your text editor of choice, and now I will quickly explain how the spike batching works. 4.1. Spike Batching Here is an example of my code (which exports the Rathian animations): [ [ "em001_00.glb", "em001_00_0.lmt", "em001_00_1.lmt", "em001_00_2.lmt", "em001_00_3.lmt", "em001_00_4.lmt" ] ] The .json file reads from its root directory, so there is no need to link to individual file paths. Thankfully, this program will also automatically group all the animations together, so when you view them in Blender (using the action viewer, in the dope sheet), it is nice and consolidated. What this does is pretty obvious, but we are just telling the program that the .glb file is the model we want to use with the animations, and the .lmt files are the animations that we are assigning to the model. When you are done with this file, drag and drop it onto the lmt_to_gltf batch file (located in the RevilLib folder, same as mod_to_gltf), and you should have the .glb file containing the animations in your root folder. It will have "out" at the end of the filename, if it isn't clear to you which one it is. 5. Importing to Blender Because I use Blender, that is the program that I will refer to in this step. It's really simple to do this because Blender, thankfully, has .gltf and .glb file-reading built-in, so import the xxx_out.glb file that we just got and everything should import correctly, animations and all. The textures are another beast, but I'm willing to explain those as well if needed.
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