Jump to content

New Aerodynamics and Old Fairings: how to?


Recommended Posts

Anyone know how to make modded fairings work with the new Aerodynamic system? I understand that structures, such as fairings, contribute to shielding payloads from aero forces. How do I get my own fairings to cooperate with the new system?

Link to comment
Share on other sites

Bummer. I think I can work around that but first I need to know how I define a part such that the aerodynamic system understands it. Is there a Unity flag? Layer? A new type of mesh (like a colider)? config entry?

I looked at the configs for the stock fairings but nothing really jumped out at me as saying "this relates to aerodynamics".

Link to comment
Share on other sites

I'm not sure I understand. what's the difference between a collection of other parts and a single part? Lets just say I make myself a single nose cone. Would I use the cargo bay module to get KSP to recognize it as a "shieldedfromairstream"? Or are you saying that, no matter what I do, I must write a plug-in.

Link to comment
Share on other sites

  • 2 weeks later...

damn... should have probably read this before i went and made some multi part fairings haha well back to square one on that front i guess i'll just have to suggest procedural fairings for my mod since they are the only people who make fairings small enough

Link to comment
Share on other sites

no matter what I do, I must write a plug-in.

Yes, unless you model a differnt type of fairings that aren't multipart (IE snap together with nodes or srf attachments) you will need a new plugin.

the cargobay module does change its shielded parts from shielded to not via a toggle, but it does so based on the status of the animation playing, there's no way to make it thing "These parts are attached, so its shielded, and now they are jettisoned so they are not shielded. Furthermore, there's no way to set up a shielded region for multi-part fairings because they can be 1 panel tall or 10 if the user wants.

Link to comment
Share on other sites

Starwaster and I will look into this further after he's finished DRE 7.0 and had a bit of a breather, but basically:

Okay, so after some discussion on IRC, I've gathered some useful information that may help the development of this plugin.

- ModuleCargoBay is (to my knowledge) the only way the game handles drag occlusion for hollow parts, and has the following key parameters:

DeployModuleIndex is the index of the animation module that opens your cargo bay. If your deploy animation is the first module in your part config, this should be 0. If it is the 2nd module, this should be 1. 3rd = 2 ....

ClosedPosition is the position in your animation that represents closed. If your animation goes from closed ->open, this should be 0. If your animation starts open and goes to closed, this should be 1.

lookupRadius is probably the distance from the center of mass of the cargo bay to do part containment lookup. On all stock cargo bays this is set to half the length of the cargo bay; so a 10m long bay would have a value of 5.

- For "true" cargo bays, such as the stock Mk3 Cargo Bay CRG-100, DeployModuleIndex listens for a change in the state of a specified/preceding ModuleAnimateGeneric that opens/closes the bay doors, and ClosedPosition for the actual end state itself. Once triggered, ModuleCargoBay would then raycast against the cargo bay's colliders to determine the shielded state of the payload inside the bay.

- The stock procedural fairings also use ModuleCargoBay to determine atmo drag occlusion; however, the proc fairing CFGs don't have ModuleAnimateGeneric, but instead, has ModuleProceduralFairing

- I suspect what's happening is that ModuleProceduralFairing is actually creating a "dummy" animation that ModuleCargoBay can consult to determine whether the fairings are intact (payload shielded) or jettisoned (payload exposed to atmo drag)

- In terms of my original request, the idea is to thus create a new "helper" PartModule that tricks ModuleCargoBay into using a decoupler staging action (ModuleDecoupler/ModuleAnchoredDecoupler) as a valid animation:

i.e. ModuleDecoupler/ModuleAnchoredDecoupler ---> ModuleDecouplerListenerForCargoBay ---> ModuleCargoBay


Additional notes:

- ModuleCargoBay's lookupRadius is measured from the part's CoM, so many fairings will need to have their part origins changed mid-way along their height, and the lookupRadius specified as half the height

- Because ModuleCargoBay must be able to listen to a change in animated state from either ModuleAnimateGeneric, ModuleProceduralFairing or the proposed ModuleDecouplerListenerForCargoBay, faring segments parts that only have ModuleCargoBay won't work.

(Specifically, SDHI's fairings and BPC are single-length segments with built-in decouplers, and so these parts would work fine with the new listener module. On the other hand, KW Rocketry fairings have the decoupler only in the cone pieces and not the side panels that make up its length, and so even if the KW fairing side panels each had ModuleCargoBay, they can't listen to the decoupler action from another part)

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