Jump to content

KSPBlender - Blender Addon for importing .craft files (now with complete mod support!)


Dasoccerguy

Recommended Posts

Downloded the new update... how do I run the script now and where do I place the craft file?

Just put the io_kspblender-master folder into your blender scripts/addons folder, do ctrl+alt+u, go to the addons tab, search for KSP and make sure both the MU and ksp importer are enabled, then you should have an option to import craft files from blenders file menu. Hope that helps. :)

I made some minor updates to try to help you out. Redownload the addon and see if they make a difference. Sorry this is such a struggle.

No problem, it's sort of almost fun trying to help fix it...lol

Not having any luck with the new update, but haven't had time to sit down with it fully yet.

Link to comment
Share on other sites

I made some minor updates to try to help you out. Redownload the addon and see if they make a difference. Sorry this is such a struggle.

I got the import working now on linux. I can PM (so we don't clutter up the thread with code, more than I already have) you what I did to get it to work, or just paste it here, which ever would work best for you. Still can't figure out why, for kethane, the drill and 1m converter won't import.

Several times while waiting for some tests to render...I've caught my self almost trying to drag it around to look at it from different angles lol

Also appears the file size of the blend file is much smaller. I was using the old demo blend, and saved over it with a plain backdrop (made from a plane) and the file size was over 450mb. A new one with the same parts (the kethane part test) is a little over 100mb. Of course maybe it's something I did in the demo blend file I guess.

Edited by Sma
Link to comment
Share on other sites

I got the import working now on linux. I can PM (so we don't clutter up the thread with code, more than I already have) you what I did to get it to work, or just paste it here, which ever would work best for you. Still can't figure out why, for kethane, the drill and 1m converter won't import.

Several times while waiting for some tests to render...I've caught my self almost trying to drag it around to look at it from different angles lol

Also appears the file size of the blend file is much smaller. I was using the old demo blend, and saved over it with a plain backdrop (made from a plane) and the file size was over 450mb. A new one with the same parts (the kethane part test) is a little over 100mb. Of course maybe it's something I did in the demo blend file I guess.

The file size thing is funny. That wouldn't have been anything I did.

And please, PM, post, email, anything you want. I'll incorporate your changes into the code, acknowledge you, and then I'd like to have you re-download it and test it. Thanks a ton!

Link to comment
Share on other sites

PM sent. I think I also sent you the part definitions that I have setup so far for Kethane. Not sure about the scale for the parts yet though.

Unfortunately, I don't have a clue as to how to make the part definitions easier for cross platform with out having to list them all out. Unless maybe you could have a variable for the slashes, and before the definitions have the platform.system check set the slash variable to be either \\ or / I guess. It would make it kind of clunky though I guess.

Oh, just realized the kethane part definitions I did, they're all classified as utility lol. Don't know if that changes anything or not. Thought I had fixed that.

Noticed, for the 1m converter, and maybe the heavy drill, that it is importing something, but no meshes. If I delete everything else, then do a box select over empty space, it picks up parts of those two parts. Strange how all but two of the parts came in properly for the most part.

- - - Updated - - -

Another odd occurrence. I just realized that my "munbase1" that I previously rendered had the 1m kethane converter, but when I just tried to import it, they don't import. Though it seems there was not any problems with it in the console.

Edited by Sma
Link to comment
Share on other sites

Hum, the new update doesn't seem to work.

http://azurespace.net/Upload/images/capturecwc.png

There's the thing.

Hmm, works for me, other than still having trouble importing the heavy drill from Kethane.

Oh, did you make sure to update/change your kspdir.txt file in *path to blender*/scripts/addons/io_kspblender-master? I forgot to do that this morning when I test it it out lol. Also on windows I think you need \\ not just one.

Edited by Sma
Link to comment
Share on other sites

Hmm, works for me, other than still having trouble importing the heavy drill from Kethane.

Oh, did you make sure to update/change your kspdir.txt file in *path to blender*/scripts/addons/io_kspblender-master? I forgot to do that this morning when I test it it out lol. Also on windows I think you need \\ not just one.

I have. It seems to only not be able to load the "root" part on any of the craft.

Link to comment
Share on other sites

Can someone help me? Whether I move manually the camera or I fly it or I use Control-Alt-0, the camera doesn't show anything. It is there, but it is blind. Has it happened to you?

NOT SOLVED

Edited by mariohm1311
Link to comment
Share on other sites

Can someone help me? Whether I move manually the camera or I fly it or I use Control-Alt-0, the camera doesn't show anything. It is there, but it is blind. Has it happened to you?

It's might just be really far away from the craft

Link to comment
Share on other sites

No, it isn't. I have just found that the camera only sees objects when they are like 1 m away.

- - - Updated - - -

Look:

http://i.imgur.com/4nCWslC.png

You need to add some lights, or in this case, planes, and then set their material to emission. I'll put up a quick graphic on how to do that here in a few minutes.

http://imgur.com/a/ZdhDz#0 See if this helps.(Haven't really done IMGUR before so not sure if that like will work lol) I would have been more detailed but I have to run. Good Luck! :)

Edited by Sma
Link to comment
Share on other sites

No, it isn't. I have just found that the camera only sees objects when they are like 1 m away.

- - - Updated - - -

Look:

http://i.imgur.com/4nCWslC.png

First, select the camera. In the properties pane on the right, go to the little camera button and max out End under Clipping. Basically it's set to not render things that are too close or too far away, and the default setting isn't too great specifically for these imports.

- - - Updated - - -

Huh, it says "access denied" when I try to save the changed kspdir.txt file .....

Was it already inside your Program Files folder? Try editing it before you put it in there. I know sometimes Windows doesn't like its Program Files being messed with.

- - - Updated - - -

Hum, the new update doesn't seem to work.

http://azurespace.net/Upload/images/capturecwc.png

There's the thing.

There are a couple of things to check. Is your kspdir.txt pointing to the right spot, and using only single backslashes (Windows) or single forward slashes (Mac, Linux) now? Do you have the .mu importer addon enabled?

Link to comment
Share on other sites

First, select the camera. In the properties pane on the right, go to the little camera button and max out End under Clipping. Basically it's set to not render things that are too close or too far away, and the default setting isn't too great specifically for these imports.

- - - Updated - - -

Was it already inside your Program Files folder? Try editing it before you put it in there. I know sometimes Windows doesn't like its Program Files being messed with.

- - - Updated - - -

There are a couple of things to check. Is your kspdir.txt pointing to the right spot, and using only single backslashes (Windows) or single forward slashes (Mac, Linux) now? Do you have the .mu importer addon enabled?

I got it to work. I was simply pointing it at the wrong folder. This new update however seems to work worse then the other way on my weak laptop that I'm on now. (Ie constant crashes on load with craft over 100kb.)

Link to comment
Share on other sites

First, select the camera. In the properties pane on the right, go to the little camera button and max out End under Clipping. Basically it's set to not render things that are too close or too far away, and the default setting isn't too great specifically for these imports.

I had already done that. It doesn't solve it. :( Anyways, thanks.

Link to comment
Share on other sites

Sorry to bother you, but I've got a few questions. First off though, I'd like to say that this script looks amazing and the potential that it has added to the community is incredible. Now, for my questions.

- What does this do with textures? So far, the best programs to convert MBMs to PNGs are bare and clunky.

- Parts with animation modules, how does this script handle them?

- Finally, if you'd like, I can help with adding mod parts, the format seems simple enough.

Link to comment
Share on other sites

I had already done that. It doesn't solve it. :( Anyways, thanks.

So maybe you maxed out the clipping end. Try selecting everything and scaling it all down. If that doesn't do it I'm very confused.

- - - Updated - - -

Sorry to bother you, but I've got a few questions. First off though, I'd like to say that this script looks amazing and the potential that it has added to the community is incredible. Now, for my questions.

- What does this do with textures? So far, the best programs to convert MBMs to PNGs are bare and clunky.

- Parts with animation modules, how does this script handle them?

- Finally, if you'd like, I can help with adding mod parts, the format seems simple enough.

In no way are you "bothering" haha. Thanks for the questions.

- Textures are imported through the .mu importer addon that my addon requires. It leaves them as .mbm. I was able to find a .mbm to .png converter that I may use to help people get under the 50 MB limit on Sketchfab, but otherwise I'm okay (and Blender's okay) with just using .mbm

- The parts are imported with their animations, and this script moves the animation to before frame 0 so nothing is moving. Then, in the menu, you can "reverse" that animation that's before frame 0, and since Blender is set to maintain the position at the end of the animation that has the effect of toggling parts between deployed and undeployed.

- Please and thank you! Just let me know which mods so we don't get duplicate work. If you have questions about the process I'm happy to answer them.

- - - Updated - - -

I think you should also work on BD armory.

Also how do you get the wheels to fold in?

Will do. For the folding in, select the wheel and press K. You should see a "Toggle Deploy" option, and hopefully it does its job!

Link to comment
Share on other sites

Thank you for the update! First of all, can you provide a full guide on how to get a textured model on Sketchfab? All I can get is one without the textures!

I'll give it a shot when I get home (~5 hours from now). Others have told me that in order to fit under the 50 MB limit they had to leave off the textures anyway. At some point I'll be looking into a way to reduce that size specifically for Sketchfab.

- - - Updated - - -

Also, does anyone know how to change the thread title? I'd like to get rid of the "quotes" around "addon" because it's actually an addon now.

Link to comment
Share on other sites

So maybe you maxed out the clipping end. Try selecting everything and scaling it all down. If that doesn't do it I'm very confused.

- - - Updated - - -

In no way are you "bothering" haha. Thanks for the questions.

- Textures are imported through the .mu importer addon that my addon requires. It leaves them as .mbm. I was able to find a .mbm to .png converter that I may use to help people get under the 50 MB limit on Sketchfab, but otherwise I'm okay (and Blender's okay) with just using .mbm

- The parts are imported with their animations, and this script moves the animation to before frame 0 so nothing is moving. Then, in the menu, you can "reverse" that animation that's before frame 0, and since Blender is set to maintain the position at the end of the animation that has the effect of toggling parts between deployed and undeployed.

- Please and thank you! Just let me know which mods so we don't get duplicate work. If you have questions about the process I'm happy to answer them.

- - - Updated - - -

Will do. For the folding in, select the wheel and press K. You should see a "Toggle Deploy" option, and hopefully it does its job!

Thanks!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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