Profile image

[Quick-torial] Getting the New Slice Tool - AKA 'Fill' - to behave on a "Fuselage Cone"

4,167 Formula350  2.6 years ago

Intro:

If you're like me, and have a love-hate relationship with the Fuselage Cone part, particularly the flat parts on its sides that wreck your attempt at flowing-tapered lines... then this might help a little.

Potential TL;DR Imagery:

[Click to enlargify it]

What We Know:

[Just to get this out of the way: The Front and Back of the Cone are unfortunately NOT relative to the XML frontScale and rearScale; they are reversed *facepalm*. So when I say Back I mean the flat side, and Front I meant the pointy-side. When I go and speak XML, that will be opposite, so keep that in mind, as it might be confusing!]

Like the Hollow Fuselage is to the Fuselage Inlet, the Fuselage Cone is to the standard Fuselage.
What that means is, XML entries are shared and we can use that to our advantage, by making the Cone do things that it otherwise wouldn't, if you were to just drag it from the Parts menu!

The other thing about the Cone is that by default, its Back (XML frontScale remember) dimensions are set to Width: 2 and Height:2, while its Front dimensions at default are Width: 0 and Height: 0. This is because even if we were allowed to change it via the Part Settings menu, the game wouldn't do anything with those new numbers and it'd still remain the same cone shape.

Complications with Slice Tool:

The way the Slice/Fill tool operates is drawing a line between two points, A and B, which in this case are Front and Back. Then anything that is "outside" of that line, is not rendered anymore, thereby cutting it away.

Therein lies the complication when it comes to the Fuselage Cone: the Front's dimensions of 0,0 make it draw this "line" from the middle. So while you adjust the Back Fill %, even to only being 99%, it cuts a HUGE chunk out of it. This means we lose a fine-grain control over it in this regard.

The Solution:

In comes the handy fact about Cone having the same XML entries as the standard Fuselage, and the fact that changing the Front size (via rearScale, remember) will not do anything visually to its point...

What we are going to do then, is trick everything into thinking that the Cone's point is higher than where it visually shows to be. In turn, this will also mean that when we Slice up the Back, the line is drawn from this new, higher location! This will allow for that fine-grain removal similar to the way it behaves with the standard Fuselage. :D

The Steps:

So here's how we go about doing this, and all you'll need is the Overdrive mod to be enabled (which all platforms include by default, so yay!)

1) After selecting Cone you want to mess with, click the Overdrive button in the bottom right of the screen.
2) Click the drop-down menu and select "Fuselage"
3) Click into the rearScale numbers field, the 0,0 will become highlighted. (Remember, the Backside is frontScale, and the Pointy Front is rearScale!)
4) Type in the same numbers that are in the frontScale
5) Next we need to add an empty variable entry. At the very bottom of the Override window you will see a faint gray + sign to do this, and you'll see a new line appear.
5) In the left box titled Name enter: fillBack (again, back==front heh)
6) In the right box titled Value enter: 0.8,1,1,1

NUMBERS BREAKDOWN: This uses 4 comma-separated numbers, which support decimals between 0 and 1 (translating to a percent): w, x, y, z.
---- W is "Top Fill", X is "Bottom Fill", Y is "Left Fill", and Z is "Right Fill". Their defaults are 1,1,1,1, but the entry will DISAPPEAR after you save it, if you put in the default! This is why we've put in a value other than 1 for Top Fill.
---- Furthermore, Left and Right are 'relative' to the part's viewpoint and rotation! Viewpoint is you looking at it with the Pointy side facing you head on. If you've rotated it around the Y or Z axis, then you're going to have to probably apply some Fill to the Back first in order to determine which way is which.
---- NOTE: Being a Cone shape, and that we've modified where it THINKS its edges are, that means certain Fill percentages will no appear to do anything. An example: Default dimensions of W2 x H2 and a length of 2 means a Fill of anything between 0.99999 and 0.93 will not appear to do anything; 0.90 is still barely visible. And that is why we start out with a value of 0.80, so that you can at least get an idea of how much that changes it.

7) Now Save you changed by clicking on the bright blue Circled Checkmark button in the bottom-right of the Overdrive window.
8) Look at the Cone to make sure that a) its oriented correctly and you've sliced the side you intended, but if not make a note of where it is to determine which side you need to change in code to reflect that in the Designer; and b) to gauge how much was removed so that you can make a guess at roughly how much more or less it needs to be adjusted.
9) To make follow-up adjustments, which you undoubtedly will need to, re-open Overdrive and make those adjustments to w,x,y,z, however it is you need. Since we lack a Menu entry for this, our only choice is through Trial and Error to find the value we need.

BONUS!

There's an entry you may have taken notice of, called fillCutFace, which is set to false (by default)...
If you change this to true, you can see down inside of the Cone.
However, it's only when looking IN. If you navigate the camera inside, you'll notice that the fuselage walls don't show up. So unfortunately it doesn't give us a Hollow Cone.
[This is actually how the hideInside Transparency (XML) setting for Hollow Glass works, as well as the new Cockpit Canopies in the Parts Setting menu. :) ]

Enjoy!

This has been another fine L.A.P. brought to you by Formula350!

Long-Ass Post

  • Log in to leave a comment
  • Profile image
    4,167 Formula350

    @11qazxc Added it to the post :)

    +1 2.5 years ago
  • Profile image
    6,220 11qazxc

    thank you very much!

    +1 2.5 years ago
  • Profile image
    4,167 Formula350

    @11qazxc
    Alright... How about this...?
    Helpful?
    Or too complicated?
    (I didn't really type the post to need a pic, but instead have all the needed instructions to copy-paste their code and replicate it in game. So trying to make what's shown also make sense, was tough.)

    +1 2.5 years ago
  • Profile image
    6,220 11qazxc

    can you, please, add screenshot of result here?

    2.5 years ago
  • Profile image
    4,167 Formula350

    QUICK-CHEAT:

    A way you can perhaps get a rough-estimate on how the cone would look, would be to actually start off by using a Standard Fuselage part instead...
    This way you have access to change its Front and Back Fill values through the Menu!
    .
    Once you have it where you think it will be needed, open up Overdrive.
    Instead of changing anything in the Fuselage menu, now you will actually modify the partType in the main window!
    You'll currently see: Fuselage-Body-1, and what you'll want to change it to is Fuselage-Cone-1
    .
    Save it, and you'll get a text warning on the screen about it changing and removing all its Attachment Points. A small price to pay, really. :)
    (Alternatively, you can save your build, and then open its actual file in a text editor, then modify its entry that way, save the file, and load it again in SP. That makes the changes AND retrains all the Attachment Points. Though it's not something very good to use in practice, since a Cone has only 2 attachment locations (Back and Center) compared to a Fuselage's 7 (Front, Back, Left, Right, Up, Down, Center), which could cause problems.)

    2.6 years ago