Jump to content

1.1 - New ModuleEngines Features Examples and Discussion


Shadowmage

Recommended Posts

2 minutes ago, Eskandare said:

What defines layer, for example: layer = 1

Context:


	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetNozzleDry
		responseSpeed = 0.05
		layer = 1
		dependOnEngineState = True
		dependOnThrottle = True
		engineName = Dry
		weightOnOperational = True
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetNozzleWet
		responseSpeed = 0.08
		layer = 2
		dependOnEngineState = True
		dependOnThrottle = True
		engineName = Wet
		weightOnOperational = True
	}
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = TurboJetHeat
		responseSpeed = 0.0005
		layer = 3
		dependOnEngineState = True
		engineName = Wet
	}

 

You define layers.  Set them to non-conflicting values.

If two animations share the same layer they can often conflict and only the last animation to be 'updated' will effect the transforms/meshes.

Setting them to different values pretty much tells the engine that 'these animations do not conflict, go ahead and update all of them'.

Link to comment
Share on other sites

1 minute ago, Shadowmage said:

You define layers.  Set them to non-conflicting values.

If two animations share the same layer they can often conflict and only the last animation to be 'updated' will effect the transforms/meshes.

Setting them to different values pretty much tells the engine that 'these animations do not conflict, go ahead and update all of them'.

Are they only defined in the config?

Link to comment
Share on other sites

1 minute ago, Eskandare said:

Are they only defined in the config?

For use in the stock modules, for KSP, yes.  Setting them in the config is all you need to do. 

(other games may use them differently; I believe you can set the layers through the editor; but KSP does not do it this way)

Link to comment
Share on other sites

13 minutes ago, Shadowmage said:

For use in the stock modules, for KSP, yes.  Setting them in the config is all you need to do. 

(other games may use them differently; I believe you can set the layers through the editor; but KSP does not do it this way)

Excellent, I think this may solve my problem! (fingers crossed)  Nope, it's still not behaving right, it's been frustrating.

	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = masamuneThrust
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 0.007
		layer = 1
		preferMultiMode = True // bind to the parent multimode module, not the actual engines.
	}
	
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = vaneAnimation1
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 0.007
		layer = 2
		preferMultiMode = True // bind to the parent multimode module, not the actual engines.
	}
	
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = vaneAnimation2
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 0.007
		layer = 3
		preferMultiMode = True // bind to the parent multimode module, not the actual engines.
	}
	
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = vaneAnimation3
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 0.007
		layer = 4
		preferMultiMode = True // bind to the parent multimode module, not the actual engines.
	}
	
	MODULE
	{
		name = FXModuleAnimateThrottle
		animationName = vaneAnimation4
		dependOnEngineState = True
		dependOnThrottle = True
		responseSpeed = 0.007
		layer = 5
		preferMultiMode = True // bind to the parent multimode module, not the actual engines.
	}

veONZsd.png

XnXAiq4.png

Edited by Eskandare
Link to comment
Share on other sites

^^ The exact reasons I wrote my own thermal emissive module... the stock one had... problems... with several part hierarchies that I used that I could not find workarounds for.  I believe you are limited to a single FXModuleAnimateThrottle per part (could be wrong, but I seem to remember reading that in another engines related thread).

The best way to set it up for that part, I think, would be to have one central animation that resides on the root part that controls the emissives for all four 'vanes'.  As you have then named separately this should be quite doable and reliable.

So your single animation component would be on the masamune03 object (or vane_center object), and should be able to control the emissives for all four vanes simultaneously.

Link to comment
Share on other sites

25 minutes ago, Shadowmage said:

I believe you are limited to a single FXModuleAnimateThrottle per part (could be wrong, but I seem to remember reading that in another engines related thread).

You can have multiple, but they will only look at the first Animation component they find.  This is a bug that has existed since 1.0.5.

Link to comment
Share on other sites

1 hour ago, NathanKell said:

Anybody actually tried the thrust curve stuff?

Haven't gotten a chance to yet, but I'll give it a spin tomorrow and let you know how it turns out :)   I've got a few SRBs that are prime candidates.

Link to comment
Share on other sites

I have for a very basic application, converted my SRB thrust limiting module over to it and it works ok (well, once I realised that time = 0 is the end of the burn...). Do note that I haven't actually tested that code with an  SRB already using a thrust curve, so I'm waiting for something wierd and wonderful to pop out there ^_^

Edited by Crzyrndm
Link to comment
Share on other sites

Yeah, the simplification is that it's just the resource quantity, so you want to conceptualize the curve 'backwards' as it were, then convert to frontwards. Mathier folks could integrate from a time:thrust curve to get a prop_remaining : thrust curve.

Link to comment
Share on other sites

  • 2 weeks later...

@Eskandare Don't animate each flap seperately, it's easier to just put the animation on vane_center and animate all four at once from there.
Having a gimbal and animation keyframes on the same object might cause problems. Try something different, put another child object under the Gimbal that rotates thrustTransform, move it a few meter away from the nozzle, then define an FXModuleLookAtConstraint in the cfg that points the vanes (Z+) towards the empty child. Might have to edit your model for the orientations or reorganise them under new empty transforms.

name = FXModuleLookAtConstraint
        CONSTRAINLOOKFX
        {
            targetName = (empty child of gimbal)
            rotatorsName = (vanes here)
        }

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