Jump to content

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


Recommended Posts

I have pushed support for exporting animations. Only the basics (loc/rot/scale) for now. Only one animation block is exported, but multiple clips within that block are supported.

Link to comment
Share on other sites

  • 2 weeks later...

amankd: For generic blender questions like this, you're best off asking in the blender community (#blender on irc.freenode.net or the blender forums). My addons folder is in ~/.config/blender/2.73/scripts/addons, but that's Linux specific, and I have no clue about windows or mac.

Link to comment
Share on other sites

  • 1 month later...

ThatGuyWithALongUsername: what sort of change did you make? It sounds like a coordinate system issue which implies to me that you did some reparenting. If that is the case, be sure to clear the parent inverse transform (alt-p) and reposition and reorient the relevant parts. Also, make sure you have the root transform selected when you export.

Link to comment
Share on other sites

It sounds like you deleted the object, added a new one, then used the old mesh (wild guess, but doesn't really matter how you would up with it).

You have to create the collision mesh as a collider. The current git has a nice tool for creating a collision mesh from the visible mesh (be sure to make the collision mesh actually convex if necessary): in the tool panel (T) you'll find a "Mu Collider" tab. The "Selected Meshes" button will add collision mesh objects that share the mesh data from the selected objects and parent the new collision mesh objects to the relevant vis meshes.

Link to comment
Share on other sites

  • 2 weeks later...

Hey taniwha, I just added this addon to Blender, but I'm not getting a KSP mu import or export option.

I downloaded the zip from github, extracted it, and put the folder into Blender/2.75/scripts/addons, and restarted Blender. Did I do something incorrectly?

Link to comment
Share on other sites

Thank you very much. This will be invaluable if I get into modding.

Could you rig it up to convert the unity attributes to Miscellaneous EXIF tags (or RDF tags in XML formats) and visa versa in order to preserve them through editing, even across saves?

Could you make a function for GIMP to export pre-compressed DDS files using AMD's utilities as well?

Edited by Ruedii
clarification of XML formats and tags.
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

I had been consistently trying and failing to create simple parts with blender. I didn't have any experience in modeling at all, and initially followed http://www.alternatewars.com/Games/KSP/Tut1/KSP_Tutorial_1-2.htm and then read through more than half this forum 's posts.

Do I absolutely need to install unity for creating a simple 1x1x1 cube with crappy .png texture created in gimp?

I created the cube, and created and saw it properly textured. Then I created a collider mesh with this plugin, both the box and others (can't remember the names, the only one I didn't try was the wheel). Then I tried calling the collided with different names according to the tutorial mentioned above and also the name/structure I tried to mimic from a couple remote tech/mks parts that I imported. That means in some cases everything was under a single root node, and on others they would be side by side.

I'd usually start from scratch, just in case.

Last step was selecting the root node, exporting the .Mu file, and copying it along its .Png and .CFg file into a new folder.

The best I could get from all of those combinations (god forgive me if I skipped the right one, because I tried to slowly cover most of them) was seeing an ugly gray cube with a node that allowed it to be attached in the vab, but couldn't be grabbed / removed. And i swear I really tried that.

In one occasion I guess I saw textures, I'm not sure if I did it and I couldn't do it again. I suppose that both means my collider is broken and my texture is broken. Also when I tried using more solids they would be out of place, but usually the right size/dimension or rotated - but not always right at all. I guess I can manage that, but the collider and textures are driving me crazy.

edit: according to linux #file, this is the .png I've been trying lately - "lcrd.png: PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced"

I'm not sure, but I think that I was still trying with .dae models when I saw textures. Is it possible to still use .dae files?

Edited by Qigon
Link to comment
Share on other sites

KerbOrbiter: this is to be expected. The only way to get sharp edges with unity is to double the vertices along the edge so the faces are actually separate, otherwise the surface normals are interpolated across the edge, and the edge is smoothed out. It is also the only way to have separate lslands in your UV map.

The thing to do is to avoid importing your model from .mu as much as possible: do all your work in blender, saving to .blend, then export to .mu when you want to use the model in KSP.

Link to comment
Share on other sites

Hello.

I import .mu file (ship part) in a blender, change it (just change geometry)

and exported it back to .mu file.

It can be added to the VAB, but it becomes inactive

and it can no longer do anything.

Even if you do not change the file, and it just

exported back to .mu file,

it still becomes inactive in the VAB.

How correctly export to .mu?

What am i doing wrong?

- - - Updated - - -

One more question,

If I change the part of the ship,

adding to it a single mesh (a small ledge on the body).

How correctly add it (mesh),

what would it be seen in the KSP?

Link to comment
Share on other sites

Wuwuk; when you export your model, make sure you have the root object selected (always an empty, often called GameObject in stock models). ie, when you grab the one object, all other objects of the model move with it.

When adding meshes, ensure they are parented to the root object, or some other object already in the hierarchy. For best results, clear the parent inverse transform (alt-p, clear parent inverse transform). You may need to reposition and reorient your new mesh.

Also, what part is giving you problems? Not all animations are supported yet, only location, rotation and scaling right now.

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...