Profile image

Fuselage Compendium

57.2k bjac0  12 days ago

Hello! I am working on a large-scale documentation compendium for everything in SimplePlanes akin to SimpleCheats II but instead of just XML attributes, this will involve formulas for various objects' XML parameters. Eventually I will create a google document with everything from this project. This particular page should act as a 100% documentation on everything there is to know about fuselage blocks; Formulas, XML, unit conversions ETC. Let me know if I have missed any information or if I am wrong about any information gathered or if any info is explained in a confusing manor.

Note: some of the topics are just inherently confusing, especially the inlet slant.


Terms

Before jumping in it may be useful to know a few terms and phrases i'm using / making up
(These are mostly for the "Formulas" section)

Integer
An integer is any whole number, positive or negative. Fractions are not integers unless the sum is a whole number, same goes for square roots.

"R" or Real Numbers
The symbol " R " is often used in mathematics to represent the real numbers. To put it short, real numbers are any integer, fraction, square root, or decimal above or below 0 and extending out to but not including infinity.

Fuselage Unit
The unit of length that is used to determine the length, width, and height of a fuselage block. These units are equivalent to 1/2 meter. So therefore 2 Fuselage Units = 1 meter.
Defines the XML attributes:
frontScale, rearScale, offSet

Hollow Fuselage Unit
The arbitrary unit of length that is used to determine the thickness of a hollow fuselage's shell.
Defines the XML attributes:
inletThicknessFront, inletThicknessRear

Angle Modifier
The arbitrary unit used to define the Slant Angle of a fuselage block. Defined as any of the real numbers (R) between a range of -1 and +1. Range is defined by Slant Limit.
Defines the XML attribute:
inletSlant

Slant Limit
The range that which Angle Modifier is actually allowed to function in, if the Slant Limit is 0.5 (1/2) then an Angle Modifier of 0.8 will instead be 0.5, functionally the same as the "clamp(a,b)" funky trees function
Slant Limit is defined as the ratio Length / Front Height but cannot be greater than 1 in magnitude.

Slant Angle
The difference in angle between the front face and rear face of a fuselage block. The Slant Angle can never be greater in magnitude than 45°.


Fuselage XML Attributes

Part Identities

Note: Ever placed a fuselage block but realized you actually wanted it hollow and you really don't want to redo all of the values? You can just copy and paste one of these values into the partType attribute and change it to the desired block without any of the other values changing.
NOTE: Doing this will however remove all connections to said part.

Basic Fuselage Block:................. Fuselage-Body-1
Hollow Fuselage Block:.............. Fuselage-Hollow-1
Inlet Fuselage Block:.................. Fuselage-Inlet-1
Fuselage Cone Block:................. Fuselage-Cone-1
Solid Glass Fuselage Block:....... Fuselage-Glass-1
Hollow Glass Fuselage Block:... Fuselage-Glass-2

Main XML Attributes

Version [Integer]
Doesn't do anything but you could hide messages in binary in there though :3

.

frontScale [2D Vector]
Defines the width and height of the front face of a fuselage block.
Accepts any two numbers in the format x,y
"x" being width. "y" being height.
Accepts any value "R".

rearScale [2D Vector]
Defines the width and height of the rear face of a fuselage block.
Accepts any two numbers in the format x,y
"x" being width. "y" being height.
Accepts any value "R".

offset [Vector]
Defines the distance between the front and rear faces of a fuselage block.
Accepts any three numbers in the format x,y,z

"x" being horizontal translation (run).
"y" being vertical translation (rise).
"z" being length.
Accepts any value "R".

.

deadWeight [Value]
Defines extra weight added to the fuselage in kg. For whatever reason it can only be read as lbs in the UI.
Accepts any value "R".

buoyancy [Percentage]
Arbitrary buoyancy units.

fuelPercentage [Percentage]
Defines mostly arbitrary parameters for the fuel tank.
(NEEDS DOCUMENTATION, MAX FUEL VOLUME IS USUALLY MUCH LOWER THAN ACTUAL FUSELAGE VOLUME)

.

smoothFront [Boolean]
Defines whether or not the fuselage block will try to join it's lighting map to the fuselage attached to it's front face.
Makes things look curvy >:)
Accepts True or False boolean statements.

smoothBack [Boolean]
Defines whether or not the fuselage block will try to join it's lighting map to the fuselage attached to it's rear face.
Makes things look curvy >:)
Accepts True or False boolean statements.

.

fillCutFace [Boolean]
Determines whether or not to create a geometry mesh where portions of the fuselage have been cut out.
Accepts True or False boolean statements.

fillFront [2D Vector Range Definition]
Uses four percentages to define a cut-out portion of fuselage block starting from the front.
Accepts any four percentages in the format w,x,y,z

"w" Being from the top. "x" Being from the bottom.
"y" Being from the left. "z" Being from the right.

Those 4 values can actually be above 1 or below 0 and doing such can make for some interesting geometry, experimentation awaits!
Accepts any value "R".

fillBack [2D Vector Range Definition]
Uses four percentages to define a cut-out portion of fuselage block starting from the rear.
Accepts any four percentages in the format w,x,y,z

"w" Being from the top. "x" Being from the bottom.
"y" Being from the left. "z" Being from the right.

Those 4 values can actually be above 1 or below 0 and doing such can make for some interesting geometry, experimentation awaits!
Accepts any value "R".

.

autoSizeOnConnected [Boolean]
Defines whether or not a fuselage block will automatically change it's size to fit an attached fuselage block when they get placed together. This function however no longer seems to work.
Accepts True or False boolean statements.

.

collider [String]
Defines whether the physical hitbox of a fuselage block is rectangular or whether it conforms to the actual shape of it's corners.
(Can be used to give fuselage blocks roughly circular hitboxes)
Accepts the following string inputs.
Auto - The default, rectangular shaped hitbox.
Basic - Exact same as basic, no apparent reason to exist.
ConvexMesh - Hitbox that conforms to shapes of corners.
NonConvexMesh - Same as ConvexMesh however this one adds a hole in the centre of hollow fuselages that adheres to their internal geometry. Unfortunately this distinction only applies in the editor and does nothing when loaded in.

cornerTypes [String]
Defines what corner types that both the front and rear face will have.
Accepts Integers from 0 to 3 in a format of a,b,c,d,w,x,y,z

"a" being front top right. "b" being front bottom right.
"c" being front bottom left. "d" being front top left.
"w" being rear top right. "x" being rear bottom right.
"y" being rear bottom left. "z" being rear top left.
Accepts the following string inputs.
0 - Hard Corner (square)
1 - Smooth Corner (bevelled)
2 - Curved Corner (round)
3 - Circular Corner (elliptical)

Special Attributes

Inlet Block

inletTrimSize [Percentage]
Defines what percentage of the part (from front to back) should be coloured with a secondary colour.
Accepts any number between 0 and 1.

Hollow Fuselage

inletThicknessFront [Arbitrary Unit Value]
Defines how thick the shell towards the front of a hollow fuselage block should be.
Accepts any value "R".

inletThicknessRear [Arbitrary Unit Value]
Defines how thick the shell towards the rear of a hollow fuselage block should be.
Accepts any value "R".

Glass

opacity [Percentage]
Defines how opaque or transparent the glass fuselage part is.
Note: Setting the opacity below 0 can have some interesting effects and used to cause glass to glow, hence why you may see funky looking glass on older builds.
Accepts any value "R".

hideFront [Boolean]
Determines whether or not to hide the front face geometry of a glass fuselage part.
Accepts True or False boolean statements.

hideRear [Boolean]
Determines whether or not to hide the front face geometry of a glass fuselage part.
Accepts True or False boolean statements.

hideInside [Boolean]
Determines whether or not the inside of a hollow glass fuselage is visible or not. Can be useful if you're having a hard time seeing out of cockpit glass.
Accepts True or False boolean statements.

overrideHide [Boolean]
Typically glass fuselage parts will automatically set the hideRear and hideFront attributes automatically and appropriately, this boolean attribute can be activated if they aren't behaving how you want them to.
Accepts True or False boolean statements.


Formulas

Hollow Fuselage Shell Thickness

To translate Fuselage Units into Hollow Fuselage Units for hollow fuselages with a width and height equal to or greater than 1:
Desired Fuselage Unit * 5 = Hollow Fuselage Unit

For hollow fuselages with a width or height lower than 1:
(Desired Fuselage Unit * 5) / Lowest Fuselage Unit = Hollow Fuselage Unit

To translate Hollow Fuselage Units increments to Fuselage Units:
(Hollow Fuselage Unit / 5) * Lowest Fuselage Unit = Fuselage Unit

Inlet Shell Thickness

This is for the rear of the inlet fuselage block which is calculated slightly differently than the hollow fuselage block.

NOTE: I will go mad if I try to reverse engineer this one. So far I know there's a 1/2 and a 1/5 and a times 5 somewhere in there so uhhhhh yah.

Fuselage Inlet Slant

Note: Inlet slant is REALLY WEIRD! The Angle Modifier can be set to any real number between -1 and +1 but will be capped to the ratio of the length / front height. So if the front height is 2 and the length is 1 (ratio: 1/2) then the Angle Modifier can only do anything useful between -1/2 and +1/2. Ie if the Angle Modifier is -0.8 but the Slant Limit is -0.5 then the Angle Modifier will actually only be -0.5

To calculate the Slant Angle:
arctan( Angle Modifier / Slant Limit ) = Slant Angle

To calculate the Angle Modifier unit needed to provide a specific Slant Angle:
tan( Desired Slant Angle / 1 ) = Angle Modifier

Sidenote: Slant Angle can not ever be more than 45° and Slant Limit can not ever be greater than 1 in magnitude.


This forum post is currently a WIP! Any and all feedback is much appreciated!

  • Log in to leave a comment
  • Profile image
    37.9k V

    wooo corporate tactics

    +1 10 days ago
  • Profile image
    37.9k V

    @bjac0 cant really do that in google docs i dont think. either way, message me on discord and ill add you to the document

    10 days ago
  • Profile image
    57.2k bjac0

    @Kangy NOP'E

    +1 10 days ago
  • Profile image
    17.0k Kangy

    bjac this is lots of words for you are you alright

    +1 11 days ago
  • Profile image
    50.3k PlaneFlightX

    @V @bjac0 Also sounds pretty cool, I will look into this.

    11 days ago
  • Profile image
    57.2k bjac0

    @V Sounds like a good idea, maybe have the formulas under drop-down menus (I'm just shootin ideas)

    11 days ago
  • Profile image
    37.9k V

    Actually, after some thinking, would you like to just merge this all into SCII? Multiple documents with the same purpose just makes things confusing. Fuselage stuff can be added to the fuselage section that already exists and a formulas section can be put below the XML attributes section.

    Maybe an advanced section? I dunno, will have to draft it out

    +2 11 days ago
  • Profile image
    37.9k V

    Oooo
    (Thank God because I was really not looking forward to redoing everything for SP2)


    feel free to steal stuff (with credit) from Simplecheats II, the stuff quoted from WNP78 is copy pasted directly from the original SimpleCheats document, so I don't mind you doing the same to me and planeflightX

    +1 11 days ago
  • Profile image
    27.8k Strucker

    Should be helpful lol

    +1 11 days ago
  • Profile image

    For some reason I never bothered learning which number does what for the fillFront/Rear and I've just been finding the correct fill face through trial and error XD

    +3 11 days ago
  • Profile image
    37.6k Graingy

    I like your funny words, magic man.

    +3 11 days ago
  • Profile image
    60.3k BMilan

    woah this is super useful! great job!

    +1 11 days ago
  • Profile image
    29.6k YarisSedan

    yoooo tysm man

    +1 12 days ago
  • Profile image
    23.4k marcox43

    awesome!

    +1 12 days ago
  • Profile image

    T!!!

    +2 12 days ago
  • Profile image
    138k BaconEggs

    first edit: ummm!!!!

    +4 12 days ago