Jump to content

Bones: Do they work in ksp?


Recommended Posts

I made a landing gear model with 4 small armatures to animate a linkage (I think), bending. The thing is however, I dont think it works. Unfortunately for the purposes of suspension, I dont think an animation would work, so is it at all possible to have bones in ksp?

 

Spoiler

cMKR87P.png

 

Edited by USB4
Link to comment
Share on other sites

4 minutes ago, CobaltWolf said:

I don't think you need to animate the linkages, they work with constraints I think? But they should work, yeah.

Different View

Im not sure its possible to make from just constraints, at least the ones in ksp. If they had influence levels I could see it, but without them Im not sure how.

Link to comment
Share on other sites

2 minutes ago, USB4 said:

Different View

Im not sure its possible to make from just constraints, at least the ones in ksp. If they had influence levels I could see it, but without them Im not sure how.

Hrmm, it's late but I definitely think there's a way to do it if you're just smart with your hierarchy and fxModuleLookAtConstraints. Just have an empty node in the middle there that moves up and down with the wheel? and have the two linkage arms aim constrained to the point?

Link to comment
Share on other sites

1 minute ago, CobaltWolf said:

Hrmm, it's late but I definitely think there's a way to do it if you're just smart with your hierarchy and fxModuleLookAtConstraints. Just have an empty node in the middle there that moves up and down with the wheel? and have the two linkage arms aim constrained to the point?

Thought about that too, but then one of them would never move while the other would move  and disconnect from the joint between them both. The empty would have to move half the distance of the wheel.

Link to comment
Share on other sites

12 minutes ago, USB4 said:

Thought about that too, but then one of them would never move while the other would move  and disconnect from the joint between them both. The empty would have to move half the distance of the wheel.

Oh damn, you're right. So you'd need an IK chain... I don't know if those would work. They're probably not coded into the .mu format.

Edited by CobaltWolf
Link to comment
Share on other sites

6 hours ago, CobaltWolf said:

Oh damn, you're right. So you'd need an IK chain... I don't know if those would work. They're probably not coded into the .mu format.

Yup. Thats what I have in Blender, but it doesnt seem to translate

Link to comment
Share on other sites

I used bones to revive the @Porkjet atomic jet engine, bones allow to move the vertex of a mesh with an animation for the nozzle,
i haven't used it myself for animating different rigid pieces of a part, specially driven by the physic but maybe there is a way to do it by using this stock module (also used in the atomic jet engine)?

	MODULE
	{
		name = FXModuleConstrainPosition
		matchRotation = false
		matchPosition = true
		CONSTRAINFX
		{
			targetName = thrust01
			moversName = 01
		}
	}

you can grab the blender engine model for an example here:
https://github.com/linuxgurugamer/RecycledParts/tree/master/AtomicAgeUpdates/BlenderModels
and the mod itself here:
https://forum.kerbalspaceprogram.com/index.php?/topic/164829-131-spacetux-industries-recycled-parts/#comment-3157698

 

Edited by Skalou
Link to comment
Share on other sites

Bones and armature animations work fine in KSP, but Unity doesn't understand bone constraints from modelling programs, that information all just gets dropped in Unity. To get armature animations working properly you have to bake any bone animations before exporting the model to Unity.

The flexible docking ports from this mod use some ridiculous bone setups to work by simply baking several animations and blending them manually in KSP.

U9qPilL.png

 

There are some instructions in Unity for importing humanoid models to work the IK in Unity, but I don't think that translates in any way to something generic, it's just for human legs and arms. There are almost certainly ways of getting IK chains to work, at least for relatively simple cases where the joints are constrained and don't have much freedom of movement (my understanding is that long IK chains can have a large performance impact), but CobaltWolf is probably right that such information would be lost in the .mu files.

I found this a while ago discussing how to set up your own IK chain in Unity, it seems somewhat similar to the wheel joint setup you have: https://www.alanzucconi.com/2017/04/10/robotic-arms/

But it would require some coding to get everything integrated and working in KSP.

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