New Blender Bin Import / Export Plugin

Downloads: www.mtm2.com/~mtmg/utilities.shtml
Post Reply
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Finally, here it is: https://drive.google.com/file/d/1dAkJnl ... drive_link

A Blender Import and Export plugin based on James Pezold's Monvert bin converter: https://github.com/jpez1432/Monvert
Thanks James for making that open-source! I could not have made this without your code.

To install, just drag that zip onto your add-ins window in Blender: Edit >> Preferences >> Add-ons

The readme is long, but have a look as it explains basic usage and some potential troubleshooting should the need arise.

I felt it was finally ready for release when I successfully got this beast into the game (over 18k verts and 16k faces!):
Image

Looking forward to seeing what the limits are of Fila's new updates. The Hummer in the screenshot above runs just fine in game. So, I'm guessing quite a bit higher!

Enjoy! :D
User avatar
Fila
Member
Posts: 1935
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Fila »

Did the game suddenly combust?

I should re-add the truck flooding for *stuff* and giggles :D

Btw, a crazy test is on fila's adventure redux. Use complex scenery, there's a 30k vertices model hidden somewhere in there right at the beginning so the game draws it even if you can't visually see it, can test to see if the game explodes.

It was also why the truck flooded back in the day.
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Image
Image
Image

No problems whatsoever. :D

PS. Tried to use the [spoiler] tag on your secret model, but I guess this board doesn't have it. At least it doesn't give away the location.
User avatar
Fila
Member
Posts: 1935
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Fila »

Side note: I discovered a bug with that particular model and why it killed the fps. I fixed the bug and my FPS went flying past the moon.
User avatar
Jpez1432
Member
Posts: 125
Joined: Sun Apr 17, 2005 8:10 am
Location: U.S.A.
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Jpez1432 »

Hey, glad to see you made a plugin with my code. I completely forgot I showed you that when you did Crazy98 for ROR I think. Maybe we can work on other model formats as well. Let me know what you think.
User avatar
Jpez1432
Member
Posts: 125
Joined: Sun Apr 17, 2005 8:10 am
Location: U.S.A.
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Jpez1432 »

Alright, completely missed the title. BLENDER, haha. I read it as a plugin for BinEdit, I thought to myself since when does BinEdit have plugins... anyways, here is a updated version. Not trying to step on your toes OGRudeE.

https://drive.google.com/file/d/12HX9N5 ... sp=sharing

I implemented texture loading/conversion in blender with a resize option if importing from another model. I also included
the ability to repack the raw/acts and automatic art folder detection if not found. Included adding the ability to save only
selected objects. Hopefully this makes it even easier, haven't tested thoroughly but seems to work on stock trucks, loads MetalCr2 if
needed as well, Keep on truckin'

-Jpez1432

Two notes, if you are importing a different model format and the image is larger than 256 and option checked resize, exporting the raw/act conversion takes a good second.
and secondly if the material name is longer than 8 characters Binedit will ask for the texture, or shorten it correctly. Also noted if importing a GLB model and exporting it might
not look correctly in BinEdit due to how face culling works with GLB models.

Keep on truckin'
User avatar
Jpez1432
Member
Posts: 125
Joined: Sun Apr 17, 2005 8:10 am
Location: U.S.A.
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Jpez1432 »

Hey, updated it again. Here is version 2.

https://drive.google.com/file/d/1YdFVvo ... sp=sharing

I moved some options to the export dialog, automatically resizing if necessary, default face type if created/loaded model. Manual face type setting in the propeties panel per mesh/texture.
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Awesome Jpez! Glad you're able to contribute too. I'll check out your changes soon. :D
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Hey Jpez, got a chance to try out your updates today. Nice additions!

I'm going to try to add a little menu to the top ("BIN Tools" or something) that lets you choose from a drop-down menu the face type for the selected mesh. I did it manually for the trees I converted earlier. Is 0x34 animated face type?

I also tried having the plugin convert my pngs to raw / act via the export window, but nothing happened that I could tell. I may have been doing something wrong, but I expected them to export into the art directory corresponding to the models folder where I saved my bins. I just used dummiesman's triraw to convert (as usual).
User avatar
KF2416
Member
Posts: 96
Joined: Thu Sep 22, 2022 10:50 pm
Location: Somewhere in Canada
Contact:

Re: New Blender Bin Import / Export Plugin

Post by KF2416 »

I wonder if you could add a feature that auto-resize unsupported texture size to 256x256 to a plugin.

For an example, 128x128 can be automatically resized to 256x256 if MTM2 do not support that texture size.
The monster truck garage of KimikoFan2...

Image

Impact Monster Championship playlist:
https://www.youtube.com/playlist?list=P ... _NZQT6712_

The Monster Truck Community Server (feel free to join if you want):
https://discord.gg/SxwBuTRAJA

"I'm Army Armstrong. Are you ready for Microsoft's Monster Truck Madness?"
-Army Armstrong, 1996
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Jpez, Chatting with Kimiko on discord about exactly what they need so we can implement it.
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Attached is an updated plugin that adds "BIN Tools" to the menu bar that allows you to set the MTM(2) face type of objects selected in the Scene Collection window. It creates a custom object property for the selected meshes as in the screenshot, and export will respect the face types you choose in Blender (you can verify in BinEdit ;) ).

If you have a previous version installed in Blender already, you must first uninstall the old release in the Add Ons window, then install this one. All future updates should overwrite old releases.

Jpez, I have renamed the plugin folder from "release" to "monvert" for future releases so that it doesn't get overwritten by other random addons.
You do not have the required permissions to view the files attached to this post.
User avatar
Jpez1432
Member
Posts: 125
Joined: Sun Apr 17, 2005 8:10 am
Location: U.S.A.
Contact:

Re: New Blender Bin Import / Export Plugin

Post by Jpez1432 »

Here is version 4, I actually wrote this several days ago and forgot to upload it. Been working on Project Monster. Here is the link. This version has the panel as well to set the face per mesh texture its under the triangle in object/properties tab. In the addon tab where its installed look at the properties. You can see the default art directory there or it just defaults and finds it based on up a directory. In the export MTM bin model dialog is where there are 3 options, export selected, re-export raw/act from any materials selected and resize textures which will downsize to 256 need be, and if 64 goes to 128. Have fun. Let me know what needs to be worked on.

https://drive.google.com/file/d/12r7WO8 ... sp=sharing
User avatar
OG_RuDeE
Member
Posts: 205
Joined: Fri Apr 28, 2023 4:11 pm

Re: New Blender Bin Import / Export Plugin

Post by OG_RuDeE »

Just FYI everyone, Jpez's update (v4) from yesterday is separate from mine (v3). So, choose your own adventure!

I don't think they overwrite each other or the old versions. So, you'll have to uninstall whichever ones you aren't using anymore.

I'll see about merging them with the time comes if they have separately useful features.
Post Reply