Jump to content

[1.2-1.7] Blender (2.83+) .mu import/export addon


Recommended Posts

On 9/13/2019 at 10:38 PM, linuxgurugamer said:

Ok, so back to my original problem.  Blender 2.80, and the plugin cloned today

I'm importing a tank into Blender.  

I rename the main object

So far, so good.  To export, I select the collection, and then do the export.

But when I load this into KSP, the tank is on it's side

What can I do to fix this?

Thanks in advance

Ditto, except i am using the last version for 2.79 (*in* Blender 2.79b), from the branch master.

Part in the background is a Procedural fairing part, and oriented correctly. I imported that .mu, and just changed the material/textures...
Export to .mu, and *my* part (foreground) is oriented incoreectly.
I've tried rotating it around in Blender (everything from the parent transform at the top of the hierarchy, down to just the mesh itself), and no matter how I orient it in Blender, it keeps exporting *this exact same way*... vOv

Also, once the part is selected and attached, it can no longer be selected (not even highlited)... so i guess the collider is not exporting properly.
I did not add colliders using the Import Tool... Just left the existing colliders as-is... I assume you *have* to redo the colliders with the Tool?... I also recall something to do with code changes to handle existing colliders on export, *if* the object name was changed, to something like "_coll", or something? I tried appending both _coll and .coll, neither seemed to work ... vOv

https://imgur.com/il2f0HMil2f0HM.png

EDIT: Also, @taniwha when I go into User Prefs under the Mu Importer, I'm gettin an err that the shaders cant be loaded when browsing to my GameData folder.
Is this because I'm on 2.79 Blender/Blender Import, using a KSP 1.8.1 install?.. or?... vOv I know shaders were changed in 1.8.+, right?

EDIT2: Actually, still get the err with Blender 2.79b, Import Tool for 2.79 (from branch, dated 19-01-30), and KSP 1.7.3. I know you're not supporting 2.79 builds, so just wondering if theres a known, quick answer... no need to look into it on my behalf. ;)
NSQPrBr.png

EDIT3: well, it seems I was able to compensate for the rotation thing, by adding this rotation key to the MODEL node:
 

Quote

    MODEL
    {
        model = <folder>/Assets/Aero/<model_name>
        rotation = 0, 180, 0
    }

 

Edited by Stone Blue
Link to comment
Share on other sites

  • 2 weeks later...

@taniwha , or anyone thats had luck with my issue...

Frist, sorry if this has been brought up before. I *did* read back about a half-dozen pages, and couldnt find anything.

Anyway, I work a lot with models from old mods. And I have *never* been able to get simple emissive animations to export correctly, either on the 2.79 *or*, currently the 2.8 build.

I dont know if there's something I'm missing, or if its something with the Importer/Exporter... ?? vOv

EDIT: So, I just figured out the last piece (among others I wont go into), on why my emissive animations werent working in KSP after export.

Yup... something completely dumb on my part...
At least using 2.81 (which I am still not really very well aquainted with), for some reason, I found an emissive color setting that was somehow changed, and overriding an emissive color setting, elsewhere that I was messing with.

Sorry for the unecessary tag Taniwha... :(

 

Edited by Stone Blue
Link to comment
Share on other sites

  • 2 weeks later...
On 7/30/2013 at 12:41 PM, taniwha said:

NOTE 2: Blender won't load the plugin if the directory name has periods in it, so if the resulting directory has periods in it, you will need to rename it.

However, thanks to @Snark, here are some installation instructions:

  1. Clone the github repo
  2. Copy the entire folder (io_object_mu) into Blender's scripts/addons folder
  3. Start Blender
  4. Go to Edit ->  Preferences... -> Add-ons.
  5. Find "Import-Export: Mu model format (KSP)" in the list
  6. Check the checkbox next to it
  7. Click "Save User Settings"
  8. If you go to the File -> Import menu, it now has "KSP Mu" and "KSP Craft" in the list.

finally remembered that even though my grand-potato can't run 2.8, it can run 2.79

so going to install this

and the path is 'C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_object_mu" - right fro above quoted directions; all good - except there is a period in the path..

what am I missing?

got it working - ignore the error messages and all will be fine. :D

Edited by zer0Kerbal
Link to comment
Share on other sites

I think this is the second or third time I'm asking this, considering that MAYA supports python, is there a chance that some of you guys who are familiar with python, make a version for MAYA too? if you don't know why I'm asking this, MAYA is tons better than Blender and much easier to handle modeling stuff with lots of features that will make a modeler's life easier.

Link to comment
Share on other sites

28 minutes ago, Lucas3214 said:

Is this add-on working on MacOS (Mojave), I cant enable the add-on in Blender(2.79b)

I got it working in 2.82, Thank you, Great stuff

 

The uv seems to be inverted? by scaling -1 i can fix it, but which part of the code is for that?

 

Link to comment
Share on other sites

@Lucas3214: I don't know how to do particles, so import/export not supported yet.

@Jiraiyah; Careful there, Maya is neither better nor worse than Blender, just different and what you prefer.

I don't know Maya, so I can't help you with that, but if you decide to take the plunge, I can help you with the ins-and-outs of mu.py (which, other than converting between left-handed and right-handed, is independent of Blender).

Link to comment
Share on other sites

@Lucas3214: No the UVs are not inverted, the dds image is inverted. And the blender devs rejected my patches to make it easy to invert the images in blender :(

Import craft needs you to set the KSP game data path in the addon's settings panel (point it at GameData, not just the KSP root directory)

Link to comment
Share on other sites

Hi, can you please help. I cannot figure out which one I should download from the GitHub site. Nothing else than the GitHub desktop seems to work anyway. Or do I need this?

Sorry for this question, could solve it on my own ☺ as i try to activate the addon in blender it says there is a syntax error:

SyntaxError: invalid syntax

 

Edited by Tranquil
Link to comment
Share on other sites

  • 2 weeks later...

Alright, got it working in 2.8; however, it imports the craft as one object, and I can't figure out how to remove all the unwanted meshed & stuff (colliders, unused alternate models, unused shrouds, semi-deployed chute models, etc).

On 2/22/2019 at 6:27 PM, taniwha said:

This is by design as it allows for easy manipulation of whole craft. However, it is still possible to edit the craft even down to individual meshes...

  • In blender's outliner (upper right corner panel in the default layout), select "Scenes" in the second dropdown (defaults to View Layers, looks a little like a pile of photos), just to the left of the search box.
  • Click on the mu_utils scene to switch to it, and also open it by clicking its triangle.
  • In there, you will find Scene Collection: open it.
  • Under that, there is craft_collection, which is where the assembled craft is stored (in its own collection under craft_collection).  You will have to enable display and selection for the collection.
  • You will also find loaded_parts which stores assembled parts (some parts are built from multiple models) and loaded_models (the actual models as loaded from .mu files).

Yeah, this does seem involved, but it's all about keeping the stuff organized in blender.

BTW, when working with individual .mu files (importing or creating), you may also find a collider_gizmos collection in mu_utils. This is for the gizmos used to display primitive collider types (sphere, capsule, box and wheel).

Found this reply you'd made, but got stuck on "enable display and selection for the collection"; there doesn't seem to be an option to do so anywhere.

Link to comment
Share on other sites

@Alex33212: you can get at even the individual sup-models via the collections. When you import, all the parts and sub-parts are hidden and you're presented with the craft as a single object. You will probably need to enable most of the collection filter options.

Link to comment
Share on other sites

6 hours ago, taniwha said:

@Alex33212: you can get at even the individual sup-models via the collections. When you import, all the parts and sub-parts are hidden and you're presented with the craft as a single object. You will probably need to enable most of the collection filter options.

How do I do that?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...