Author Topic: Nicer nebulae.  (Read 24917 times)

0 Members and 1 Guest are viewing this topic.

Offline Fineus

  • ...But you *have* heard of me.
  • Administrator
  • 212
    • Hard Light Productions
Awesome, thanks for releasing devi1sdoz3n! Don't worry about everyone begging for a release - it just goes to show that you made something awesome and everyone couldn't wait to get their hands on it :)

Edit: One thing, and I do feel silly for asking: How do you access the debug console to input those two commands you suggested?
« Last Edit: January 18, 2012, 02:30:31 pm by Fineus »

 
Just a note, so I don't steal someone's credit: all the poofs I used started life as nebula background elements already present in MediaVPs. I tweaked them, chose the right combinations and colors, animated them and made the backgrounds - basically made the thing work for full nebulae.
Fineus, to use a debug mode, you have to choose a debug build in Launcher, then press shift+enter once the mission starts.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
This really is awesome work. Pretty humbling too, to discover that for all that the MediaVPs have Nebula Poofs in them, we never once distributed updated Nebula background bitmaps.

It is also really startling to discover just how wrong our existing poof files are in terms of visual effect. I'd like to know who did them so I can ask them what their compelling idea was behind them.

In any case. Yes, these will be in the next MediaVPs. And then some. :D I'm currently looking at making the nebula.tbl A: Extendable so that we can use the alterations (especially yellow and orange) as additions rather than replacements (which the existing TBL can do, but not while also adding the nbackblue, the current limit is 10 entries) as well as B: afford expansion for increasing the amount of Poofs available (this one is MUCH more difficult because of the Flags used in FRED for setting these, and we can't break Retail ordering for anything still relying on the existing values). Maybe even C: introduce a Nebula Template that can be referenced with predefined backgrounds/poofs/pof and fade in/out distance values and the like, though that part will be something for much later. Or at the very least, expand the current paltry limitations it has of 10 background images, 6 poofs.

I was also amazed to discover the +Skybox Flags: setting in your dome missions. I don't think I've ever seen anybody use those before. And I didn't even know what they did until I looked it up in the code. It's not even documented in the Wiki currently. I am hoping though that we can reduce having to release multiple nebula type POFs (where the only difference is the texture associated to them) by allowing $Texture Replace: to affect the Skybox Model.

Speaking of code though, I looked at the ranges allowed by the commands that you said were entered into the debug console, and while I'm not 100% positive, the neb2_max_alpha value looks way out of range. I was thinking I could see about adjusting the "default" hard-coded values to some extent (as controlled by detail settings in nebula\neb.cpp) when I discovered that. And as for the Asteroid popping, that may be correctable in code since it looks like it is currently using small_ship values instead of something more size appropriate, so I'll be playing around with that.

I'll be taking the liberty of smoothing some of the gradients used in the provided files, as well as converting them from PCX and TGA into either PNG or DDS (Uncompressed most likely, since otherwise we're right back at gradient banding central). I may also come up with some mixes that involve having an Alpha channel applied. I also hope to resolve why EFF is not operating correctly as a poof designation image for the animated effects. Which, btw, the TXT .eff file for those were either not created, or not distributed with your package. Irrelephant as it doesn't work in any case and easy enough to fix.

All in all, a very smashing amount of work done.
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 MetalDestroyer

  • Starwars reborn!
  • 210
You've done a great job. Now, I really love nebula mission !! :)







 

Offline Kolgena

  • 211
It's unreal how good the nebula looks there.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
What is unreal is the fact that some brilliant genius hard-loaded the Nebula Background loader to ONLY read PCX files in relation to the fogging that takes place.

I'm trying to work out correcting that so that it will support additional filetypes as allowed by the engine. Then I'll tackle why EFF's won't load for the Poofs.

Then I can get back on track with everything else I have planned as above.
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

 
Zacam, here is what neb2 command documentation says:

neb2_break_alpha: Alpha value (0.0 to 1.0) at which faded polygons are not drawn. Higher values generally equals higher framerate, with more visual cloud popping.

Using neb2_break_alpha 0.0 seems to get rid of popping nicely for distant poofs.

neb2_break_off: How many pixels offscreen (left, right, top, bottom) when a cloud poof becomes fully transparent. Lower values cause quicker fading.

I chose arbitrarily large value of 8192 pixels offscreen  (neb2_break_off 8192) to make sure that the close poofs don't pop out.

I didn't include the eff files for animated poofs because they didn't work, so there was really no point.

Concerning the PCX backgrounds, those are really weird. As far as I can tell, the image is not used at all (you can paint it black, or really anything, that's why I left the ugly fractal pattern), it is only used to set the color of the fog and the background, and even that in some weird way - it seems to me that the game takes the average of colors in the color palette.

Object pop-out seems to happen once the object is at 100% fog distance. Makes sense, as then you don't have to draw it anymore, since it's the same color as the background.
Unfortunatelly, once you start using skyboxes for backgrounds, you get object pop-in, because you don't have homogenous color background anymore (and skyboxes are additively blended on top of the fog color as far as I can see - that's why my skybox textures are so dark and subtle)

Also, as I've written before, explosions and things like that are not affected by fog, which breaks the effect. See images - the arrows point out explosions caused by asteroids hitting the Aquitaine beyond 100% fog, yet they are at 100% opacity. It would be nice to get that fixed.

Final note, I've included the objecttypes.tbl, because various objects had various fog distance settings, which makes no sense. I've set them all to the same number (max distance 500m), which can be changed in FRED with fog multiplier on per mission basis.

[attachment deleted by a basterd]

[attachment deleted by ninja]
« Last Edit: January 23, 2012, 09:19:38 am by devi1sdoz3n »

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Help me understand this,

Where are these patterns defined? It doesnt match up with the nebula.tbl
Which is:
Code: [Select]
+Nebula: nbackyellow
+Nebula: nbackblue
+Nebula: nbackcyan
+Nebula: nbackgreen
+Nebula: nbackpurp1
+Nebula: nbackpurp2
+Nebula: nbackred
+Nebula: nbackorange
I dont see nbackblack in there for example, setting it to nbackblack gives me a blue nebula.

I just can't seem to reproduce something as cool looking as MetalDestroyer's nebulas. Mine all look like this:

A kind of dull monotone single color (nebula settings of this screenshot are not the ones I posted above)
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline mjn.mixael

  • Cutscene Master
  • Moderator
  • 212
  • Chopped liver
    • Steam
    • Twitter
Use teh poofs?

Also, did you install the files 'as-is' or did you convert them? Nebula code seems to have some issues regarding file types.
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.

 
Read the ReadMe.txt for poof, bg, and lighting combos (that is, specific backgrounds are supposed to go with specific poofs, turning on all poofs won't make the effect look better - the idea is that each nebula has a slightly different look to it, not just color), otherwise the nebula will look crap.
Background patterns (actually just colors really) are defined in nebula.tbl. If you put the one I uploaded into the Tables folder, the new backgrounds should be visible in FRED.
I killed nbackblack.pcx as I had no use for it, you can add it back if you want.
There are samples of all nebulae in Missions folder, go through those.
« Last Edit: January 23, 2012, 10:13:22 am by devi1sdoz3n »

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210

I just can't seem to reproduce something as cool looking as MetalDestroyer's nebulas. Mine all look like this:

A kind of dull monotone single color (nebula settings of this screenshot are not the ones I posted above)

I didn't use any skybox. I choose one of those nebula pattern and check the poof I needed to increase the depth. So, if I choose nbackpurp1, PoofPurp1 and PoofPurp2 are checked.
Poof textured has been redone, so, use them ! :)

 

Offline Nighteyes

  • 211
Object pop-out seems to happen once the object is at 100% fog distance. Makes sense, as then you don't have to draw it anymore, since it's the same color as the background.
Unfortunatelly, once you start using skyboxes for backgrounds, you get object pop-in, because you don't have homogenous color background anymore (and skyboxes are additively blended on top of the fog color as far as I can see - that's why my skybox textures are so dark and subtle)

Also, as I've written before, explosions and things like that are not affected by fog, which breaks the effect. See images - the arrows point out explosions caused by asteroids hitting the Aquitaine beyond 100% fog, yet they are at 100% opacity. It would be nice to get that fixed.

IMO an easy fix for the pop out at 100% fog distance would be to simply disable the pop out, I would much rather have a ships outline far in the distance than suddenly pop into view, this would be good for missions with bright skyboxs, for missions with a darker background it wouldn't change much as you won't be able to see the outline anyway as it will blend into the skybox better.

explosions, thrusters and all effects in general have this problem, I don't know if its true or not, but now that these effects are considered "soft particles" I think it might be possible to adjust their opacity depending on their distance from the player and the far multiplier

 
I agree. A skybox is infinitely distant, so objects shouldn't blend into it at all, they should be nebula colored silhouettes once they get past max fog distance. Unfortunately, I haven't got the idea how to disable pop out.
Concerning explosions, thrusters, etc, weirdly enough, thrusters do have fog dissolve, but it appears that their max fog distance is much larger, so they disappear from view farther away. No idea how this can be controlled.
Anyways, I think I have done what I can with this effect, if someone manages to fix these things, I'll be happy to finish it. In the meantime, I have moved onto something else =)

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Thanks for the replies

Turns out, there was a nebula.tbl in a different mod folder overwriting it. That's what I get for using multiple mod folders  :p

Good job with this devi1sdoz3n
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
I agree. A skybox is infinitely distant, so objects shouldn't blend into it at all, they should be nebula colored silhouettes once they get past max fog distance. Unfortunately, I haven't got the idea how to disable pop out.
Concerning explosions, thrusters, etc, weirdly enough, thrusters do have fog dissolve, but it appears that their max fog distance is much larger, so they disappear from view farther away. No idea how this can be controlled.
Anyways, I think I have done what I can with this effect, if someone manages to fix these things, I'll be happy to finish it. In the meantime, I have moved onto something else =)

In non-nebula missions, the skybox is infinitely distant. But to make the ships fade cleanly, I think they need to fade into the skybox.

Idea, may not be intelligible to non-graphics-coders:
  • Draw all the opaque stuff
  • Draw the nebula skybox, with opacity based on the values in the depth buffer
  • Draw the translucent stuff, with reduced opacity based on distance

The first and last steps are already being done (mostly).





Edit: @Nighteyes: explosions could fade based on distance without needing to use soft particles.

 
I think it makes sense for glowy stuff like thrusters and explosions to have a bit of a further fade distance though, since it'd make sense that they'd be more visible if they were self-illuminating.  Think city lights on a foggy day/night. 

 

Offline Kolgena

  • 211
That's a tough one. All the explosion effects fade to some blackish greyish smoke cloud. That's the part that looks out of place with such high opacity through the fog.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
So, in my crawling through the code in relation to the background images used in nebula, I'm having a hard time determining if it is actually in fact USING the image other than just to average the palette from it (which is currently fixed to loading indexed PCX images). As in, if it's then using that in application to the image itself for variation of the opacity/density for rendering it.

So far it seems that it might be, but because the images it's rendering from are PCX, even in using a bm_load for a DDS it's still rather blocky and low-res looking because of that fogging interpolation. So I'm thinking of maybe setting it up where you can either define a background as it currently is and expanding the allowed entries (to include for more custom variations rather than whole sale replacement) by being able to append to the list, or having where you can do a "background free" by specifying the fogging color and then intermix the Poofs to make it what you want. Basically, when you choose the option for a Full Nebula, you then select which type of nebula you want, indexed fogging from background image, or free form defined fogging values. It may even allow for where you can do both, but I still need to test how that looks (which would expand combination variance without having to rely on creating all new backgrounds to distribute).

Since the Retail background editor has those Pattern/Color options with Pitch/Bank/Heading that are held over from FS1 (and currently do nothing at all) that I could replace those with the ability for setting the fogging colors there directly, which works out placement wise in going hand in hand with the Fog Distance Multipliers. This would also then free up the ability to expand tho Poofs section into maybe a scrollable check-box option area (essentially how it already is, but the ability to house more elements without expanding the real estate taken up by it). Still need to work out a better way for deriving those Flag values that get set up into something a little more dynamic without breaking anything.

So, there are the thoughts for the day in relation to how progress is looking for enhancing how we can manipulate nebula in conjunction with getting these in game in a way that can hopefully work out for everyone.
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 Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
And what about my suggestion?

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Wow! Hadn't noticed this thread before. I have no words.. those nebula capship shots in the vid look so much better than the original.