Jump to content

[1.8+] Procedural Fairings


pap1723

Recommended Posts

  • 3 weeks later...
20 minutes ago, roxik0 said:

Hi is anybody have problem with high drag in stock areo? 

 

A lot of people already mentioned this, including myself. For whatever reason it never got acknowledged, I guess nobody wants/knows how to fix it.

Link to comment
Share on other sites

16 minutes ago, roxik0 said:

I also notice that it could be because of Community Fixes they change how drag cubes are calculated

It was like this long before Community Fixes was involved in drag cubes calculations.

Link to comment
Share on other sites

1 hour ago, Gotmachine said:

KSPCF doesn't calculate drag any differently than stock.

Quote

  // Faster and more reliable implementation of drag cube generation. Improves overall loading times (both game 
  // load and scene/vessel/ship load times), prevent occasional lag spikes (in the editor mostly) and fix some 
  // issues causing incorrect drag cubes to be generated (notable examples are the stock inflatable heat shield,
  // the 1.25m and 2.5m nose cones and the Mainsail shroud). Note that by design, this patch results in a small 
  // deviation from the stock behavior for buyoancy, aerodynamics and thermodynamics, as the generated drag cubes 
  // will be slightly different.
  DragCubeGeneration = true

From KSPCF Settings.CFG file, I understand this text that they are some diffrences which crates this "deviations" 

Edited by roxik0
Link to comment
Share on other sites

8 hours ago, roxik0 said:

From KSPCF Settings.CFG file, I understand this text that they are some diffrences which crates this "deviations" 

Well, I won't derail this thread with offtopic talk much more, if you want to discuss this further, please post in KSPCF thread.
But shortly, yes, there are differences, either for specific parts where stock is producing utterly wrong drag cubes, or typically (very) small parts, as stock is accounting for the bump map (making those parts a little more draggy than what they should be) and KSPCF don't.
KSPCF drag cube values will also have "floating point error" differences compared to stock ones, but this is the case in stock too when running the game on different machines/OS, the overall technique is numerically unstable anyway.
Either way, apart from the very few parts where KSPCF is fixing actual bugs where stock is generating wrong drag cubes, the differences are tiny and indistinguishable in the final behavior, as there are *tons* of much larger approximations in the overall KSP aerodynamics implementation.
For more in depth information on what KSPCF is doing, you can read https://github.com/KSPModdingLibs/KSPCommunityFixes/pull/139 and https://github.com/KSPModdingLibs/KSPCommunityFixes/issues/137

Link to comment
Share on other sites

Ok but maybe you @Gotmachine knows why I have this strange drag on side of fairing..
https://imgur.com/a/ZXjWe0U
Here is generated drag cube: for fairing.
https://imgur.com/a/SIwOyLF

Question when drag is calculated is it sum of procedural + prefab or only procedural? because idea I have in my head is that somehow prefab drag cube is "leaking" into this one.. 

Edited by roxik0
Link to comment
Share on other sites

On 11/2/2024 at 2:36 AM, roxik0 said:

Question when drag is calculated is it sum of procedural + prefab or only procedural? because idea I have in my head is that somehow prefab drag cube is "leaking" into this one..

I don't see anything really abnormal in your screenshot. PF handle fairings as separate parts for each side, so the drag is applied to those separate parts. The equivalent stock fairing would have a single arrow pointing down from the center of the fairing base instead of two arrows pointing down from the sides, and the net effect in terms of drag would be the same (but being inside the other parts, the center arrow isn't visible, which I guess is the source of your confusion).

This being said, the way PF handle fairings with separate parts for each side doesn't work very well as soon as the fairing isn't perfectly aligned with the airstream.
The KSP drag cube based aerodynamics simulation doesn't have a full notion of one part hiding another. It does to some extent, but the rules are such that what happens can differ significantly from what you would logically expect as soon as you get out of simple stacks of same-diameter parts.
So with those two fairing sides being separate parts, a sideway airstream will result in KSP thinking the inside of one of the two fairing side is exposed to the airstream, effectively doubling the amount of drag applied to the overall fairing compared to what you would expect.
See a quick example : https://imgur.com/a/skBwKMI

This is unfortunate, but I'd say that many similar discrepancies exist even in stock. They are definitely a lot more common in the modding ecosystem, as modders tend to do stuff in terms of what they want to achieve in terms of looks and functionality, and not so much in terms of what the game is capable of doing technically, which is quite limited in the specific case of aerodynamics. As for PF, the solution would be for it generate a drag cube out of a render of the assembled fairing sides (and base), and to apply that drag cube to the fairing base, the side parts having effectively no drag cube at all. But that would require a custom drag cube rendering system, as the stock (or KSPCF) API can't be used that way, they expect a single part. I guess KSPCF could provide a more flexible API for doing that if someone is interested.

And on a final note, this is the main reason why FAR (usually) does a much a better job at being consistent and predictable no matter what contraption you throw at it, because it uses the actual shape of the whole vessel instead of doing things on a per part basis, allowing it to avoid many of those complex inter-part occlusion difficulties.

Edited by Gotmachine
Link to comment
Share on other sites

37 minutes ago, Gotmachine said:

And on a final note, this is the main reason why FAR (usually) does a much a better job at being consistent and predictable no matter what contraption you throw at it, because it uses the actual shape of the whole vessel instead of doing things on a per part basis, allowing it to avoid many of those complex inter-part occlusion difficulties.

^ this. I believe most of the audience for this mod is using RO-suite which implies FAR anyway. Doubt anyone is willing to put in the effort to write hacks for stock aero.

Link to comment
Share on other sites

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