Jump to content

[Solved]engine not drawing fuel/How to make engines gimbal/have fairings


Recommended Posts

I've finally gotten a engine properly modeled/textured/exported into Unity/get it in game. However, it doesn't have the "engine" part in it, such as the ability to gimbal & have it's own fairings (as I do not know such things).

So could anyone tell me how to make an engine gimbal through blender (or Unity, if that's the way to do it), and the ability to have a fairings.

It would really help

also I would like to thank the people who have helped me in past threads. YOU GUYS ARE AWESOME!

Edited by gooddog15
Link to comment
Share on other sites

I can't explain fairings or gimbals off the top of my head, but I do have an engine with a fairing that you can use as a reference part if you'd like. In fact, let me put together an engine with gimbals and fairings so that you can see how all of those work.

Link to comment
Share on other sites

I can't explain fairings or gimbals off the top of my head, but I do have an engine with a fairing that you can use as a reference part if you'd like. In fact, let me put together an engine with gimbals and fairings so that you can see how all of those work.

that would be awesome!

Link to comment
Share on other sites

MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform //any transform will do, children of it will move along with it. thrustTransform is most logical one to use.
gimbalRange = 10 //range in degrees
useGimbalResponseSpeed = true // if true; gimbal will smoothly rotate to input value instead of snapping to maximum
gimbalResponseSpeed = 6 //how fast gimbal will rotate, only applicable if previews setting is set to true
}


MODULE
{
name = ModuleJettison
jettisonName = ED250_Fairing //separate mesh that appears when something is attached to the node set in the next variable; the mesh detaches when the lower part is staged
bottomNodeName = bottom //a part attached to this node will make the fairing mesh visible. must be a stack node
isFairing = True //affects Drag when the fairing is on.
jettisonedObjectMass = 0.1 // mass of the jettisoned mesh as debris
jettisonForce = 5 // impulse on the fairing mesh when jettisoned
jettisonDirection = 0 0 1 //in XYZ format; +Z is same direction as engine thrust, or some other direction you set.

}

Edited by nli2work
Link to comment
Share on other sites

Here's the example Unity package and the exported part that you can use in KSP to see its functionality (just put that part in GameData)

EngineExample.zip

THANK YOU SO MUCH! you deserve a puppy :)

I think I know what's going on here. There's at least 3 meshes that consists a single engine.

the first is the base, which is stationary, the second is the engine nozzle, which is what moves, and finally the third piece is the fairing.

It's pretty simple, except the possibility of animating the nozzle in Unity.

MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform //any transform will do, children of it will move along with it. thrustTransform is most logical one to use.
gimbalRange = 10 //range in degrees
useGimbalResponseSpeed = true // if true; gimbal will smoothly rotate to input value instead of snapping to maximum
gimbalResponseSpeed = 6 //how fast gimbal will rotate, only applicable if previews setting is set to true
}


MODULE
{
name = ModuleJettison
jettisonName = ED250_Fairing //separate mesh that appears when something is attached to the node set in the next variable; the mesh detaches when the lower part is staged
bottomNodeName = bottom //a part attached to this node will make the fairing mesh visible. must be a stack node
isFairing = True //affects Drag when the fairing is on.
jettisonedObjectMass = 0.1 // mass of the jettisoned mesh as debris
jettisonForce = 5 // impulse on the fairing mesh when jettisoned
jettisonDirection = 0 0 1 //in XYZ format; +Z is same direction as engine thrust, or some other direction you set.

}

also nil2work, you also deserve a puppy, as you've probably made my life with easier with your code.

Edited by gooddog15
Link to comment
Share on other sites

You don't need to animate the gimbal at all, as long as you put your nozzle model as a child of the thrustTransform it'll rotate when the thrust rotates. As for the fairings, make sure to change their object tag to Icon_Hidden so they show up only when something is connected to them.

As a note for the future, all this information is already handily available in the Mod Development Links Compilation thread.

Link to comment
Share on other sites

You don't need to animate the gimbal at all, as long as you put your nozzle model as a child of the thrustTransform it'll rotate when the thrust rotates. As for the fairings, make sure to change their object tag to Icon_Hidden so they show up only when something is connected to them.

As a note for the future, all this information is already handily available in the Mod Development Links Compilation thread.

If I may ask a potentially stupid question, what is a child?

Is it a object that is "stacked" on another object in hierarchy? If so, would I just simply drag the nozzle model into thrust transform in hierarchy?

Also, to kill a 2 birds with one stone, My engine doesn't drain fuel from a fuel tank.

I think it's a problem with my


{

name = Bluestreak_engne
module = Part
author = Gooddog15

mesh = model.mu
scale = 1.0
rescale = 1.0

fx_exhaustFlame_blue = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -2.2, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, flameout

sound_vent_medium = engage
sound_rocket_mini = running
sound_vent_soft = disengage
sound_explosion_low = flameout

node_stack_top = 0, 1.0, 0, 0.0, 1.0, 0.0, 2

TechRequired = generalRocketry
entryCost = 800
cost = 750

category = Propulsion
subcategory = 0
title = Bluestreak engine mount
manufacturer = Technical Dynamics
description = packing two Rolls Royce RZ2 engines, the bluestreak engine mount powers the 1st stage of the europa-1 launch vehicle

attachRules = 1,0,1,1,0

mass = 0.245

dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
breakingForce = 200
breakingTorque = 200
crashtolerance = 45
maxTemp = 3400

dragCoeff = 0.1
deflectionLiftCoeff = 1.85

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 1200
heatProduction = 450
fxoffset = 0, 0, 1.2
PROPELLENT
{
name = Liquidfuel
ratio = 1.6
DrawGauge = True
}
PROPELLENT
{
name = Oxidizer
ratio = 1.1
}
atmosphereCurve
{
key = 0 370
key = 1 320
}
}
PART

Edited by gooddog15
Link to comment
Share on other sites

looking at the Heirarchy panel in Unity the tree looks like this

Parent

  • Children
    • child's child
      • child's child's child ad inf...

    [*]Children

One parent can have many children; each child only has one parent.

What do you mean "does not drain from a tank"? Engine is not drawing fule from the tank it is directly attached to? or only draws from the tank it's attached to and not other tanks?

Link to comment
Share on other sites

What do you mean "does not drain from a tank"? Engine is not drawing fule from the tank it is directly attached to? or only draws from the tank it's attached to and not other tanks?

It doesn't drain from the tank it's directly attached to.

Link to comment
Share on other sites

I'm just curious about these lines:

dragCoeff = 0.1
deflectionLiftCoeff = 1.85

I haven't seen them in other engines.

Are they necessary?

---------------

Did you use a stock tank or created your own one and maybe messed up some parts?

Edited by ximrm
Link to comment
Share on other sites

It doesn't drain from the tank it's directly attached to.

To clarify:

- If you have your engine and only one fuel tank, does that fuel tank drain when the engine is running?

- If you have your engine and two fuel tanks stacked on top of each other, does the tank furthest from the engine drain first?

If both are true, then that should be normal game behaviour - engines should always drain from tanks furthest away from the engines.

Link to comment
Share on other sites

I'm just curious about these lines:

dragCoeff = 0.1
deflectionLiftCoeff = 1.85

I haven't seen them in other engines.

Are they necessary?

---------------

Did you use a stock tank or created your own one and maybe messed up some parts?

I took it from Orbitus II's example config. I also wondered the same thing, but I put it in for the heck of it.

To clarify:

- If you have your engine and only one fuel tank, does that fuel tank drain when the engine is running?

- If you have your engine and two fuel tanks stacked on top of each other, does the tank furthest from the engine drain first?

If both are true, then that should be normal game behaviour - engines should always drain from tanks furthest away from the engines.

I used the stock 2m mid fuel tank. I'll check the fuel tanks config as I may have accidently damaged it when I was probing the game for examples.

And also my engine doesn't seem to drain from any tanks connected to it. I haven't checked if fuel lines connected to it would work. It might be a problem with Orbitus's config as mine was based on it.

edit: checked the fuel tanks config, and nothing was wrong. I also tested with different fuel tanks and fuel line but both didn't work. I also took out

dragCoeff = 0.1deflectionLiftCoeff = 1.85

but that didn't do anything.

And during testing, I noticed that the engine icon doesn't display the amount of fuel the engine has and the engine shows a specific impulse 0f 320.8

Edited by gooddog15
Link to comment
Share on other sites

the config is missing the curly bracket to close the engine Module. maybe just a copy/paste mistake.

The engine runs, produces thrust, and doesn't draw fuel? Infinite fuel active?

it runs, produces 0 thrust, and doesn't draw fuel? check the config make sure brackets are correct?

add "DrawGauge = true" to a propellant block to make it show fuel bar next to staging icon.

        PROPELLANT
{
name = LiquidFuel
ratio = 1
DrawGauge = True
}

Edited by nli2work
Link to comment
Share on other sites

the config is missing the curly bracket to close the engine Module. maybe just a copy/paste mistake.

The engine runs, produces thrust, and doesn't draw fuel? Infinite fuel active?

it runs, produces 0 thrust, and doesn't draw fuel? check the config make sure brackets are correct?

add "DrawGauge = true" to a propellant block to make it show fuel bar next to staging icon.

        PROPELLANT
{
name = LiquidFuel
ratio = 1
DrawGauge = True
}

weirdly, it does have the curly bracket that closes the engine module. Just to be safe, I manually redid that part of the config and compared it to stock configs, and yet it still doesn't do anything.

without cheats, the engine doesn't produce thrust, display FX, or draw fuel, but it does display an specific impulse of 320.8.

with infinite fuel though, it does produce thrust and FX.

also DrawGauge = true doesn't display the fuel bar for some odd reason.

updated config:

PART
{

// --- general parameters ---
name = Bluestreak_engne
module = Part
author = Gooddog15

// --- asset parameters ---
mesh = model.mu
scale = 1.0
rescale = 1.0


// --- FX definitions ---
fx_exhaustFlame_blue = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -2.2, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -2.2, 0.0, 0.0, 1.0, 0.0, flameout

// --- Sound FX definition --
sound_vent_medium = engage
sound_rocket_mini = running
sound_vent_soft = disengage
sound_explosion_low = flameout

// --- node definitions ---
node_stack_top = 0, 0.9, 0, 0, 1.0, 0, 2

// --- editor parameters ---
TechRequired = generalRocketry
entryCost = 800
cost = 750

category = Propulsion
subcategory = 0
title = Bluestreak engine mount
manufacturer = Technical Dynamics
description = packing two Rolls Royce RZ2 engines, the bluestreak engine mount powers the 1st stage of the europa-1 launch vehicle

attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.245

dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
breakingForce = 200
breakingTorque = 200
crashtolerance = 45
maxTemp = 3400

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 850
heatProduction = 450
fxoffset = 0, 0, 1.2
PROPELLENT
{
name = Liquidfuel
ratio = 0.9
DrawGauge = True
}
PROPELLENT
{
name = Oxidizer
ratio = 1.1
}
atmosphereCurve
{
key = 0 370
key = 1 320
}
}

MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform
gimbalRange = 4
}

}

Edited by gooddog15
Link to comment
Share on other sites

capitalization on LiquidFuel is incorrect. should be "LiquidFuel" not "Liquidfuel".

thanks, I completely missed that

However this engine from hell still doesn't work.

heres some screenshots of what it's doing in game

without cheats

6FICjdq.png

with infinite fuel:

w3jgE14.png

Edited by gooddog15
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...