Author Topic: Request: Making Nebulae and skyboxes play nice.  (Read 2495 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Request: Making Nebulae and skyboxes play nice.
So, anyone who's tried to combine a skybox and a nebula (Gas Giant missions look good like this) will have run across this problem. If the current nebula system works the way I think it does, then it's actually quite clever - the background behind the poofs is set with a simple image, and that same image is then projected in some way across all the models. The closer the player gets, the less intense the projection, until you can see texture details. From a far enough distance, it's not rendered at all, but even at middle distances, you can't see the model because it's the same colour as the background. Thus we have the awesome "emerging from the mist" effect without any volumetrics or complex, intensive graphical tricks. Like I said, very clever.

Unfortunately, when you're using a skybox, this clever system falls over, because the backgrounds are much more varied, meaning that the backgrounds and the models are now different colours:

http://imagebin.org/179413

This is a particularly good example of the problem, since you can see the old system works where the skybox is roughly the right colour, but falls apart where the colours are very different. In fact, there's another small platform in the left of the image that is completely invisible because it happens to sit inside that middle layer, and the old FS2 system is doing what it's supposed to do, and obscuring it.

When it doesn't work, however, it's very jarring, since it means that things pop into existence very suddenly and very visibly. What I was hoping, then, was some way of changing this system - I'm not sure the best way of doing it, though Zacam suggested a transparency system, i.e. possibly making the ships transparent, rather than linked to nebula background colour, with the transparency fading out as you got close.

So, would this be possible/easy/difficult/impossible? Any ideas?


[EDIT]Oh, and for the record, I did already try a TGA with a transparent Alpha map and a 0, 255, 0 pcx - neither worked.
« Last Edit: October 17, 2011, 02:45:36 am by Black Wolf »
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Nighteyes

  • 211
Re: Request: Making Nebulae and skyboxes play nice.
only way to combat this is to set the nebula fog range to very far, so that the model is rendered out pretty far and you don't see it pop in, its always there...
nebula+skybox would work with a relatively dark BG, but with brighter ones the visibility should be set far, and the nebula "fog" color should match the general color of the skybox, like they did in Wings mod

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Request: Making Nebulae and skyboxes play nice.
Nebula fog range isn't set in FRED - that's the radar range:

Quote from: FRED2 Documentation
Range determines how far (in meters) radar can detect enemy ships. Ships more than half this distance away will appear as faded blips on radar and cannot be targeted.
.

And I know that the background colour should be set like that, but, as can be seen from the picture, it's far from ideal.

Incidentally, I'm not sure if transparency is the best way to go here - I can see it looking good, and also terrible. Ideally, I'd love to see a way for the game to sort of "backtrack" along the line of sight from the player, through the object and to the skybox, and then kind of average out the colours, so you'd still see sillhouettes. Or just have the transparency occurring in the first, say, 500 or 1000m of visibility, just to avoid the "Popping in" effect.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Request: Making Nebulae and skyboxes play nice.
Nebula fog range isn't set in FRED - that's the radar range:

Quote from: SCP Commit Log r7494
Add "Fog Near Multiplier" and "Fog Far Multiplier" options for missions. Allows the FREDder to tweak distances at which ships fade out in a nebula.

I think he means that.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

  

Offline Nighteyes

  • 211
Re: Request: Making Nebulae and skyboxes play nice.
Nebula fog range isn't set in FRED - that's the radar range:

Quote from: SCP Commit Log r7494
Add "Fog Near Multiplier" and "Fog Far Multiplier" options for missions. Allows the FREDder to tweak distances at which ships fade out in a nebula.

I think he means that.


yes, thanks, thats exactly it  :yes:
sorry for the short replay, as I said set the multiplier to pretty far for nice results, something like 10,000 is pretty good, also you can take a look at the video of the wings mod, has bright skybox+nebula enabled, IMO the far multiplier should be set much further but thats my preference only...
http://www.youtube.com/watch?v=D6Mmz4y7Tgs&feature=related  (00:39)

*on this note I'm still waiting to see if there is any progress on the feature request I asked for, being able to see nebula bitmaps when full nebula is turned on

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Request: Making Nebulae and skyboxes play nice.
Oh, well, that'll help, but it wont solve the problem entirely, I fear.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp