Jump to content

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


Recommended Posts

Bit of a noob here trying to figure out a shader problem. I got the plugin picked a stock part Disabled the fairing from rendering and pressed f12.
What are those black patches and how can I get rit of them

xiC3B2L.png

3VrylLE.png

 

Edited by mellester
Link to comment
Share on other sites

I'm not sure. I do know that my "shader" setup (via material nodes) is not perfect (many ksp shaders are not even implemented). Also, the shader/node code got a bit of a rewrite recently with the 1.0.5 release due to mu version 4 as it replaced the material blocks in the model, so there may still be some bugs from that.

Link to comment
Share on other sites

  • 2 weeks later...
On 1/16/2016 at 0:28 PM, taniwha said:

I'm not sure. I do know that my "shader" setup (via material nodes) is not perfect (many ksp shaders are not even implemented). Also, the shader/node code got a bit of a rewrite recently with the 1.0.5 release due to mu version 4 as it replaced the material blocks in the model, so there may still be some bugs from that.

Can I find documentation on mu files somewhere? Trying to import .mu into Unity but I seem to be out of luck. Is it even possible? Or do I *have* to go the Blender route?

I vaguely remember seeing videos where people had the stock internals loaded in Unity.

Sorry to bother you with this.

Link to comment
Share on other sites

An important announcement: my github name (and thus any links using it) has changed from taniwha-qf to taniwha. Repository links will work for a while, but it is best if you update asap: just edit .git/config and change taniwha-qf to taniwha.

Link to comment
Share on other sites

@taniwha Sorry for the off-topic post, but your does your link change only affect: Blender.mu, ExtraPlanetary Launchpads, Survey Transponder, & Talisar Parts?... or were there more mods? (I cant access Github from home, so i cant check myself... :( )
If there are more, no need to post links, just mod title would be fine, if you could... Thank You... :)

Link to comment
Share on other sites

Stone Blue: Extraplanetary-Launchpads, io_mesh_mu (this addon), KerbalStats, SurveyTransonder, Kethane, TalisarParts, FreeEVA. Anything else in my repository list is either not "published" (ie, either I never announced them, or they're forks from someone else's repository), or not relevant to KSP. I did go through all my threads updating the links.

Link to comment
Share on other sites

  • 3 weeks later...

@taniwha I've been trying to use your plugin for some simple mesh modifications to some parts. Thank you for it. The import works fine, but I can never export. I get a shader error regarding MuMaterialProperties. This happens even when immediately exporting after importing. I have tested several different parts from different mods and get the same error. As you can see in my screenshot, the materials tab shows a correct setup (right?), and the materials are displayed in Blender (I read the thread :)). I'm using Blender 2.69 on Ubuntu 14.04, if that's any help, and your 12/12/2015 plugin revision from Github.

Spoiler

0av29eW.png

 

Edited by Bluebottle
Link to comment
Share on other sites

Hello ! 

 

Got a problem during trying to install the import, this line is not "good" for blender : 

from .mu import MuEnum, Mu, MuColliderMesh, MuColliderSphere, MuColliderCapsule

 

:)

[edit] using the python file instead of ZIP file ... everything good now ;) Thanks ! 

Edited by Da_Pedro
Mistake
Link to comment
Share on other sites

On 7/30/2013 at 2:41 PM, taniwha said:

Hello, I have been working on an addon for Blender to import and export .mu files. It is still very incomplete, but I have released it under the GNU General Public License (version 2), and it is available from github.

Working features

 

  • Import .mu into blender. Meshes, materials, textures (including .mbm) and colliders supported. Anything animation related is currently ignored.
  • Export from blender to .mu. Same as features and limitations as import, however .mbm is not written (planned).
  • Unity colliders can be added via the Add menu. Updating the collider via the tool panel works as expected (ie, visual updates), but updating via the object panel does not (though the values will be exported).
  • KSP shaders can be created by selecting the shader type in the materials panel. The material will be built automatically any time something is changed (a little inefficient, but it works). The material setup is really just a best-effort WYSIWYG thing.
  • Standalone (still requires python to run) command line script that lets you view and edit wheel collider parameters.
  • Animations work for location/rotation/scaling (import and export), and light intensity (import only).
  • Skins work for import-only.
  • v4 materials for import, possibly for export (not fully tested).

 

Plans (no particular order):

 

  • Animations.
  • Bones and skins.
  • Write textures as mbm.
  • Multi-material textures (assuming KSP actually supports this)

 

Export is simple: select the root object, then File->Export->KSP Mu. The active object and all of its children (of supported types) will be exported to the one .mu file.

Is there a newer version @taniwha

Link to comment
Share on other sites

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

I have released (as such) version 1.0.0 of my Blender .mu import/export addon. What was "stable" is now tagged as v0.9.0 (both versions are in the github releases).

The main change is mu version 4 support (came with KSP 1.0.5 if I remember correctly). All mu versions are imported to internally be version 4, and exports are now always to version 4.

Link to comment
Share on other sites

Sooo, I dropped the folder into "addons" and it's not showing up in the Addons list, why? I checked everything I could think of and it doesn't work. Could it be that it doesn't work with Blender 2.77? QYP4TlT.png

Edited by Ghosty141
Link to comment
Share on other sites

Try disabling the official/community options. Also, "KSP" is a better search term (one hit).

Note, however, that 1.0.0's material/shader handling is broken (import is fine, and re-exporting works, but properties can be neither added nor removed) and the next "release" (current git, too) will break any existing Mu shader setups yet again. It should stabilize with the next release, though (just need to do a mini-wizard to make standard shader setup a little easier).

Link to comment
Share on other sites

So, I created a part to put in, and set up the usual GameObject-Object-Object.collider setup for .mu files. Exporting the part with a perfectly good .cfg file gave me this error:

NullReferenceException: Object reference not set to an instance of an object

Any ideas?

Link to comment
Share on other sites

7 hours ago, IcanhazHax97 said:

NullReferenceException: Object reference not set to an instance of an object

Any ideas?

No, none, because you have not provided the stack trace for the exception.

Link to comment
Share on other sites

13 hours ago, taniwha said:

No, none, because you have not provided the stack trace for the exception.

From .log file:

[LOG 15:56:58.009] PartLoader: Compiling Part 'Galaxy/C5CargoBay/C5CargoBay/GC5CargoBay'
[EXC 15:56:58.013] NullReferenceException: Object reference not set to an instance of an object
    PartLoader.SetFogFactor (UnityEngine.GameObject model, Single fogFactor)
    PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node)
    PartLoader+.MoveNext ()

From KSP_Data:

PartLoader: Compiling Part 'Galaxy/C5CargoBay/C5CargoBay/GC5CargoBay'
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

NullReferenceException: Object reference not set to an instance of an object
  at PartLoader.SetFogFactor (UnityEngine.GameObject model, Single fogFactor) [0x00000] in <filename unknown>:0
  at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0
  at PartLoader+.MoveNext () [0x00000] in <filename unknown>:0 

There were no Blender errors.

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