bac9 Posted December 26, 2014 Share Posted December 26, 2014 (edited) 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. Features 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. Notes 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] [tr] [td]0.16 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 [/td] [td]0.17 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) [/td] [td]0.18 Fixed geometry counterparts not updating properties Minor UI fixes 0.19 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) 0.20 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 [/td] [td]0.21 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 0.22 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) 0.23 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 ... 0.40 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 [/td] [/tr] [/table] 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) Credit 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 License 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 September 2, 2018 by Vanamonde Quote Link to comment Share on other sites More sharing options...
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.