Jump to content

Some problems with Strut Connectors...


Recommended Posts

I\'ve uploaded the files for anyone to check them. But I cannot get strut connectors to work if modded. To test, I even imported a standard one, and exported. Even though I did not change anything, they were all wrong in game. The strut bolts had shrunk (to 0.1 scale) and the strut was sticking out at the wrong angle. Now, I guess this is because Blender insists on applying these options to the export, but I have no idea how to stop it. Before you ask, yes I rotated the parts, but Blender seems to want to continue to add additional transforms to them too.

'SC.blend' is the default Strut Connector. As an example, that is how it imports, yet it fails to export back to the game. :(

'testcubesc' is my attempt at exporting a custom model.

Any help would be much appreciated.

Link to comment
Share on other sites

Looking at the file for the strut connector, there\'s actually several things that are causing problems.

The default parts are built to a scale of 10 units/meter, but Blender\'s .dae importer forces the scene scale to 1 unit/meter and then applies individual scaling to each object in the file. This means you\'ll need to change the scene scale yourself. In the properties panel, select the Scene tab (the one with the icon that\'s a tiny sphere, cylinder, and light). Scroll down to the Units properties, set the Scale to 10 (i.e., the inverse of the scale setting in the part.cfg file), and make sure the units are set to Metric instead of None.

This will correct the scaling for most of the default parts, but it\'s not enough for these strut connectors because of a bug in Blender\'s .dae exporter. The problem is that the bolts at each end of the strut are parented to a geometry-less object (called an 'Empty' in Blender). These empties also get scaled on import, and that scaling incorrectly gets applied to their children during export.

There are a number of ways around this--I\'ll only describe one. In the 3D view, select one of the bolts. Remove the parent link by pressing ALT-P and choosing 'Clear Parent' (or look under Parent in the Object menu). Next, select the empty for that bolt (it\'s represented in the 3D viewport as the set of axes that\'s barely sticking out of the mesh) and press ALT-S to clear its scale. Finally, re-link the objects by first selecting the bolt, then hold SHIFT and click on the empty so they\'re both selected (in the correct order). Now press CTRL-P and choose 'Set Parent to Object.' Repeat for the other bolt.

As for the rotation, it\'s wrong because KSP assumes animated parts are created with the Y-axis as the vertical axis, while Blender exports parts with the Z-axis as vertical (this doesn\'t seem to be an issue for non-animated parts). Fortunately, this is easy to fix. Start by rotating everything so the Y-axis is up (this is only necessary if you rotated the part after import or you\'re making a new part from scratch). Export the collada file, then open it with a text editor. Near the top of the file, find the line '<up_axis>Z_UP</up_axis>' and change it to Y_UP. Now your strut connector should work in KSP.

Link to comment
Share on other sites

Ok, thanks. I\'ve followed half of those things before, but not the other half. It\'s the inconsistency (IE errors in Collada export/import) that\'s really confusing. Because If you correct everything, only half is, and if you leave half of it, the other half breaks. ???

Even worse, the likes of Sketcup strips the files important data. When importing from Sketchup, blender can totally trash a scene with parts in completely the wrong place.

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