Jump to content

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


Recommended Posts

I'm a poor soul trying to learn something about modeling, Unity 4.3.0 and Blender 2.69.4 installed, going through tutorials.

I find only very generic references to the .mu format, and nothing at all about v3 .mu; needless to say, googling just brings back to KSP, KSP wiki is outdated, and no other thread in KSP forum seems to show anything on the v3 .mu subject.

Could someone provide info about what changes from the previous .mu and v3 .mu; what models use one or the other .mu format or how can I find out myself about their format; and possibly, some link to "official" reference documents to explain those formats?

Thanks in advance.

Link to comment
Share on other sites

For the most part, there doesn't seem to be anything interesting between v2 and v3 of .mu. There should have been, but it looks to have been abandoned.

Thanks.

Of course that puzzles me, why to use a different version if it does not improve over the previous? That will only make for trouble.

Link to comment
Share on other sites

  • 1 month later...

Blender gives this error when trying to export.


Traceback (most recent call last):
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/__init__.py", line 84, in execute
return export_mu.export_mu(self, context, **keywords)
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 319, in export_mu
mu.obj = make_obj(mu, obj)
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 306, in make_obj
muobj.shared_mesh = make_mesh(mu, obj)
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 145, in make_mesh
submeshes = make_tris(mesh, submeshes)
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 75, in make_tris
tris = split_face(mesh, sm[i])
File "/home/albert-vds/.config/blender/2.69/scripts/addons/io_object_mu-master/export_mu.py", line 52, in split_face
uv = mesh.uv_layers.active.data[s:e]
AttributeError: 'NoneType' object has no attribute 'data'

location: <unknown location>:-1

Does anyone know why it does this and how it can be fixed?

Link to comment
Share on other sites

  • 3 weeks later...

I'm having an error that I'm not sure if it's a bug or I'm simply doing something that is unsupported in current version.

Traceback (most recent call last):
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\__init__.py", line 84, in execute
return export_mu.export_mu(self, context, **keywords)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 319, in export_mu
mu.obj = make_obj(mu, obj)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 304, in make_obj
muobj.collider = make_collider(mu, obj)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 199, in make_collider
col = MuColliderWheel(True)
TypeError: __init__() takes 1 positional argument but 2 were given

location: <unknown location>:-1

I'm trying to make rover wheels, but this always happens when I try to export. This error (Above) is from the default roverWheel1. I'm using Blender 2.69 and latest version of your plugin if that's any help; bug or unsupported?

Link to comment
Share on other sites

Disregard my last post

Whoops, sorry! I messed up on my last post I saved the the script wrong, and didn't check it before using it. However after downloading the script right this time there is still a problem?

Traceback (most recent call last):
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\__init__.py", line 84, in execute
return export_mu.export_mu(self, context, **keywords)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 319, in export_mu
mu.obj = make_obj(mu, obj)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 311, in make_obj
muobj.children.append(make_obj(mu, o))
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 304, in make_obj
muobj.collider = make_collider(mu, obj)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 205, in make_collider
col.suspensionSpring = make_spring(obj.muproperties.suspensionSpring)
File "E:\Program Files\Blender Foundation\Blender\2.69\scripts\addons\io_objec
t_mu-master\export_mu.py", line 157, in make_spring
spring = MuSpring()
NameError: global name 'MuSpring' is not defined

location: <unknown location>:-1

Sorry if I confused you with my previous post. I was so excited that you replayed back with a fix so quick that I didn't stop to think.

Link to comment
Share on other sites

The export.py now exports! Yay!

However, are some of the colliders working right? I can't seem to get the suspension to move? I can sometimes get the the steering to work correctly, but it doesn't always work when exported.

I'm trying to learn from the default wheels and some different mod wheels but I cant seem to get them to work either.

If you import a default rover wheel, export it without touching anything, then replace the original file the wheel doesn't work correctly; even though nothing has changed from import? Has anyone else done rover wheels, how did you get to work? Nothing I seem to do works 100% of the time, even when exporting through Unity.

Edited by Komodo33
Link to comment
Share on other sites

No one will have done wheels with my exporter: you are the first. Also, you saved me some work: you've verified that something in my script is broken. My EL work has come to a point where I need to do some modeling, so I might be able to squeeze in some time to look at wheels.

Link to comment
Share on other sites

  • 4 weeks later...

Hmm, importing stuff to blender and when exporting that as collada into unity only really keeps the shape and basic textures, everything else is pretty much shot, there isn't some way to directly open mu files with unity yet huh? Say to add more kerbal markers to an IVA.

Link to comment
Share on other sites

I just found this thread and cannot wait to give blender .mu importer a try. A big thanks to taniwha.

For K3/chris : you cannot import a .mu into Unity AFAIK. But, if you import the .mu into blender you can then save the file as a .blend. You must be in object mode when you save the .blend. Unity will import the .blend, just drop it on the assets folder. Make sure you have the latest KSP partools installed in Unity. You can then use the part tools in Unity to export a new .mu back into the relevant gamedata folder. Now, all that being said, everything has to be done correctly, step for step, in Unity or it will not work. If you need more help, I'll try to lead you through it. It took me 17 days to learn this for myself through trial and error and different tutorials from around these forums and the web in general. Good luck!

Edited by Otis
Link to comment
Share on other sites

I am new to blender also. I would much rather use sketchup myself because the interface has been much easier for me to comprehend. Everything I have learned about blender has been because it is needed to uv map my sketchup models. Once the uv map is complete, blender then saves the model as a .blend which can be used by Unity.

To answer your question, while in blender, press the tab key to toggle between object mode and edit mode. Object mode only allows you to select the entire model. Edit mode allows you to select individual faces, lines, or vertices.

Or, click in the box at the bottom of the screen to get the full mode menu options :

QEuXMgx.png

Your blender setup may be different. I've set mine up for uv map editing.

Also, concerning collision meshes, transforms, animations etc., my knowledge is very limited, because I'm just beginning to learn. Collision meshes are created in Unity in the Inspector panel, or I simply just click the box that says "generate colliders" from within the model import settings. Animations are created in blender by many of the KSP modelers, I have not tried to animate any of my models yet, so I'm no help. Transforms = I have no clue.

Edited by Otis
Link to comment
Share on other sites

Thanks for the tips, does anyone use blender by choice? The UI is a convoluted ugly mess, at this point I see it as a necessary evil because of the .mu importer nothing more, I do actual work in Luxology Modo, because it has a UI and controls that doesn't want me to cause self-harm, I got very little experience with 3d modeling but I picked up modo very quickly, still can't do basic stuff in blender like turning the view.

Link to comment
Share on other sites

Thanks for the tips, does anyone use blender by choice? The UI is a convoluted ugly mess, at this point I see it as a necessary evil because of the .mu importer nothing more, I do actual work in Luxology Modo, because it has a UI and controls that doesn't want me to cause self-harm, I got very little experience with 3d modeling but I picked up modo very quickly, still can't do basic stuff in blender like turning the view.

I use blender by choice and have found that it has a steep learning curve.

Blender can do some extraordinary things and once learned is quite easy. Check out BlenderGuru.com

Need any info PM me.

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