Jump to content

Blender issue with re-parenting in .mu files


Recommended Posts

EDIT: It's not solved, but I've finally figured out what's happening. I don't think it has anything to do with KSP and is just a Blender issue. For reasons I haven't yet figured out, it's not adjusting the translations to be relative to the new parent. I have no idea why that's happening or why I have to reload to see if it happened.

I am brand new to modelling and Blender, so this might have a very obvious answer, but googling has not helped so far. I am using taniwha's Blender (2.83+) .mu import/export addon and Blender 2.83

I am working on some models someone else created for wheels, and I am trying to format the parent/child relationships in the model to look more like the stock wheels. However, when I reparent using "keep transform" the transforms are not preserved. Initially, they appear to be preserved (the model looks exactly the same as before reparenting), but when I export the model and re-import it, the model looks as though I reparented without "keep transform".

If it helps, this is the model I'm working on. I am creating an empty at the part origin, making that empty a child of the part, and then making the bay doors children of that empty. Again, it appears to work until export.

Is this an issue anyone already knows about and are there any solutions for it? If more information is needed, I am happy to provide it, but I don't know what else will be needed since, again, I am brand new to this.

P.S. I have seen that "keep transform" does not work with skew transformations, but I don't think deformation of any kind is occurring with these models, and that does not appear to be the problem.

 

EDIT: So far, the only clue I've found is that I can get the same effect as the error by manually rotating the object around the root into the position/rotation I want and then selecting "clear parent inverse". This puts it back into the same wrong position as just reparenting

Edited by Waifu Art Thou Romeo
Additional clue
Link to comment
Share on other sites

I mean that if I use "keep transform" when I reparent some component, the component stays in the same location visually. But when I export the .mu file, the component is in a very different spot. And not even all components would stay the same visually; some messed up immediately.

For some reason that I don't understand, they would always end up (visually) with the transformations from the property window relative to the global origin, but when I reimport them, they would be relative to the parent's origin, still using the transformation it got relative to the global origin. So if it needed to be 1m down from the parent's origin and 3m down from the global origin, it would end up 3m down from the parent's origin.

And the .blend file wouldn't show me that. It could look fine in the .blend, but when I exported the .mu (to actually use in-game) it would be all messed up

It's probably something I'm doing wrong, but I'm too new at this to be able to differentiate my human error from a bug

Edited by Waifu Art Thou Romeo
Link to comment
Share on other sites

So far as I am aware, you cannot export to a .mu file directly from blender even with Taniwha's plugin. You will need Unity and the KSP part tools to create a usable .mu file.

 

Edited by Randazzo
Link to comment
Share on other sites

Yes. Still running into problems, but I can at least successfully edit parts other people have made and load those parts into KSP doing this. I have not attempted making anything from scratch, though it looks like you can.

But for all I know, this could be why I'm having so much trouble getting the animations to work, though I don't think so.

Edited by Waifu Art Thou Romeo
Link to comment
Share on other sites

Just now, Waifu Art Thou Romeo said:

Yes. Still running into problems, but I can at least successfully edit parts other people have made and load those parts into KSP doing this. I have not attempted making anything from scratch, though it looks like you can.

But for all I know, this could be why I'm having so much trouble getting the animations to work, though I don't think so.

That is what makes me particularly skeptical, the animations. It's been a long time since I started but way back when I salvaged a couple animated parts from Zzz and Unity was the only option.

There used to be a lot of folks kicking around in here to offer help but time has taken its toll. Suffice it to say that if I can do it, you can too.

I still suggest getting your hands on Unity as that will show you most issues before you load it up in game. 

Begging their pardon now, pinging @Angel-125 and @CobaltWolf to perhaps spare us a minute from their exceedingly busy schedules.

Link to comment
Share on other sites

Would you expect the animations to not function at all or just be weird? The issue I'm running into is that I can trigger any animation I want it if I set it to the spotlight animation in the config, but I can't trigger it from the deployment section (I'm working on retractable wheels)

 

And fwiw I'm probably just going to switch to Kerbal Foundries anyway since it's so much better documented than stock, in which case I don't think I need to mess with the models anymore. But I will likely switch to Unity for doing this from here out, cause this was way more frustrating and hacky than it needed to be

 

Lastly, to be clear, I have gotten around the issues from the top post, it was just a horrible headache to do, due to Blender not correctly showing the positions of re-parented parts

Edited by Waifu Art Thou Romeo
Link to comment
Share on other sites

5 minutes ago, Waifu Art Thou Romeo said:

Would you expect the animations to not function at all or just be weird? The issue I'm running into is that I can trigger any animation I want it if I set it to the spotlight animation in the config, but I can't trigger it from the deployment section (I'm working on retractable wheels)

 

And fwiw I'm probably just going to switch to Kerbal Foundries anyway since it's so much better documented than stock, in which case I don't think I need to mess with the models anymore. But I will likely switch to Unity for doing this from here out, cause this was way more frustrating and hacky than it needed to be

 

Lastly, to be clear, I have gotten around the issues from the top post, it was just a horrible headache to do, due to Blender not correctly showing the positions of re-parented parts

When I tried it, the animations would "play" but nothing went the direction it should. So a foldable radiator became an explodable radiator. 

Kudos on getting that to work, I would not have thought it possible!

Link to comment
Share on other sites

I deserve very little credit. Kipard built this, and several other people have maintained it. I'm just reparenting the components and writing some configs

And probably these were built with the Unity method

On closer inspection, it looks like I cannot use the Unity method anyway, since I only have the .mu files and not the original models.

EDIT: Just in case anyone passes by and wants to solve my animation problem: I have found the source but not the explanation. If I have the light module in the config, retraction absolutely will not work. I have no idea why.

Edited by Waifu Art Thou Romeo
Link to comment
Share on other sites

@Waifu Art Thou Romeo

Hi I am a novice but, from my experience the problem is with the plugin, not blender. I use BforArtist 2 version 2.7 (equivalent of Blender 2.93alpha) which is a fork of blender and the last version I know for sure will accept the plugin. The plugin was never finished and it falls down in many areas. I get around them when I can and learn to live with it when I can't. I always have the problem when I drag parts in from a different .mu, into the part I am building. So I have learned to drag the parts in without manipulating them at all, Export the file, start a new session and then import the export back in. Now that it is back you can see which way around the export put them and work from there. When you manipulate them in the new import, they will stay that way when you export it next time. Always create a new export so that if anything stuffs up you don't lose everything. You can clear out old ones once you are sure things have gone right. I have no idea how to create animations from scratch, so if you do, I would love some info. Also how to show the texture skin on the model without having to use "Texture Project" Then the subsection "project" and then undo.

Link to comment
Share on other sites

5 hours ago, ColdJ said:

@Waifu Art Thou Romeo

I get around them when I can and learn to live with it when I can't.

...

I have no idea how to create animations from scratch, so if you do, I would love some info.

Yeah, that's the way I've been handling this as well. It is incredibly frustrating when it comes to orienting nodes, but the rest is somewhat tolerable.

And me either, sorry. I've just been using the animations provided by whoever originally created the models I'm working on.

Link to comment
Share on other sites

  • 1 year later...
On 2/1/2022 at 7:13 AM, Randazzo said:

So far as I am aware, you cannot export to a .mu file directly from blender even with Taniwha's plugin. You will need Unity and the KSP part tools to create a usable .mu file.

 

You can I do it often to make KK statics of multiple joined-together .mu models from different mods

On 1/31/2022 at 12:26 PM, Waifu Art Thou Romeo said:

EDIT: It's not solved, but I've finally figured out what's happening. I don't think it has anything to do with KSP and is just a Blender issue. For reasons I haven't yet figured out, it's not adjusting the translations to be relative to the new parent. I have no idea why that's happening or why I have to reload to see if it happened.

I am brand new to modelling and Blender, so this might have a very obvious answer, but googling has not helped so far. I am using taniwha's Blender (2.83+) .mu import/export addon and Blender 2.83

I am working on some models someone else created for wheels, and I am trying to format the parent/child relationships in the model to look more like the stock wheels. However, when I reparent using "keep transform" the transforms are not preserved. Initially, they appear to be preserved (the model looks exactly the same as before reparenting), but when I export the model and re-import it, the model looks as though I reparented without "keep transform".

If it helps, this is the model I'm working on. I am creating an empty at the part origin, making that empty a child of the part, and then making the bay doors children of that empty. Again, it appears to work until export.

Is this an issue anyone already knows about and are there any solutions for it? If more information is needed, I am happy to provide it, but I don't know what else will be needed since, again, I am brand new to this.

P.S. I have seen that "keep transform" does not work with skew transformations, but I don't think deformation of any kind is occurring with these models, and that does not appear to be the problem.

 

EDIT: So far, the only clue I've found is that I can get the same effect as the error by manually rotating the object around the root into the position/rotation I want and then selecting "clear parent inverse". This puts it back into the same wrong position as just reparenting

 Not sure if its the same thing you mean, but i believe if you hold shift while dragging to the parent you want it under- thats how to set it.

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