Jump to content

How does a fairing's shape correlate with the xsections in the file?


Recommended Posts

Ok, I'm not sure if this belongs here, since it doesn't exactly fall in with normal game play, nor do I know whether many people will know how to answer this, but I figured I'd give it a shot.

So it started out that I wanted to use a fairing to give a Concorde replica a nice, smooth, white fuselage. The orange lines were slightly annoying, so I figured that perhaps I could edit the fairing to have notches in which the orange bits of the texture would be hidden. So I changed it from

Spoiler

  XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 1.56978917
   r = 1.25
  }
  XSECTION
  {
   h = 1.86978912
   r = 1.25
  }
  XSECTION
  {
   h = 4.86978912
   r = 0.375
  }
 

which looked like this

Spoiler

0U5JTWZ.jpg

to

Spoiler

   XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 1.56978917
   r = 1.25
  }
  XSECTION
  {
   h = 1.56978917
   r = 1.20
  }
  XSECTION
  {
   h = 1.56978917
   r = 1.25
  }
  XSECTION
  {
   h = 1.86978912
   r = 1.25
  }
  XSECTION
  {
   h = 4.86978912
   r = 0.375
  }

It came out looking like this

Spoiler

UrvQNk7.jpg

Now, having some limited coding experience and knowing math and whatnot, I figured this was a result of me making the notch be a sharp, flat thing, and that was resulting in some kind of divide by zero, NaN, or something else weird in whatever calculations it uses. So I decided to try testing using another fairing to create a near-flat end to a fairing.

So I took a changed this cylinder + cone shaped fairing with this panel coding

Spoiler

  XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 3
   r = 1.25
  }
  XSECTION
  {
   h = 6
   r = 0.375
  }

which looked like this

Spoiler

8EzFYoQ.jpg

to

Spoiler

  XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 3
   r = 1.25
  }
  XSECTION
  {
   h = 3.05
   r = 0.375
  }

which looked like this

Spoiler

HhkOs1Q.jpg

I had been expecting something that looked almost like a cylinder, but nope.

I've been able to make regular-looking cylinder + cone shapes of different lengths and even made a reasonable nose for an X-15 I'm working on, but this has left me puzzled.

Does anyone understand the fairing properties more than I do?

 

As I said, I'm not sure whether this belongs here (if it should be somewhere else, someone please point me in the right direction :)), nor if there are many/anybody here who knows what exactly is going on. This is mostly just a question of curiosity.

Link to comment
Share on other sites

I don't have an exact answer, but I do know that the fairing segment radius works somewhat like a Bezier curve (but not quite!), in that when you make a sharp angle in a segment, the segment right before that will be flared a bit in (or out depending), apparently to try to 'smooth' out any sharp angles.

I'm sure the amount of flaring is a neat mathematical formula of some kind, but I have not seen it mentioned anywhere. I just know it very annoyingly keeps preventing me from creating very exactly designed shapes.

Link to comment
Share on other sites

  • 4 weeks later...

Sorry, I have no means to try stuff out myself right now, but from looking at your numbers and my experience with bezier kurves I figure the following:

In the first example:

Spoiler

  XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 1.56978917
   r = 1.25
  }
  XSECTION
  {
   h = 1.86978912 => the small difference in height with the same radius here gives you the sharp kink
   r = 1.25
  }
  XSECTION
  {
   h = 4.86978912
   r = 0.375
  }

So if you want to create a cylinder you might want to do something like this:

Spoiler

  XSECTION
  {
   h = 0
   r = 1.25
  }
  XSECTION
  {
   h = 3
   r = 1.25
  }
  XSECTION
  {
   h = 3.3
   r = 0.95
  }
 XSECTION
  {
   h = 3.3 (or maybe a little more here)
   r = 0.375
  }

 

Again, I have no idea how this might turn out, but it seams kinda reasonable...

But I don't think that's the way to solve your initial problem, removing the yellow stripes.
To do that, try editing the fairings_diff.dds in ..\GameData\Squad\Parts\Aero\fairings\
(to look something like this one: fairings_diff.dss)
 

Edited by Orbin
Link to comment
Share on other sites

2 hours ago, Orbin said:

<snip>

...So if you want to create a cylinder you might want to do something like...

<snip>

But I don't think that's the way to solve your initial problem, removing the yellow stripes.
To do that, try editing the fairings_diff.dds in ..\GameData\Squad\Parts\Aero\fairings\
(to look something like this one: fairings_diff.dss)
 

On the first thing, I was testing using a standard cylinder+cone fairing shape, but I was figuring on applying what I was doing to a fairing that was shaped like a cylinder later. It wasn't until my second set that I tried making a cylinder with an flat end. In that case I did what you said and got the oddball results seen in the last image. (I've found that by simply ending at whatever the radius I want the cylinder to be, I can get a cylinder, it just doesn't have a visible end, and so looks like a hollow tube (but it's not really).

 

What I was trying to do in the first example was contour the walls of the fairing so they changed from looking like the top example to the lower example in the following picture.8V9gwQc.jpg

That is, there is a notch inside which the stripe is hidden.

 

Also, yes, I knew I could edit the texture file and get rid of the stripe. However, this would only get rid of the stripe for me. As my objective in making these replicas was for others to enjoy them, I wanted the missing stripes to be inherent to the craft. It seems that there is no clear way to do this (other than perhaps starting a whole new fairing every couple meters so each individual fairing isn't long enough to have a stripe.) Ah well.

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