Jump to content

Engine FX on Custom Model


Recommended Posts

I am generating a monopropellant engine as a learning exercise. I have been able to create a model in blender, import it to unity, and export it out via part tools to the GameData folder. The part loads and attaches as expected. Everything appears to be working except that the engine effects do not show and the engine seems not to generate any thrust even though it uses the monopropellant. I have beat my head on this and have absolutely no idea why. Any suggestions would be appreciated. here's the config


PART
{
name = FI_monoEngine
module = Part
author = Fuzzi
mesh = model.mu
scale = 1
rescaleFactor = 1.25

node_attach = 0.0, 0.15, -0.0666, 0.0, 0.0, 0.0

fx_exhaustFlame_yellow_tiny = 0.0, 0, 0, 0.0, 1.0, 0.0, running
fx_exhaustLight_yellow = 0.0, 0, 0.0, 0.0, 0.0, 1.0, running

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

cost = 340
category = Control
subcategory = 0
title = FI-10
manufacturer = Fuzzi
description = This tiny engine runs on monopropellent and is perfect for small probes.

attachRules = 0,1,0,1,0

mass = 0.2
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.1
angularDrag = 0.1
crashTolerance = 7
breakingForce = 50
breakingTorque = 100
maxTemp = 1800

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 10
heatProduction = 10
fxOffset = 0, 0, 0.01
PROPELLANT
{
name = MonoPropellant
ratio = 1
DrawGauge = True
}
atmosphereCurve
{
key = 0 290
key = 1 100
}

}

MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform
gimbalRange = 1
useGimbalResponseSpeed = true
GimbalResponseSpeed = 0.1
}

}

Link to comment
Share on other sites

Your config looks fine, it sounds like you need to add a thrustTransform in Unity. Make an empty game object, rename it thrustTransform and place it exactly where you want thrust to be generated from. Then rotate it so the blue arrow is facing the direction of thrust. Here's an example image:

JXXI6WV.jpg

Link to comment
Share on other sites

Can 't figure this out. I created the empty game object, positioned it and renamed it exactly as indicated in your image. The effects now appear and the thrust is generated as expected. But for some reason the part seems to ignore all positioning in the

fx_exhaustFlame_yellow_tiny = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustLight_yellow = 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, running

I have changed them to a variety of values and cannot find any change in the positioning. Different effects appear if i change them to say fx_gasJet_white.

Link to comment
Share on other sites

Can 't figure this out. I created the empty game object, positioned it and renamed it exactly as indicated in your image. The effects now appear and the thrust is generated as expected. But for some reason the part seems to ignore all positioning in the

fx_exhaustFlame_yellow_tiny = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, running

fx_exhaustLight_yellow = 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, running

I have changed them to a variety of values and cannot find any change in the positioning. Different effects appear if i change them to say fx_gasJet_white.

Yeah to my understanding it no longer works like that. I beleive the new command is fxOffset. Check the liquidengine2 cfg as I beleive that uses it. alter the value of that and it changes where the FX will appear relative to each engine nozzle.

Link to comment
Share on other sites

  • 1 month later...
I beleive the new command is fxOffset. Check the liquidengine2 cfg as I beleive that uses it. alter the value of that and it changes where the FX will appear relative to each engine nozzle.

That is extremely limiting to what we can do visually, then. :(

We can't offset smoke from flameFX, so smoke comes directly out of the engine fullsize, instead of further down the exhaust line. We also can no longer have different FX for different nozzles within the same engine part. Since it all reads off the one thrustTransform, it's all tied to one node, which is ridiculous.

I have an engine block with 5 nozzles on it - one main and 4 smaller supplementary that gimbal. Before, I could fake it visually at least with the FX offsetting, but now it's impossible to pull off the effect. I can put another thrustTransform on the part, which works physically, but ends up having no FX at all. I can rename those to thrustTransform but it then loses it's own settings and then shares the same FX as the main nozzle :|

Link to comment
Share on other sites

you can name thrust transform *to my knowledge* to ANYTHING you want, be it thrust, transform, stars, little_green_men whatever floats your boat, if it is called in the config file. I have my light module set up like this, for example

MODULE

{

name = backlight

lightName = light2

useAnimationDim = true

lightBrightenSpeed = 2.5

lightDimSpeed = 2.5

//resourceAmount = 0.04

animationName = recanim

useResources = false

}

MODULE

{

name = ModuleLight

lightName = light

useAnimationDim = true

lightBrightenSpeed = 2.5

lightDimSpeed = 2.5

resourceAmount = 0.04

animationName = recanim

useResources = true

}

}

I had to call it twice, as this particular light faced the opposite direction to simulate a point light with far range that didn't illuminate every part within the point radius, including parts behind the light. There is a small drawback with this design, that it will heavily illuminate an object that's within less than a centimeter away...

light and light2 are two separate unity entities that are a child of the main model. the reason the first one is named "backlight" vs "module light" is because it called a hard coded value to show the radial menu for the light on off switch. changing that name stopped that from being called, whilst giving me the ability to have a plugin call that for any other reason to use it.

for the engine

MODULE

{

name = ModuleEngines

thrustVectorTransformName = *thrustTransform*"Replace with whatever you want"

exhaustDamage = True

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 50

heatProduction = 300

fxOffset = 0, 0, 0.21

PROPELLANT

{

name = LiquidFuel

ratio = 0.9

DrawGauge = True

}

PROPELLANT

{

name = Oxidizer

ratio = 1.1

}

atmosphereCurve

{

key = 0 390

key = 1 300

}

name = Insert random name here

thrustVectorTransformName = *insert unity transform here*"Replace with whatever you want"

exhaustDamage = false

ignitionThreshold = 0.1

minThrust = 0

maxThrust = 0

heatProduction = 0

fxOffset = 0, 0.2 , 0.36

}

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