Author Topic: Nebula and Skyboxes  (Read 9267 times)

0 Members and 1 Guest are viewing this topic.

You've probably already seen it but I recently made a skybox that is meant to be freded with nebula poofs. When I made my test mission I only used small craft and everything looks pretty cool. Luis Dias pointed out though that larger ships don't show up at all until about 1500 meters and when they do they pop into the scene.

Here's a vid to illustrate: http://www.youtube.com/watch?v=7mHHU1CBzsk

It seems the ship should still be visible in silhouette from far away and then gradually become more visible as you get closer. Is there a way to change the way large ships are rendered in nebula when a skybox is present?


(p.s. I know my hud is all messed up. It's just in my test mod.)


 
Did you hear that fellas? She says I have a Meritorious Unit.

 

Offline IronBeer

  • 29
  • (Witty catchphrase)
    • Minecraft
The large ship "pop" is unfortunate, but finding that skyboxes work with nebulae is f'kin awesome! Seriously, the overall effect is absolutely kickass.
"I have approximate knowledge of many things."

Ridiculous, the Director's Cut

Starlancer Head Animations - Converted

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
a long time ago I tried implementing 'texture fog' where it would use the background image and interpolate it with the textures/lighting of the ship, I never quite got it working, but I didn't have shaders, such an effect should be relatively easy now, especially since it's technically almost identical to the cloaking effect.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Hmmm... someone page Valathil to this thread....  :nervous:
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
valathil is dinosaur coding jesus :D

 

Offline Flipside

  • əp!sd!l£
  • 212
I'm not one of the coders, but it looks to me like if the nebula flag is enabled, the maximum draw distance is reduced to a preset amount and that changing that value should be all that is needed, however, since I don't have to look at the code, that's easy for me to say ;)
« Last Edit: August 15, 2011, 11:57:07 pm by Flipside »

 
I'm not one of the coders, but it looks to me like if the nebula flag is enabled, the maximum draw distance is reduced to a preset amount and that changing that value should be all that is needed, however, since I don't have to look at the code, that's easy for me to say ;)

That's pretty much what my non-coder brain was thinking as well. I also thought that if Valathil took a bite of the problem he would probably spit something out that would blow all of our minds.
Did you hear that fellas? She says I have a Meritorious Unit.

 

Offline Sobbsy

  • 25
It would be nice if there was the ability to 'billboard' distant models - ie; beyond a certain range, models are represented by a 2d 'sprite' of sorts. As you get closer, they switch out with their relative 3d model. Something like that combined with soft particles would be a good workaround. The only problem is that I have no idea how to do the 2d sprite and account for 'angle of attack', ie; what angle the player is approaching it from. Either you'd need a LOT of sprites for all possible angles, or somehow make the ship model appear as a sprite viewed from the angle you're approaching it from.

Probably not the best solution for obvious reasons. The other option is to have models fade in to view gradually rather than just snap into existence. I'm sure that's a far more plausible workaround for any plucky coders out there, and it would probably be the most visually appealing method.

I'm not sure if increasing the render distance is the most elegant solution either, but it would definitely work.

 

Offline Flipside

  • əp!sd!l£
  • 212
As an aside, I think this is one of those situations where a procedural 'cloud' type effect in the background as a sort of midground between the poofs and the skybox would really have an impact, since the skybox does reveal that the nebula is a lot thinner than it seems and relies a lot on not having a skybox in order to encourage that 'where am I?' sensation.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
It would be nice if there was the ability to 'billboard' distant models - ie; beyond a certain range, models are represented by a 2d 'sprite' of sorts. As you get closer, they switch out with their relative 3d model. Something like that combined with soft particles would be a good workaround. The only problem is that I have no idea how to do the 2d sprite and account for 'angle of attack', ie; what angle the player is approaching it from. Either you'd need a LOT of sprites for all possible angles, or somehow make the ship model appear as a sprite viewed from the angle you're approaching it from.

Probably not the best solution for obvious reasons. The other option is to have models fade in to view gradually rather than just snap into existence. I'm sure that's a far more plausible workaround for any plucky coders out there, and it would probably be the most visually appealing method.

I'm not sure if increasing the render distance is the most elegant solution either, but it would definitely work.

Not going to happen, because that's what LODs are for.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
transparency sorta is conflicting there, you see these distant clouds but at the same time you see the ship hazed up so bad that it looks like visibility should be a fraction of that, making it impossible to see the skybox. if you could just reduce the haze you would have a nice effect there.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Sobbsy

  • 25
Not going to happen, because that's what LODs are for.

Yeah, I was going to make a comment along the lines of "But I suppose we could just use more aggressive LODs for that effect". I think that with some good LOD models and a more effective method of 'fading' models into view, the problem is more or less solved. It'd be a bit like soft particles, you know? Have the model fade in gradually based on its distance away from the player, and it should work quite well.

Really the biggest issue with what I saw in the OP's video was not with how far away the models were being rendered, but rather with how harshly the models blinked into existence when they hit the rendering range's outer limit. If we can make them appear more 'naturally', then I would say that would do the trick just fine. Perhaps some sort of additive / blend setup whereby that fog-like effect that covers them tries its best to match the surrounding textures (the ship had a blue-ish fogging on it in the video). You know, a bit like how most AA methods sample surrounding pixels in order to better match the colour blending on harsh edges? Nothing quite so complex, but you get the idea.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
I will await your code patch then.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Not going to happen, because that's what LODs are for.

Yeah, I was going to make a comment along the lines of "But I suppose we could just use more aggressive LODs for that effect". I think that with some good LOD models and a more effective method of 'fading' models into view, the problem is more or less solved. It'd be a bit like soft particles, you know? Have the model fade in gradually based on its distance away from the player, and it should work quite well.

Really the biggest issue with what I saw in the OP's video was not with how far away the models were being rendered, but rather with how harshly the models blinked into existence when they hit the rendering range's outer limit. If we can make them appear more 'naturally', then I would say that would do the trick just fine. Perhaps some sort of additive / blend setup whereby that fog-like effect that covers them tries its best to match the surrounding textures (the ship had a blue-ish fogging on it in the video). You know, a bit like how most AA methods sample surrounding pixels in order to better match the colour blending on harsh edges? Nothing quite so complex, but you get the idea.

would the cloaking shader help?
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
I'm not sure whether this has any bearing to the discussion, but objecttypes.tbl has an option on a per-class basis, to adjust at what point a ship will begin to be obscured by nebula fog, and at what point it will be completely obscured.  As I have pointed out in the asteroids and nebula thread, (and others over the years) it doesn't seem that much of a stretch of the imagination to allow this figure to be adjusted on a per-mission basis using a global multiplier used on the figures for each class, in the background editor in FRED, or perhaps via sexps in-mission to allow for variable density nebulae.
The Trivial Psychic Strikes Again!

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature

May or may not be related, but there is code pending that, to quote:
Quote from: Sushi
Adds +Fog Near Mult: and +Fog Far Mult: to the .fs2 file, allowing mission-specific changes to fog render distance. This doesn't affect the way the poofs are drawn, just the models.

It's still pending tests and the interface elements to FRED and may no precisely address all elements raised in this thread, but it's something at any rate and will likely be showing up as soon as FRED controls are made for it and it's been further tested.
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 Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
that otta fix the haze issue nicely.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Sushi

  • Art Critic
  • 211

May or may not be related, but there is code pending that, to quote:
Quote from: Sushi
Adds +Fog Near Mult: and +Fog Far Mult: to the .fs2 file, allowing mission-specific changes to fog render distance. This doesn't affect the way the poofs are drawn, just the models.

It's still pending tests and the interface elements to FRED and may no precisely address all elements raised in this thread, but it's something at any rate and will likely be showing up as soon as FRED controls are made for it and it's been further tested.


It's been "pending FRED integration" for months and months. :) I'd do it myself, but lacking VS Professional, I can't compile FRED. So if you want it, bug one of the other SCP guys to do it. :)

 
Less pending, more integration! ;)

I'd love to toy around with all the new effects as of late, but seems I'll have to wait with that until there's a solid version of it in the SVN/Nightlies.

EDIT: Wow, speak of the 'devil', a new nightly just got released. ^^
« Last Edit: August 17, 2011, 10:16:30 am by JCDNWarrior »
I'm all about getting the most out of games, so whenever I discover something very strange or push the limits, I upload them here:

http://www.youtube.com/user/JCDentonCZ

-----------------

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress to more pain."
- George Orwell

 

Offline Iss Mneur

  • 210
  • TODO:

May or may not be related, but there is code pending that, to quote:
Quote from: Sushi
Adds +Fog Near Mult: and +Fog Far Mult: to the .fs2 file, allowing mission-specific changes to fog render distance. This doesn't affect the way the poofs are drawn, just the models.

It's still pending tests and the interface elements to FRED and may no precisely address all elements raised in this thread, but it's something at any rate and will likely be showing up as soon as FRED controls are made for it and it's been further tested.


It's been "pending FRED integration" for months and months. :) I'd do it myself, but lacking VS Professional, I can't compile FRED. So if you want it, bug one of the other SCP guys to do it. :)

Just to be clear, you are talking about this [SCP internal] patch?  Since I am futzing around with FRED anyway I will do it tonight if Zacam or Karajorma don't beat me to it.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments