Jump to content

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


Dasoccerguy

Recommended Posts

Well, the landing gears have the texure but they are not placed correctly. Moreover they only take a small part of the UV image and are at the top (or bottom ?) of the image, so when you rotate it with the script, it rotates it but around the vertices layout center and not the image center. So, I doesn't have any real effect.

For the landing gear you have to go back to the good old method of placing the vertices correctly in the UV editor, but it just needs a rotation of 180°, a rescale of -1 and a translation... Fortunately we don't have to resize with weird factors and move vertices.

Link to comment
Share on other sites

Well, the landing gears have the texure but they are not placed correctly. Moreover they only take a small part of the UV image and are at the top (or bottom ?) of the image, so when you rotate it with the script, it rotates it but around the vertices layout center and not the image center. So, I doesn't have any real effect.

For the landing gear you have to go back to the good old method of placing the vertices correctly in the UV editor, but it just needs a rotation of 180°, a rescale of -1 and a translation... Fortunately we don't have to resize with weird factors and move vertices.

Oh wow , that's serious

Link to comment
Share on other sites

So update time for the recent changes:

Please download the newest version of the mu importer, it supports .dds files and in fact it had been for more than 3 weeks...

EDIT: Wow, it's really big

Sorry for not checking before ;.;

However texture are still not right. I will try to do something.

Also, if you are using Blender 2.74 you might have problem with things like clamps, but nothing too bad. It will show an error message but evrything is ok-ish .

Edited by Cptman
Link to comment
Share on other sites

So update time for the recent changes:

Please download the newest version of the mu importer, it supports .dds files and in fact it had been for more than 3 weeks...

EDIT: Wow, it's really big

Sorry for not checking before ;.;

However texture are still not right. I will try to do something.

Also, if you are using Blender 2.74 you might have problem with things like clamps, but nothing too bad. It will show an error message but evrything is ok-ish .

I just tried importing from 1.0.2 on Blender 2.74 for the first time tonight. It ends up throwing some errors after loading the root part, and some colider mesh looking thing (just a cylinder) and a collider mesh for the other cockpit I guess. I did download the updated mu importer. The texture was as you said messed up, but I just went into edit mode, selected all the vertices from the UV mesh, and went to (in the uv editor window) the UV's menu -> mirror -> y axis, and that fixed the texture problem. Now, to figure out the problem that causes the script to crash....


Traceback (most recent call last):
File "/home/sma/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_kspblender-master/__init__.py", line 59, in execute
return import_craft.import_craft(self,context,**keywords)
File "/home/sma/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_kspblender-master/import_craft.py", line 63, in import_craft
craft = import_parts(filepath,partdir,rightscale,right_location)
File "/home/sma/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_kspblender-master/import_craft.py", line 223, in import_parts
material_fixer(obj,part)
File "/home/sma/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_kspblender-master/import_craft.py", line 710, in material_fixer
possible_img = [image for image in bpy.data.images if imA.texture.name in image.name]
File "/home/sma/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_kspblender-master/import_craft.py", line 710, in <listcomp>
possible_img = [image for image in bpy.data.images if imA.texture.name in image.name]
AttributeError: 'NoneType' object has no attribute 'name'


Maybe the same thing that was happening with the mu importer with changing from mbm to dds?

T0ZOUUk.png

RDvhifd.png

ujUKiSZ.png
Edited by Sma
Link to comment
Share on other sites

so it works for 1.0.2 now?

Sort of, but not exactly. As others have noted, and I just tested it will import stock craft files just fine, other than texture rotation/position problems, most of which I managed to fix by rotating the UV mesh (or rather, mirroring it on the Y axis, though some had to be mirrored on X axis, and repositioned, the RTG's on the ion probe for example). Craft that I made in the VAB or SPH though only import the root part. When I tried to import a jet I made, it just imported the first cockpit I put, and a collider for the 2nd cockpit. When I tried to import a rocket I made, it imported the capsule, and because I had 2 of the same capsule that one imported as well, along with 2 struts, but the script crashed and nothing else came in.

I downloaded the new MU importer (well, new as of when I downloaded it last night) but before that it would do the same thing, except no textures at all.

Link to comment
Share on other sites

So, have smoke effects from engins been put in yet? I saw that you learned how to do smoke and fire in blender so I'm curious.

That was just by following some smoke tutorials for blender. I don't think you can import smoke/fire from KSP. Unless I missed something.

Link to comment
Share on other sites

That was just by following some smoke tutorials for blender. I don't think you can import smoke/fire from KSP. Unless I missed something.

Oh, I still kind of need to learn how. Can you link the tutorials?

Link to comment
Share on other sites

I also suggest going through all of Andrew Prices (BlenderGuru) videos if you really want to get into Blender, he has a lot of good free stuff. Also, if you can justify spending the money it, he has a lot of neat classes or academies where he provides you with all the textures, references and HDRI images that may be needed in order to do a scene. I haven't done any of the classes yet, but there have been a few that look really neat, like grass essentials.

Link to comment
Share on other sites

I also suggest going through all of Andrew Prices (BlenderGuru) videos if you really want to get into Blender, he has a lot of good free stuff. Also, if you can justify spending the money it, he has a lot of neat classes or academies where he provides you with all the textures, references and HDRI images that may be needed in order to do a scene. I haven't done any of the classes yet, but there have been a few that look really neat, like grass essentials.

I'll look into it. Thanks!

Link to comment
Share on other sites

Hey everyone! I haven't had time to make this work with 1.0 yet. Hopefully I'll get to it this week at some point. It's just a bit... exhausting to code all day at work and then come home and code a bunch more. I'll be sure to get to all your questions when I fix things. As for now, if you manage to fix anything yourselves please let me know! I'm aware that apparently the textures are mirrored across the Y axis and now using a different file format than before. I'm not totally sure how to fix everything yet, but I promise I will!

Link to comment
Share on other sites

It says something about a main error with the Mark1 Cockpit when I try to import my .craft file, i can send the .craft if you can send the .blend to me. Here's the link to my craft (KSP 1.0)

http://www./download/45ac49akhapwvpp/C7+Highliner.craft

My email is [REDACTED], you can email me the .craft. It would help if you can PM me your email so I can expect the email from you.

Thanks,

legoclone09

- - - Updated - - -

That's my problem, sorry for posting two things in a row.

Edited by legoclone09
Link to comment
Share on other sites

Hey everyone! I haven't had time to make this work with 1.0 yet. Hopefully I'll get to it this week at some point. It's just a bit... exhausting to code all day at work and then come home and code a bunch more. I'll be sure to get to all your questions when I fix things. As for now, if you manage to fix anything yourselves please let me know! I'm aware that apparently the textures are mirrored across the Y axis and now using a different file format than before. I'm not totally sure how to fix everything yet, but I promise I will!

Can't wait for the fix :D

Link to comment
Share on other sites

  • 2 weeks later...

Tried messing around with this again. It's been a while so I might have already figured this out, but stock craft load no problem, other than maybe part placement and textures. I tried loading crafts from 0.9 and the loaded too, though again part placement and textures. However, 1.0.2 craft only seem to load a few parts (same texture alignment issues, easily fixed in blender uv editor). I might try some more testing with it and see if I can help figure out what could be going on.

Though...I know next to nothing about python scripts lol.

Update Thought I'd start by trying to figure out why the addon crashes, so I started out with a simple ship. Mk1 pod, Adv SAS, fl-t800 tank and the reliant engine. That imported fine pretty much except the mesh for the engine didn't come in. However if I added another part after the engine the mesh does come in but it doesn't grab the right textures, lacks an actual color image map for the engine. I added the swivel engine and the texture came in but again the engine mesh didn't load. So far though no crashes, at least none that it throws errors about. All the parts have been attached one after another so far. Later I'll try attaching radial parts, and also parts before and after the root part.

Edited by Sma
Added Testing results
Link to comment
Share on other sites

I've used KSP 1.0.2 with the importer. The UV's were mirrored but I fixed that in Blender.

Huh, when I try it, after the first 2 or 3 parts it usually crashes, except with stock crafts, and the case as mentioned above. It's possible though the addon might be having problems parsing the craft files due to mods. I guess I'll have to try removing my mods and making something.

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