Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: 0rph3u5 on October 20, 2018, 04:36:26 am

Title: "Fog Near"/"Fog Far Multiplier", how does it work?
Post by: 0rph3u5 on October 20, 2018, 04:36:26 am
So, for The Lost Generation - Jarin I want to stage it all with a slighly more unsettling ambiance, dipped just a tiny bit in the surreal - You are supposed to call it to question if the events are "just another day fighting Shivans".

For that purpose, I am going back to tried and true of horror story cheap tricks and clichés. It is supposed to be a bunch of readily avalible indicators about what is really going on without ever expressily saying "that is going on" - you know, I am trying to really go out on showing instead of telling.

Part of that is using the "Nebula beyond Gamma Draconis" as primary location and mess with very much known envoirment in mission, e.g. switching storm patterns (AFAIK I can't modify "For Near" and "Fog Far Multiplier" per event (yet), but that's what feature requests are for).

One of the elements that is missing right now is, that I don't understand yet how the mechanics behind the "Fog Near" and "Fog Far Multiplier" fields work. I hardly have the time to just run a bunch of tests and go by observation; esspecially because some missions require different set ups (examples in the spoiler text below).

So what do these fields exactly do?
How do they interact with storm pattern?

Spoiler:
Example A:
During one mission you are extracting a GTVA science team from crashed ships. As part of the set-up I want you to be able to see the derelicts and surrounding debris field at certain radius - the dig site is about 2k in diameter, so I was thinking about a visual range just beyond that. (I will deal with the problem that the Scar Asteroid poses some unique challanges as a piece of terrain later)

Example B:
In another mission, you are the extraction team for a stealth fighter flying into a secured space - hiding nearby and waiting for things to go south. Here I want the visual range to allow you to see the enough some roughly-cruiser sized objects in the distance of about 12k, so you can follow the going-ons a bit, while a Ravana and Comm-Node at about twice the distance remain hidden. (the huge distances are deliberate give just enough time for events to unfold)

Each time of course I wish to avoid the it looking too much like open space too.
Title: Re: "Fog Near"/"Fog Far Multiplier", how does it work?
Post by: Trivial Psychic on October 20, 2018, 08:40:29 am
Don't take this as certain, but I think that the near multiplier dictates at what distance a ship will appear to be completely unobstructed by nebular fog, and the far multiplier being at what distance it won't be visible at all.  For example, if you set the near distance at 2, and assuming default is 1, then at twice the default distance, the ship in question will be completely visible... at least that's my take on it.  I seem to recall these being introduced when I was doing some FREDding for TBP many years ago and wanted Hyperspace to be less obscuring... though I never got around to testing it.  Of course, nebular fog has nothing to do with the poofs and the sheets are rendered as well.
Title: Re: "Fog Near"/"Fog Far Multiplier", how does it work?
Post by: Spoon on October 20, 2018, 10:19:47 am
Okay so this thread made me curious and I tested stuff.

Range: Seems to be just purely the range at which you can target things (hostiles that is, I think friendlies can be targeted at any range)

Fog Near: I have absolutely no idea what this does at this point. I set this to all kinds of numbers but could not see any noticable difference.

For Far Multiplier: The default view range seems to be a range of 1000. Fog Far Multiplier is well, as the name states; a multiplier for that view range. So if you want to see ships clearly at a range of 3000, then set this multiplier to any number above 3. Why this couldn't just be called "View range" and be set in just actual distance, I have no idea. This just seems pointless vague ¯\_(ツ)_/¯
Depending on the size of the ship, there seems to be a few hundred meters of partially obscuration.

(https://i.imgur.com/n8dEuqi.png)
This was with a setting of 1, as you can see, at a distance of 1069, only the bits closer to the player are visible.

(https://i.imgur.com/z1SxSuf.png)
And with 1.1 the ship becomes slightly more visible, as more of it falls inside the 1100 view range.
Title: Re: "Fog Near"/"Fog Far Multiplier", how does it work?
Post by: PIe on October 20, 2018, 11:09:48 am
It looks like the default for Fog Near is 10 and it is a multiplier as well.
Title: Re: "Fog Near"/"Fog Far Multiplier", how does it work?
Post by: 0rph3u5 on October 22, 2018, 12:49:41 pm
@Spoon:
Thanks for the help. In no means diminished by what comes next.



So, I was vaguely aware that I was missing something while trying to wrap my head around this. That something -unsuprisingly- was a data-field in Objecttypes.tbl (aka "the .tbl where I find every prop effect I vaguely remember existing"): $Fog: (http://wiki.hard-light.net/index.php/Objecttypes.tbl#.24Fog:)

While that solves another set of issues, it by no means solve the initial problem I see before (yet, probably)

ps. the objecttypes.tbl-section might actually solve the issue of not being able to control the fog-effect directly via SEXP, as I can just work around it with situational copies of relevant ship.tbl entries.