Jump to content

How to make a heatshield/decoupler


Recommended Posts

Neither *must* have anything special in the model; for decouplers you can specify an object that stays on the part you decouple from as debris, but its not required. if you want the whole part to just detach like the stack decouplers do, you just need your model exported right

The decouple module:

MODULE

{

name = ModuleDecouple

ejectionForce = 150

explosiveNodeID = top

}

explosiveNodeID lets you name which attachment node you decouple from when activates, in this case it's this one:

node_stack_top = 0.0, 0.125, 0.0, 0.0, 1.0, 0.0

This is how all the stack decouplers work, the decoupler and everything attached to the bottom of it decoupler from whatever is attached to the top.

For radial decouplers:

MODULE

{

name = ModuleAnchoredDecoupler

anchorName = anchor

ejectionForce = -550

explosiveNodeID = srf

}

it'll be this: explosiveNodeID = srf

Which means it breaks the connection that attached the decoupler part TO its parent part (say a decoupler to a fuel tank) but NOT any other parts surface-attached to it, or attached to any stack nodes if there are any.

The anchorName is the name of the object in your model that should stay "attached" as debris when decoupled. For the stock radial decouplers, think of the little frame left on the tank; that's the anchor. Note that the anchor isn't persistent, if you save and load or swap far away, the debris will be despawned.

That is the basics of the decouplers. I'll make another reply with some for heatshields.

- - - Updated - - -

Again there's nothing inside the model for heatshields, their function is all in the code and defined in the config.

MODULE

{

name = ModuleAblator

ablativeResource = Ablator

lossExp = -9000

lossConst = 20

pyrolysisLossFactor = 10000

reentryConductivity = 0.01

ablationTempThresh = 500

}

RESOURCE

{

name = Ablator

amount = 200

maxAmount = 200

}

and this line somewhere in the config:

thermalMassModifier = 0.001

Someone else can give you better details on the math here, but the short version is:

the MassModifer makes it easier for your shield to heat up, otherwise it heats too slowly to heat up thus reach the ablator threshold (500 degrees as set in the config above) - Once it reaches that it begins to use the Ablator resource and also begin dumping heat out of the part rather than to continue to heat up and pass it along up to whatever is being shielded.

While the ablation is occurring, the game is using a "shader" to darken the texture on your part to mimic the burn marks, you don't need a special texture or animation for it, though you might be able to tweak it some to get it to look right (for instance, high specularity looks a bit odd when burnt)

That should definitely get you started. Others can fill in more details.

Edit: Fancy auto-merging of replies, its all one post now :P

Link to comment
Share on other sites

So then if I made a part that radially decouples I don't need anything special in the model or Unity and it will just come off of the ship with nothing left on it?

Yeah if you don't create an anchor part, it'll just come off without leaving debris behind. You can also leave debris behind on stack decouplers if you wanted to.

Link to comment
Share on other sites

As far as I know, there's no transform-lookup, it doesn't really care about the model (its shape will determine is drag cube of course, like all parts) its just "when temperature > X, use resource Y

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