Jump to content

[SOLVED] Tuning ModuleAblator and ModuleColorChanger parameters for a resilient but quick-charring heatshield


Recommended Posts

I'm currently working on a new aftermarket heat shield for the stock Mk1-3 pod.

This heat shield is supposed to be more resilient than the stock 2.5m one in that it consumes Ablator more slowly under similar re-entry conditions, but would char/blacken almost instantly.

What charmin/charmax and ModuleColorChanger curve settings should I used to make this possible?

MODULE
{
	name = ModuleAblator
	ablativeResource = Ablator
	lossExp = -7500
	lossConst = 0.01
	pyrolysisLossFactor = 6000
	reentryConductivity = 0.01
	ablationTempThresh = 500

	useChar = True
	charModuleName = shieldChar
	charMin = 0.99
	charMax = 1.0
}

MODULE
{
	name = ModuleColorChanger
	moduleID = shieldChar
	shaderProperty = _BurnColor
	useRate = False
	toggleInEditor = False
	toggleInFlight = False

	redCurve
	{
		key = 0 0
		key = 1 1
	}
	greenCurve
	{
		key = 0 0
		key = 1 1
	}
	blueCurve
	{
		key = 0 0
		key = 1 1
	}
	alphaCurve
	{
	key = 0 0.8
	}
}

 

Edited by sumghai
Mark as solved
Link to comment
Share on other sites

With @JPLRepo's help, I've resolved my problem.

  • charMin and charMax define the minimum and maximum alphas
  • ModuleAblator calculates the amount of Ablator to burn off, and tells ModuleColorChanger the amount to adjust the alpha on the color by calculating a percentage of ablator to burn off and setting that between charMin and charMax
  • ModuleColorChanger will adjust the rgba values based on the redCurve, greenCurve, blueCurve, alphaCurve defined in those KSPFields

In my case, I managed to adjust the RGBA color curves such that my custom heatshield chars to black when only 99.75% (i.e. 798/800 units) of Ablator remains during/after re-entry:

MODULE
{
	name = ModuleAblator
	ablativeResource = Ablator
	lossExp = -7500
	lossConst = 0.01
	pyrolysisLossFactor = 6000
	reentryConductivity = 0.01
	ablationTempThresh = 500

	useChar = True
	charModuleName = shieldChar
	charMin = 0.0
	charMax = 1.0
}

MODULE
{
	name = ModuleColorChanger
	moduleID = shieldChar
	shaderProperty = _BurnColor
	useRate = False
	toggleInEditor = False
	toggleInFlight = False

	redCurve
	{
		key = 0.9975 0
		key = 1 1
	}
	greenCurve
	{
		key = 0.9975 0
		key = 1 1
	}
	blueCurve
	{
		key = 0.9975 0
		key = 1 1
	}
	alphaCurve
	{
	key = 0 0.8
	}
}

Link to comment
Share on other sites

  • 4 years later...

Found this today! What an improvement this makes.

I did alter the 2nd value of the 1st keys to 0.4 so the result is very dark, but you don't loose the details of the texture. Makes it more "Dark Roast" and less "Burnt to a cinder"

Whipped up a MM script to apply it to all ablator equipped parts (including the pods in Making History)
 

// Tweak ablator effects so they always go dark at 99.75% ablator remaining
// TG626
@PART[*]:HAS[@MODULE[ModuleAblator]]:FINAL
{
   @MODULE[ModuleAblator]
   {
      %charMin = 0.0
      %charMax = 1.0
   }
   @MODULE[ModuleColorChanger]:HAS[#moduleID[shieldChar]]
   {
      @shaderProperty = _BurnColor
      @redCurve
      {
         @key,0 = 0.9975 .4
      }
      @greenCurve
      {
         @key,0 = 0.9975 .4
      }
      @blueCurve
      {
         @key,0 = 0.9975 .4
      }
   }
}

 

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