Tidal-Stream / ProceduralParts

A continuation of StretchySRBs, which is a continuation of StretchyTanks
8 stars 15 forks source link

Fix for red glow on not even ignited SBR's #7

Closed stasikos closed 6 years ago

stasikos commented 6 years ago

This is attempt to stop SRB bell from glowing red even before igniting them, like it is in 1.4.5/1.3.15

Fix is based on some speculations to make its look more realistic since there no bell temperature readings, but at least it is not ugly now.

Tidal-Stream commented 6 years ago

This looks pretty good. Can you explain why you divide the temperature by exactly 102f and how it relates to the 900K in the comment or is it just based on trial-and-error based on figuring at what constant it starts to glow at 900K indicated temperature? I will test it when I have time and then merge it.

stasikos commented 6 years ago

Sorry, I had to explain it in a comment. I had to subtract Draper point from 900K so we calculate ratio part_temp_above_dp/temp_above_dp_when_it_is_red. So it goes to >=1.0 when we got part at 900K. 900K-798K=102K, so I just use this constant to omit additional calculations in case it will not be optimized by compiler or something like this.

Tidal-Stream commented 6 years ago

So I rebuilt and tested it and it seems like it does not glow even above the Draper point. Do your tests give different results? screenshot12 screenshot10

stasikos commented 6 years ago

I don't see any "engine internal temperature" in my action menus and by enabling thermal debug data from F12 I can't see any values like this too. It seems to me like some different mod shows this and it is not connected to part's temperature and skin temperature used in calculations before and after patch. And it is quite hard to heat SRB part without putting really large nozzle to it: https://youtu.be/LUD0l0KoD8w

stasikos commented 6 years ago

According to my investigation it seems "Eng. internal temp" is from SolverEngines. There no other way to calculate this internal temperature data but implementing same or similar thermodynamics calculations inside ProceduralParts (or adding SolverEngines it as dependency) so I don't know other way to make it more accurate (especially with lower thrust SRB which can heat very slowly). But I think I can play with its mass/thrust ratios to get heating effect more noticeable and improve this patch.

rsparkyc commented 6 years ago

alt-f12 -> Physics -> Thermal -> Display Thermal Data in Action Menus will give you a bunch of thermal data in the right click menu

rsparkyc commented 6 years ago

hey @stasikos, I've made another PR toward this issue, however I tried to retain the logic that was there when it was still working. You can take a look here: https://github.com/Tidal-Stream/ProceduralParts/pull/8

Tidal-Stream commented 6 years ago

I was using RealismOverhaul in the test so the temperature readout and glow may be different in stock. I will have to run a stock test as well.

stasikos commented 6 years ago

I like @rsparkyc solution for being simple and fast way to fix this issue without inventing complicated contraptions to calculate something. Despite it starts to glow in more like on/off way (in quarter of second or so). It is hard to implement it "right way" without much math overhead. Problem with my way is it is quite hard to reach Draper Point for SRB's skin or internal temperature due to its mass, etc, etc and it is completely unnecessary to use it.

rsparkyc commented 6 years ago

I did notice that the transition was very fast, which wasn't ideal.

Tidal-Stream commented 6 years ago

Closing, using the solution from #9 instead.