Jump to content

[1.0.2] B9 Aerospace | Procedural Parts 0.40 | Updated 09.06.15


Recommended Posts



There are things about existing procedural wings, like texture stretching and lack of some options, that have long bothered me a bit. This mod employs different approach (direct vertex manipulation instead of controlling skinned mesh renderers) that is more verbose and inconvenient to set up, but allows proper UV mapping of arbitrary geometry. Multitude of parameters can be configured, from leading and trailing edge shapes to widths, lengths and thicknesses at root and tip of a wing. Wings can also be colored without any performance cost and drawcall inflation, using vertex color and UV2 to deliver data into the shader without breaking batching.



In addition to options outlined in this infographic, you have separate control over material properties of every surface.

An example is available on the color-coded tweakable screenshot below.


Some important information on the current state of the mod:

  • Wings with inbuilt control surfaces won't be supported, same thing can be built out of a wing segment with a slightly smaller root/tip width compared to neighbours, Flat trailing edge type on that wing, and a control surface attached to it.
  • You must FAR 15.3.1 or later. Previous versions had a serious issue preventing proper voxelization of mirrored meshes.

Latest patch notes


[table=width: 1200, align: left]



  • Wings support thickness of up to one meter from now on
  • Removed leading and trailing edge multiplier property from wings
  • Added leading edge root/tip width and trailing edge root/tip width properties, all four of them can be adjusted from zero to one meter, allowing you to set up vertically elongated edge cross sections, horizontally elongated edge cross sections and cross sections proportional to arbitrary wing thickness values alike.
  • Added collapsable categories parenting logical property groups (dimensions, materials, edges and so on) to the tweakable menu, making the selection and adjustment of numerous properties more manageable
  • All tweakable properties are no longer initially open in the context menu, being hidden under categories
  • Replaced all edge models with new ones, improving cross section polycounts and adding hard material edge that looks better under arbitrary thickness and edge width combinations resulting in stretching
  • Reordered edge models: first type is circular, second type is biconvex (between sharp and circular in shape), third one is triangular, which makes a bit more sense (progression from smooth to sharp shapes instead of random order)
  • Reordered and renamed some properties for convenience
  • Added flat fill support (fifth material type) to edges
  • Improved aerodynamic value calculation for wings, edges now properly contribute to the behaviour
  • Improved aerodynamic value calculation for control surfaces, trailing edge widths are now taken into account, along with contributions of offset properties to taper ratio
  • Internal fixes and refactoring in geometry handling, setup sequence and field updates
  • Top and bottom surfaces of control surfaces and wings are collapsed into one mesh with a slight benefit to performance (separate material selection still available, shader based switching makes use of one mesh a non-issue)
  • Slight improvements to text in alternative UI



  • Implemented coloration - every wing surface (top/bottom/leading/trailing) can now have not just previously implemented separate material type, but also an appropriately masked paint overlay with configurable opacity, hue, saturation and brightness
  • Reimplemented alternative UI, it now closely resembles tweakable menu with a number of improvements over stock (color coded groups, longer labels, hints, collapsable sections)
  • Moved all sliders in the stock tweakable menu to KSP API Extensions UI_FloatEdit editor, which seems to positively affect the rate of a memory leak on tweakable window redraw (sometimes it even stops entirely).
  • Unified all properties, control surfaces and wings no longer use isolated fields (breaking change, all previously built crafts will not retain wing part configurations)
  • Added an option to set current configuration of a wing or control surface as default, making all subsequently created parts of that type use the same values (along with an option to reset default values back)
  • Shifted all properties into logical groups
  • Implemented collapsable menus to make editing more convenient
  • Geometry and performance fixes, refactoring and minor fixes in other areas
  • Improved some layer textures, surface type 0 in particular (rivets, more appropriate seam structure and so on)



  • Fixed geometry counterparts not updating properties
  • Minor UI fixes


  • Leading and trailing edge width is no longer taken into account when type 1 (flat) edge is selected
  • Control surface main body width lower limit is now set to 0.125 (I'll look into making it lower in the future, but at the moment I have to snap it to the increment and it can't go to 0 without breaking geometry)


  • The alternative UI height no longer shifts height during slider editing, tooltip label height is now locked, tooltip text adjusted to always take two lines
  • The description of the last edited property is always correct now, jumps to improper descriptions eliminated
  • Editing mode button changed to J to prevent conflict with Editor Extensions hotkeys
  • It is now possible to force the part you are editing to match the shape (parent tip width becomes child root width, parent tip thickness becomes child root thickness and so on)
  • It is now possible to force the part you are editing to match the surface material settings of a parent
  • Control surface offset settings can now assume a wider range of values, allowing proper setup of control surfaces on high-sweep trailing edges



  • Implemented fuel switching based on code by Andreas Aakvik Gogstad (Snjo): You can use the button in both tweakable and alternative menu to scroll through four possible internal configurations of a wing: empty structure (STR), liquid fuel (LF), liquid fuel with oxidized (LFO) and monopropellant (RCS). As you alter the shape of a wing and change it's internal volume, amount of fuel within the wing is altered accordingly.
  • Fixed some style and formatting issues of the alternative menu
  • Fixed incorrect trailing edge width limits on control surfaces
  • Added opt-in update notifications supported by MiniAVC


  • Control surface edge width limits no longer reset to 0-0 instead of correct 0.24-1 (rogue Vector2 was used instead of Vector4 at a certain point, losing those limits due to absence of .z and .w values)



  • RealFuels support added, wings switch from inbuilt fuel switching code to RealFuel tweakables automatically upon detecting it installed
  • Fixed the alternative UI getting stuck in the timeout mode upon after you exit and reenter the editor scene
  • Added a button to the KSP editor appbar allowing you to close the alternative UI window and reopen it without mouseover+J (the button appears and disappears automatically whenever a procedural part is present in a scene)
  • Added a configuration menu to the KSC scene, accessible through the appbar button. It allows you to enable one of 12 logging modes (all disabled by default) and might come in handy later when I might ask some of you to reproduce an issue with a certain logging mode enabled, sending me the resulting log
  • Fixed fuel per volume multiplier - previously you were able to use the total internal volume of a wing for fuel, which is fixed now, with only reasonably realistic 70% of it available
  • Various minor fixes and optimizations




  • Includes all changes from the maintenance fork by Crzyrndm (lots of bugfixes and improvements to the code)
  • Full compatibility with KSP 1.0.2
  • Full compatibility with FAR 0.15.3+
  • Aerodynamics calculations no longer restart on every slider change, editor performance is improved
  • New stock-alike texture (old texture is available optionally)
  • Textures converted to .dds
  • Improved shader and material settings





Incompatible mods

This is just assumptions, but odds are pretty good:

  • KerbPaint
  • Reflection Plugin
  • Kronal Vessel Viewer
  • Every other mod that attempts to swap part shaders (wings are reliant on their own custom shader and will break if it's removed)


I referenced how attachment/detachment is handled in pWings by DYJ and I have used the same aerodynamic stats calculation methods (if I'm not mistaken, those were set up by Taverius and ferram4).

Wing geometry itself is not handled in the same way (I'm not using skinned mesh renderers or same parameters) and no part content is shared with Procedural Dynamics, so this is not exactly a proper derivative work, I guess.

Credit where it's due, I'm sure I would've stepped into ten times more mistakes if I had not studied the source. Thanks to DYJ, NathanKell and Taverius for their work.

Also, thanks to ferram4 for advice on FAR support and to helpful folks from #kspmodders IRC channel who answered some of my horrifyingly incompetent questions about C#.

Special thanks to xEvilReeperx for helping me out with figuring custom shader loading.

Fuel switching is based on code from Andreas Aakvik Gogstad (Snjo).

Maintenance in the few last months, changes required for KSP 1.0.x and FAR 0.15.x compatibility and enormous number of fixes and improvements to the code were performed by Crzyrndm.

More images




  • The code is licensed under MIT.
  • All art (i.e. textures and meshes included into the download) is licensed under CC BY-NC-SA 4.0
  • KSP API Extensions by swamp_ig and taniwha are included into the download without modifications and under conditions of CC BY-SA 3.0
  • CrossFeedEnabler by NathanKell is included into the download withough modifications and under conditions of CC BY-SA 3.0

KSP-AVC Notice

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available.

Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

Edited by Vanamonde
Link to comment
Share on other sites

Oh wow, this looks amazing.

So will this solve the issue of the wings disappearing when the root part of the wing falls out of camera shot? Also are we able to put black tiles on the wing undersides with the texture switching? E: ah, looks like it does.

Edited by falken
Link to comment
Share on other sites

So will this solve the issue of the wings disappearing when the root part of the wing falls out of camera shot?

Oh, pWings has that? This can actually be fixed without altering it's implementation, you just have to recalculate mesh bounds so that Unity knows when to disable the mesh as it leaves the camera frustum. Literally one-line fix.

Also are we able to put black tiles on the wing undersides with the texture switching? E: ah, looks like it does.

Yes, you can select top and bottom surface types separately, and mirroring works properly so you don't get black tiles on vertically opposite sides.

Link to comment
Share on other sites

I don't suppose you could figure out slanted control surfaces (like evelon 5 in squad ssp)

That's planned and possible, yeah.

and also split control surfaces?

That's outside of what I can control, there is no support for control surfaces like that in the game.

Link to comment
Share on other sites

*Searches vigorously for download link and wimpers*

*Dose the same*

Always been a big fan of the Aerospace pack...this will take it to a whole new level.

Just an idea can you make the landing gear adjustable?

Link to comment
Share on other sites

So does this mean that we will get procedural B9 fuel tanks and other parts? Oh that would be AWESOME!

Nope, this is a separate small-time mod, I do not plan parts like those at the moment.

Link to comment
Share on other sites

Posted the link to the repository.


I'm mostly interested in aerodynamic stats behaving properly in FAR and stock and in whether any actions spam null reference exceptions or other errors. If the latter happens, I'd like a verbose log and reproduction steps. Test whether crafts are saved correctly, loaded correctly, launched with all modifications preserved, etc.

Link to comment
Share on other sites

this is really good! i just wish it could also change thickness but otherwise perfect! now my aircrafts have wings that stays together instead of wabbling everywhere haha

edit: some times the wing resets after revert flight


Edited by K.Yeon
Link to comment
Share on other sites

Updated, download here as usual (I'd recommend to always download the latest snapshot of the repo and not my prepacked archives as their contents might be obsolete).




  • Added separate tip/root offsets allowing setup of slanted control surfaces
  • Added separate tip/root control surface thickness and width controls
  • Improved texture coord calculations on control surfaces
  • Changed thickness handling to allow higher thickness limits
  • Added boundary area on control surfaces for improved readability, and some other stuff.

Edited by bac9
Link to comment
Share on other sites

Uploaded a version 0.3 with a fix for wings and control surfaces becoming corrupted on reattachment.

I also have to remind you that as far as I understand, only the latest development version from FAR git repository should be used with 0.90.

Edited by bac9
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.

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