Jump to content

Main and Nose Landing Gear Rigging/Animating


Recommended Posts

hello !

a8ZUJGW.png

it's huge :cool: for now in cfg I use only scale =1

suspension work in SPH ,

[COLOR=#ff0000]the battle is almost down lol
I speak to fast the battle is not finish.......................[/COLOR]

, not tested yet in real condition

But bug on the steer thing it's an orientation problem I 'm sure, need to study that !!

just time to eat and a coffee ..

and I'm back

Edit : After Coffee thing

well wheelColliders work on Y so my setup for the steer axis is on Y too

result the whole ensemble steer on Z axis but left and right and not in the good orientation lol..................

So go to cfg and change :

MODULE

{

name = ModuleSteering

controlAxisType = Forward

steeringAxis = 0, 1, 0 change to 0,0,1 :confused:

.......

}

And now everything steer and wheelcollider seem to be fine

And the problem I have no correct explanation to give because it's pure chance lol !

I have to construct a big plane to test, or may using scale for testing.

Edited by stephm
corrected the almost down lol
Link to comment
Share on other sites

hi !

So based on my own gear as reference (work very well now) , with this front gear they are bug and it's always axis problem each time !!!!

Problem :

-the rotation steer object is correctly oriented, and work perfect to steer the plane.

but .. it's not centered on is turn axis, and when I look in KSP I have for now no idea on the actual axe use by steering

it's seem between the wheelcooliders's axis and it's own axis ...

-and no for the second bug, I'm pretty sure now, fXLookatposition don't like at all parent moving object, he need a fixed

object to work correctly and it's sad because that limit animation for the torque link object (these little part near wheel).

But don't pay attention for these bug the problem is me I think, (I hope because if I have right, possibility of anim part are very limited ........)

I continue my testing :wink:

edit 23h29 (French time)

Crup2wc.jpg

I have resolved all problem for steering and axis, stay an unique problem the FXlookatposition.

On picture the torque link part are driven by this module (FxLook...), and they are moving (along bleu line), the suspension

work, compression work , (hard to tell I can't find the word), seem to be parasite by the suspension movement

(I hope I'm clear :blush:) !

it's late for me :

I'm back tomorrow try to make picture on hierarchy in UNITY and correct axis orientation :wink:.

If someone could be reproduce this bug to confirm, or prove to me I'm wrong.....

Make an animated part, and on an moving object put some other object with FxLookatconstraint ..

steph

Edited by stephm
Link to comment
Share on other sites

Wow you did a lot of work! Are you some kind of a genius?

- Don't worry about the animation for this part. It looks good but this is only for a guide/tutorial anyway.

- I don't have any cfgs yet. scale = 1 is correct.

- One thing that could be causing your problems is that the models in blender are not aligned properly. It should be y-up I think. Right now the models are aligned to blenders axes.

- Another possibility could be to set up the torque arm hierarchy like NoMrBond drew it on the first page in this thread.

Good luck and thanks a lot, you've been very helpful.

Link to comment
Share on other sites

hi !

@Cpt.Kipard :

the blender model you have, is the first shot based on my own gear reference, and yes at start lot of problem !

Now I have modified some axis, and corrected some problem in blender and unity to have a correct model !

My problem for now it's just the FXlookat, for the rest it's ok :wink:, I have some idea about this Fxlookat and why

he have trouble need to conduct more test.

I'm thinking on you're Rear gear too, and for this part, we have to make some modification or looking for other

plugins !!

For cfg I have made my own it's work as separate part.

PART

{

// --- general parameters ---

name = SkylonNoseGear

module = Part

author = Cpt.Kipard

// --- asset parameters ---

mesh = SKNoseGear.mu

scale = 1.0

// --- node definitions ---

node_attach = 0.00, 4.675138, 0.00, 0.0, 1.0, 0.0, 1

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

TechRequired = landing

entryCost = 3200

cost = 450

category = Utility

subcategory = 0

title = Skylon Nose Gear

manufacturer = Reaction Engines Limited Skylon C2

description = SKYLON is an unpiloted, reusable spaceplane intended to provide reliable, responsive and cost effective access to space. Currently in early development phase, the vehicle will be capable of transporting 15 tonnes of cargo into space. It is the use of SABRE's combined air-breathing and rocket cycles that enables a vehicle that can take off from a runway, fly direct to earth orbit and return for a runway landing, just like an aircraft.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,1,1,1,1

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 1800

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

// --------------- module party -------------------------

MODULE

{

name = ModuleLandingGear

animationName = skylonNoseG_MOD

suspensionParentName = SUSP_DEPLACE

wheelName = NoseGearWheels

wheelRotationAxis = 1,0,0

deployedDragMax = 0.6

deployedDragMin = 0.4

BrakeTorque = 5.0

}

MODULE

{

name = ModuleSteering

steeringResponseSpeed = 0.3

controlAxisType = Forward

steeringAxis = 0, 0, 1

steeringTransformName = NoseGear_STEER

steeringLocked = false

steeringCurve

{

key = 0 16

key = 10 9

key = 30 2

key = 100 1

}

}

// ------------ Management Torque LINK ---------------

MODULE

{

name = FXModuleLookAtConstraint

//trackingModeString = Update

CONSTRAINLOOKFX

{

targetName = NoseGearTorqueArmTop_Lookat

rotatorsName = NoseGearTorqueArmTop

}

CONSTRAINLOOKFX

{

targetName = NoseGearTorqueArmBottom_LookAT

rotatorsName = NoseGearTorqueArmBottom

}

}

// ------------- this section manage the reel steering of plane--------------------

MODULE

{

name = FXModuleConstrainPosition

matchRotation = true

matchPosition = false

CONSTRAINFX

{

targetName = NoseGear_STEER

moversName = wheelCollider

}

}

MODULE

{

name = ModuleTestSubject

// nowhere: 0, srf: 1, ocean: 2, atmo: 4, space: 8

environments = 15

useStaging = False

useEvent = True

}

}

steph

edit : about you're private message

Ok :wink:

(I'm write here, because I'm not sure how the private message work on this forum, and

if my response is send correctly) .

And unfortunately I'm not a genius :blush: , may be all my info are wrong, if only somebody in squad

could adjust or confirm my explanation, in fact all thing in modding forum lol.

edit : fly test

CjnF72E.jpg

I can fly land, everything is good except the torque link Objects, they work (in compress way)

but they are permanently turning (slowly) it's a sadly bug I'm afraid..........

-Tested in unity Physics rigid body and fixedjoint -> do nothing

-Tested an added some fx constraint position on fxlookat dummy -> do weird thing lol

Torque link object are children of objects managed by module and it's the problem, and they are

no other solution to make a realistic torque link movement, with these module.......

For the rear gear it's more easy because we no need of the steering module, only WheelCollider that limit interference !

If you have a rear gear model ready to work it's time to work on it, in blender and unity to test the front and rear together

and choose how they came in simulator with plane or as separate part :wink:

Edited by stephm
Link to comment
Share on other sites

Hi , the torque links could be added as a completely different part, I would animate the gear with as few parts as possible. Then import the models for the torque links, this way they are separate from the animation hierarchy. I have run into similar problems myself and it's always caused by the rigidity of the animation hierarchy, in the sense that parts of the hierarchy are fixed in position so if you move them or rename them it breaks the animation.

As long as the torque links LOOKFX have something to look at it will follow, you could also use constrain fx to fix the torque arms in position on the landing gear using placed and childed game objects at torque arms pivot points, and in the cfg match position=true, match rotation=false.

It also seems to me that you'd be better treating this as an animated rover wheel rather than landing gear, the landing gear module is pretty useless for stuff like this.

Link to comment
Share on other sites

@SpannerMonkey:

hi !

ok I try that :

- make second game object with only the two torque link, no animation and link, on the main game object !

- and by the cfg file I try to manage position and rotation !

For rover wheel I'm a total crap , I need to learn every thing ! :blush:

I'm back later lol !

@Cpt.Kipard look in you private message I send you the model and the craft example to test and to

see the problem tell me if you the message !

@+

Edited by stephm
Link to comment
Share on other sites

re ! (French time)

ABPWO6A.jpg

it's not working same bug, I show you the screen to proove I have tested the tips :wink::

I have the same parasite rotation, all other function are present the torque link follow

the steer and the wheelcolider compression .

In the main gameobject I have separate the gear and the torque link it's ok no problem.

in on the main gear they are reference position for each torque link

in the second game object only the two game object with FxLookat reference !

and not linked with the gear game object :

this is the new CFG :

// ------------ Management Torque LINK ---------------

MODULE

{

name = FXModuleConstrainPosition

matchRotation = false

matchPosition = true -> using to place the torque link (Work in game)

CONSTRAINFX

{

targetName = Origine_NoseGearTorqueArmBottom

moversName = NoseGearTorqueArmBottom

CONSTRAINFX

{

targetName = Origin_NoseGearTorqueArmTop

moversName = NoseGearTorqueArmTop

}

}

MODULE this section work too

{

name = FXModuleLookAtConstraint

CONSTRAINLOOKFX

{

targetName = NoseGearTorqueArmTop_Lookat

rotatorsName = NoseGearTorqueArmTop

}

CONSTRAINLOOKFX

{

targetName = NoseGearTorqueArmBottom_LookAT

rotatorsName = NoseGearTorqueArmBottom

}

}

in unity :

oCX3IUp.jpg

The best thing to do I think,and if you have time, it's to make an example with basic object :blush:, if you have time.

like my two part sample for the two basics modules.

steph

edit (French time 19:19) modified cfg file for the FXModuleConstrainPosition see up

it's just cosmetic .

And always the same bug ;.;.

edit (French time 20:01)

I think I have find the trick, by faking some position, the torque link are limited on there movement

and this setup give me the possibility to make a static reference for one of the FxlookatConstraint target !

that demand a little geometry modification on the torque arm for the decompressed position (starting position on ground).

but I have a result !

@+

Edited by stephm
Link to comment
Share on other sites

hi ! (bonsoir , bonjours selon les horaires)

p1v0vwT.gif

It's not a big trick only one of FxlookatXConstraint is now parented not on the torque link (the true link )

but on the SUS_DEPLACE, it's fake in the way how a linked geometry like torque link work.

The illusions work because we have a little movement hopefully !!

@Cpt.Kipard:

send to you (private message) the last version without bug, take no attention about braking and damping suspension

The three wheelcolliders will be tweaked together with the full plane .

@+

Edited by stephm
Link to comment
Share on other sites

Just FYI, I think firespitter allows two wheel colliders, so I will be using that in my main gear.

This thread is for development of landing gear in general, and I don't think we need to get into the double rear gear right now.

Edited by Cpt. Kipard
Link to comment
Share on other sites

ok sorry for that :blush:, I remove the picture

concerning firespitter ok , but one wheel work and it's invisible in KSP how the gear work :wink:.

For the front gear is finished I think, it's a question now of texturing and perhaps light !

or other stuff if you like some details .

steph

Edited by stephm
Link to comment
Share on other sites

  • 1 month later...

Back again. I'm making progress of sorts. I have managed to export a badly mangled version of the nose landing gear into KSP, and at least it behaves like a wheel, but there's a couple of problems with it.

1. The shock absorber mesh starts a fair distance from its parent mesh, and only returns to the place where I wanted it to be after the retract animation has finished. It just snaps into place.

2. The orientations have me really confused. For some reason when exporting an fbx animation the mesh orientations are different from single objects imported directly from blender.

Halp ples. With stephm gone I have no way of asking him to clarify his Unity scene, and despite trying to follow it exactly I had to make some changes, which caused these problems.

Edited by Cpt. Kipard
Link to comment
Share on other sites

1. The shock absorber mesh starts a fair distance from its parent mesh, and only returns to the place where I wanted it to be after the retract animation has finished. It just snaps into place.

the suspension parent is tied to wheelcollider and not affected by animation. When there's no weight on it, the wheelcollider suspension goes to full extension, and only gets pushed into place by some other collider (whatever the gear is mounted on) when the animation gets to fully retracted postion.

Link to comment
Share on other sites

the suspension parent is tied to wheelcollider and not affected by animation.

What does that mean?

When there's no weight on it, the wheelcollider suspension goes to full extension

Yes

and only gets pushed into place by some other collider (whatever the gear is mounted on)

What does that mean?

also:

3. The shock absorber starts offset backwards from the vertical axis

edit

4. The preview on the left is on its "back" and not oriented correctly like the stock landing gear.

Edited by Cpt. Kipard
Link to comment
Share on other sites

the wheelcollider looks like a circle with a ray from the center. The ray should be pointed down at the ground. the circle aligned to plane of travel, direction doesn't matter, as long as it's aligned. suspension distance setting is the distance from tip of the ray (target position 0) to where it intersects the wheel circle (target position 1). When the gear is loaded, suspension parent object is placed at the target position you've set, default is 0 (tip of the ray, full extension). wheelcollider will ignore other colliders set to the "wheelcolliders Ignore" layer. typically other colliders near the wheelcollider on the landing gear part. but other parts, like wings or fuselages, are not set to wheelcolliders ignore and they will push the landing gear "in" when the wheelcollider contacts their colliders.

basically it means it's best to make the gear bay large enough to hold the gear at full extension; or you'll likely see the gear pop into place as the retract animation finishes.

3. The shock absorber stars offset backwards from the vertical axis

probably because suspension parent object is not at the same starting point as center of wheelcollider. or wheel collider is not at the same position as vertical axis.

Link to comment
Share on other sites

I don't know anything about Unity layers.

Maybe this will help. If anyone needs any more info please tell me. When I was arranging the hierarchy I placed all the meshes in the fully extended configuration.

This is the hierarchy. The objects with "Origin" suffix are empty game objects. The meshes are arranged as I wanted them to look by default with the exception of the torque arms because I don't yet know what to do with them.

0I8U7lA.png

...but this is how the suspension meshes behave. It's extended a lot more than I want it, and only goes back to the "correct" position when retracted.

LQwJomD.gif

probably because suspension parent object is not at the same starting point as center of wheelcollider. or wheel collider is not at the same position as vertical axis.

This makes sense, thanks. It also explains why stephm made the wheelCollider offset from the wheel mesh.

Edit

I've changed the Unity screenshot to show the wheelCollider settings

Edited by Cpt. Kipard
Link to comment
Share on other sites

you are very close. you want to set the starting position of the suspension mesh objects to full compression. the suspension piston mesh needs to be longer. The wheelcollider should be rotated around the X-Axis so the ray is pointed along +Z, away from the gear bay.

you also need two layers,

layer 26, WheelCollidersIgnore. wheelcollider will pass through any collider set to this layer. Mesh objects in this layer will be invisible.

layer 27, WheelColliders, wheelcollider(s) set to this layer.

Edited by nli2work
Link to comment
Share on other sites

Ok I'll see what I can do.

More problems. I got the torque arms to make use of look-at constraints, but they don't rotate with their parents when I steer.

Here's the config file.

PART

{

// --- general parameters ---

name = KipEngSkylonNoseGear

module = Part

author = Cpt. Kipard

// --- asset parameters ---

mesh = SKNoseGear.mu

scale = 1.0

rescaleFactor = 1

MODEL

{

model = KipEng/parts/SkylonC2/SkylonNoseGear

}

// --- node definitions ---

node_stack_top = 0, 0, 0.2, 0, 0, -1, 2

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

TechRequired = landing

entryCost = 3200

cost = 450

category = Utility

subcategory = 0

title = Skylon Nose Gear

manufacturer = Kip. Engineering

description = Skylon Nose Gear

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,0,1,0,1

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 1800

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

// --------------- module party -------------------------

MODULE

{

name = ModuleLandingGear

animationName = NoseGearAnim

suspensionParentName = ShockAbsorberOrigin

wheelName = NoseGearWheels

wheelRotationAxis = 1,0,0

deployedDragMax = 0.6

deployedDragMin = 0.4

BrakeTorque = 3.0

}

MODULE

{

name = ModuleSteering

steeringResponseSpeed = 0.1

controlAxisType = Forward

steeringAxis = 0, 1, 0

steeringTransformName = NoseGearSteering

steeringLocked = false

steeringCurve

{

key = 0 16

key = 10 9

key = 30 2

key = 100 1

}

}

// ------------- Steering --------------------

MODULE

{

name = FXModuleConstrainPosition

matchRotation = true

matchPosition = false

CONSTRAINFX

{

targetName = NoseGearSteering

moversName = wheelCollider

}

}

// ------------ Torque Arms ---------------

MODULE

{

name = FXModuleLookAtConstraint

CONSTRAINLOOKFX

{

targetName = TopArm_LookAt

rotatorsName = NoseTorqueArmTop

}

CONSTRAINLOOKFX

{

targetName = BottomArm_LookAt

rotatorsName = NoseTorqueArmBottom

}

}

}

Link to comment
Share on other sites

you shouldn't need the Position constraint for steering as your steering module already moves the Steering parent object. you can child the wheelcollider to NoseGearSteeringOrigin.

you wanna set the steering object to NoseGearSteeringOrigin. that's the transform that contains all the stuff. NoseSteering will only move BottomArm_LookAt and NoseTorqueArmTop.

Edited by nli2work
Link to comment
Share on other sites

Ok I rearranged the hierarchy like you said.

1. The torque arms still act weird.

2. The shock absorber mesh still looks detached, despite the fact that I moved the parent up towards the bay AND decreased the Suspension Distance

By the way the wheelCollider ray was always pointing away from the bay.

EDIT

Only the meshes get extended. The wheelCollider behaves correctly, but the wheel is embedded in the ground.

qeSuK7Z.gif

Revised cfg. Relevant changes in bold.

PART

{

// --- general parameters ---

name = KipEngSkylonNoseGear

module = Part

author = Cpt. Kipard

// --- asset parameters ---

mesh = SKNoseGear.mu

scale = 1.0

rescaleFactor = 1

MODEL

{

model = KipEng/parts/SkylonC2/SkylonNoseGear

}

// --- node definitions ---

node_stack_top = 0, 0, 0, 0, 0, -1, 2

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

TechRequired = landing

entryCost = 3200

cost = 450

category = Utility

subcategory = 0

title = Skylon Nose Gear

manufacturer = Kip. Engineering

description = Skylon Nose Gear

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,0,1,0,1

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 1800

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

// --------------- module party -------------------------

MODULE

{

name = ModuleLandingGear

animationName = NoseGearAnim

suspensionParentName = ShockAbsorberOrigin

wheelName = NoseGearWheels

wheelRotationAxis = 1,0,0

deployedDragMax = 0.6

deployedDragMin = 0.4

BrakeTorque = 3.0

}

MODULE

{

name = ModuleSteering

steeringResponseSpeed = 0.5

controlAxisType = Forward

steeringAxis = 0, 0, 1

steeringTransformName = NoseGearSteeringOrigin

steeringLocked = false

steeringCurve

{

key = 0 16

key = 10 9

key = 30 2

key = 100 1

}

}

// ------------- Steering --------------------

//MODULE

//{

// name = FXModuleConstrainPosition

// matchRotation = true

// matchPosition = false

// CONSTRAINFX

// {

// targetName = NoseGearSteeringOrigin

// moversName = wheelCollider

// }

//}

// ------------ Torque Arms ---------------

MODULE

{

name = FXModuleLookAtConstraint

CONSTRAINLOOKFX

{

targetName = TopArm_LookAt

rotatorsName = TopArmOrigin

}

CONSTRAINLOOKFX

{

targetName = BottomArm_LookAt

rotatorsName = BottomArmOrigin

}

}

}

Edited by Cpt. Kipard
Link to comment
Share on other sites

I'll take a look at the blender file tonight from couple pages back if there isn't an updated one. You are 95% there. in the mean time few things to change if you haven't already.

dpW1SLz.jpg

the gif is correct behaviour since KSP doesn't have setting for Up-target. the lookAtConstraint will remain in the same plane as start, only rotate around X to point at the target.

Edited by nli2work
Link to comment
Share on other sites

The left has already been done and it seems to have made no difference at all. I'm not sure about the right; it seems a little hacky. If you want to look at the model, then I'll just upload the Unity scene and new models. I'll do it tomorrow.

Thanks for today.

Link to comment
Share on other sites

The left has already been done and it seems to have made no difference at all. I'm not sure about the right; it seems a little hacky. If you want to look at the model, then I'll just upload the Unity scene and new models. I'll do it tomorrow.

Thanks for today.

f- waiting, it was this or watching boring Zbrush tutorials for the billionth time :D. Here's the setup using the file you posted couple pages back. If you set the pivot of the parts to match how they should move, you would save yourself the trouble of adding all those extra transforms in Unity. but be that as it may... I just rigged this and animated it in Unity. The suspension piston arm needs to be a bit longer. you can see the tiny gap in a few instances. I didn't do the bay doors, they are easy though. The lights will dim if you key them in the animation clip. Otherwise they will stay on all the time. The status light color change is hard coded in the landing gear module. bright spot light is free to animate and color. Check your PM for Unity and Part/config file.

edCbWFP.jpg

Edited by nli2work
Link to comment
Share on other sites

Ok I'm going through this now.

I'm having difficult working out the locations of the transforms. Because there are meshes childed to the transforms, clicking the parents doesn't show the translation handles at the place of the parent, instead it shows the average location (I think) of the whole branch of the hierarchy. How do I view just the location of the parent?

Nevermind I found it. There's a Pivot/Center toggle at the top.

Edited by Cpt. Kipard
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...