Topic: Why, Yes You Can Make The In Mission Nebulas Look Better...  (Read 10130 times)

0 Members and 1 Guest are viewing this topic.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Why, Yes You Can Make The In Mission Nebulas Look Better...
« on: March 07, 2016, 11:26:15 pm »
These are quick roughs to see what can be done. I think they can be better. There are some interesting problems to overcome.






Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #1 on: March 08, 2016, 03:09:53 am »
This one looks like it might work well.





Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #2 on: March 08, 2016, 09:55:52 am »
Yes, this is an improvement. How do they look from F1 view, say at a range of 15 from your target?

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #3 on: March 08, 2016, 12:14:00 pm »
Yes, this is an improvement. How do they look from F1 view, say at a range of 15 from your target?

Like everything in F1 view, I'm finding that they look like crap. Of course the old nebulas look like crap too, it's just that they are so crappy to begin with that you don't really notice. I'll explain a little later when I post my final screenshots and describe what I did so others can tinker.

IMO the best thing to do would be to build two entirely new nebulas just for this purpose, but that will take some doing.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #4 on: March 08, 2016, 02:52:03 pm »
Here are my final beta tests. I haven't figured it all out yet. I'm still confident there is room for improvement.
















As you can see, they look awful from F1 view. I'll explain why below.










Here's what I know:

The nebulas use the skybgnd (pink) and skybgnd-mono (white) textures in the Textures folder to create the nebulas. The original images are 256x256 and get blown up a lot when mapped onto the game screen. This is part of the reason they look terrible.

The nebula "model" is an internal model, like the star model, and can't be changed or manipulated without the source code and/or other tools. From what I can tell, the model is a cylinder with the ship at the center. Zoom and Tilt do not affect your perspective of the nebula, i.e. the cylinder pitches up and down with you and changing your optical distance from the ship leaves the rest of the screen unchanged. Panning right and left will change your view around the inside of the cylinder. As a result only the middle part of the image you place on the model will ever be seen. More testing needs to be done on this as I haven't found the "perfect " fit when it comes to image size yet.

The texture map is a wrap around the cylinder, like making a tube of a drawing you made and placing it around your ship like scenery. Only this scenery is partially transparent, and there are two cylinders that overlap each other, one wrapped around the other so you have an inner and an outer cylinder. The outer cylinder is of course larger than the inner one. This is why you will occasionally see multiple images like you are drunk and also why F1 view looks so terrible. One image is overlapping the other, but is slightly larger. Because of this a generic cloud type of shot is best, since any recognizable landmarks will be seen many times.

Taldren solved this problem by making the original graphic a wrap around, i.e. each side transitions into the adjacent side of another copy so that it looks like a continuous particle field, and by overlapping the cylinders, made the effect random enough so you don't notice the pattern while fighting. If you look just at the nebulas you can see it pretty clearly. This means that any images you use must wrap at the sides or you will have a giant seam running from the top to the bottom of your screen every time you make a full rotation. The program maps several iterations of the image around the cylinder, meaning that smaller images will repeat several times before a complete rotation back to start. I'm not exactly sure how many it tries to force in there, but it does seem less the wider the image you try to place.

I have no idea how big the canvas is. Wider images get compressed some, but I haven't found a goldilocks zone yet. From what I have seen anything below about 1280 in height seems to start to look bad, but I have had images pushing 5000 in width and it still took it. Like I stated before, the top and bottom seem to get cut off no matter what the size, at least with images over 1200 in height. I didn't really experiment with smaller since they look terrible at those sizes. The images I used for the shots are 4096x1660, but I'll bet they could be smaller, at least in width, and still look the same. After a certain point it doesn't seem to make any appreciable difference how big it is.

Quality of the image in game is tricky. I went through about 30-35 images and some looked great as static shots, but rendered in the game like someone barfed on my monitor (I have an LED monitor that sees a ton of colors and it is very unforgiving). Others, like the ones I posted, seemed to hold up better. All I can say is try everything because you never know. It would be so cool to be able to disable the space backgrounds when in a nebula or have the background pointed to an empty model when a nebula is detected. They tend to interfere, but some actually make the shot better, so there is give and take on that point.

The best course would be for someone with the skill to make a new generic nebula graphic that solves all of these problems and still looks good. That won't be me though. I can only hack stuff together.




Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #5 on: March 08, 2016, 06:22:50 pm »
Testing has confirmed that the inner cylinder maps two versions of whatever you have as your image and the outer maps three per circumference, hence the interference and the need to make the image generic.

Trying out resolution tests now, but early indications seem to show that nothing above 512x512 gains any noticeable clarity benefits, but that was up scaling a so-so small image. Next I'll try down scaling a good image. Size seems to be forced as all images looked the same size regardless of the size of the input image. You can, of course, tile smaller images within the larger image.

EDIT: I had the values for the iterations mixed up. It wouldn't make sense that the outer cylinder had less than the inner unless the image was distorted, and it's not.
« Last Edit: March 08, 2016, 06:34:32 pm by Corbomite »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #6 on: March 08, 2016, 07:21:38 pm »
Oh, this should give you some perspective as to what to expect:

My initial test image was 256x256 with a distinctive image at 128x128 overlaid upon it for scaling purposes. The 128x128 image took most of the height of the screen, leaving about 1/5 of the rest of the screen, top and bottom, empty. So you will lose about 4/5 of the image on that metric. I'll have to try placing black bars on the top and bottom to see what can be done, but letterbox might be the way to go.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #7 on: March 08, 2016, 10:20:52 pm »
Alright,

It seems that letter boxing is the way to go. You should have black areas above and below the image that equate to approximately 45%-48% or so of the total height of the image. You want to have the image just larger than half the total height and be centered for it all to appear in frame. Keep in mind that the two cylinders project at slightly different heights, so that extra 2%-5% or so is to cover the gaps. You'll have to play around a bit if you mind any of the image getting cut off.

The best sizes I can recommend for now are from 1280 to 3072, but larger widths seem to get compressed and it really depends on your image. Since we are inserting things that weren't designed in the game development environment every case is a bit unique. Some images need serious work to look good and some never look good no matter what you do.

I'll try to pin down about where they start getting smooshed. It might require putting in an image with writing for a scale.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #8 on: March 09, 2016, 12:49:39 am »
I think I have this sussed out. I used two very different widths and they both look good. Getting the top and bottom centered and making the edges wrap are the hardest parts once you have a willing image. I have a nice green one too, but it needs some edge work first. It's too bad we only get two nebs. This could be a fun pack. We can always swap them out when we get bored with them though.














Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #9 on: March 09, 2016, 10:57:27 pm »
Well it turns out that I was able to make a generic nebula that looks better than stock (and even passable in F1 view), but in doing so I discovered something that I had mistaken and stumbled across a bug that I had forgotten about. However, I have some good news and some bad news about custom nebulas like I was experimenting with. First some good news, i.e. the new nebulas:









Now some bad news.

As I was finishing up the nebs I remembered that there were three nebs, not two; one white, one pink and one red. The red always appear in hexes with red nebs placed in them on a campaign map and the pink and the white alternate based on mission in the hexes with a white neb on the map. Online D2 is the same as single player IIRC. As far as I can tell on the skirmish side of things, single and multiplayer always use the white nebula exclusively. Remembering this caused me to look for the red nebula texture, which I could not find. I found this odd since I had found (I presumed) the white and pink textures in the skybgnd and skybgnd-mono images.

Why is this important you ask? It turns out that I was wrong about how the textures are used. Long story short, I have no clue what skybgnd does at all (yet). Everything seems dependent on skybgnd-mono. I removed skybgnd completely and saw no change in the behavior or look. Skybgnd-mono is the basic white nebula and is the only texture used (as far as I can tell).

So where do the colors come from? The game just gives the white nebula a cheap paint job, pink or red, in the mission itself. This is why it is bad news for the campaign side of things. Any perfectly pretty picture will get a lousy coat of paint more than 2/3 of the time, so if the image can't handle the pink or red it will louse up your enjoyment plenty. Add in the horrible F1 view and the campaign side is stuck with generic.

The good thing is that the skirmish side of things can have anything, as long as you don't play in F1 view (I am really beginning to hate that view) you won't mind the occasional double image if they aren't too noticeable, but it does make getting your bearings harder because you can't trust the landmarks. Double images are inevitable in this thing. The trick is to make it not too noticeable.

I'll be releasing this with Adam's final background pack. I'll think about the better quality ones if there is enough interest.

Offline TAnimaL

  • Lt.
  • *
  • Posts: 770
  • Gender: Male
    • Combat Logs from the Cold Depths of Space
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #10 on: March 10, 2016, 08:36:59 am »
Thanks for all the hard work.  I'm all in favor of making the game prettier so I am interested, but I do like the F1 view in certain situations (old SFB habits) so this might be  a deal breaker for me. Not that I play in that many nebulae, and like you point out, the stock nebula doesn't look good anyways...

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #11 on: March 10, 2016, 09:09:08 am »
Well, at least I was able to improve the stock nebs so they don't make your eyes bleed. At this point all I can think of as a good use for the super beauty shots is for showing off new ship models in a prettier environment.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
And What About That Lousy Spacedust?
« Reply #12 on: March 10, 2016, 10:18:33 am »
In a torturously funny way, it turns out that spacedust is the only thing (except a good space background) that looks good in F1 view. Even still this was the only image so far out of about a dozen that looked good at all. This map makes the neb map look easy. All tiles and very unforgiving, but at least the image scales with your ship.








But, of course, there's always a fly landing in the pudding. You have to live with this:




And this if you like F3 view:




Strangely short sighted of Taldren, but I suppose there may have been a memory or other size issue at the time. Since spacedust is optional only in the .ini file (like vollyinfo), I think it is safe to assume to call it unfinished. I might try a couple of other things and if people want it (in every mission!) they can use it.

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #13 on: March 10, 2016, 01:32:25 pm »
So where do the colors come from? The game just gives the white nebula a cheap paint job, pink or red, in the mission itself. This is why it is bad news for the campaign side of things. Any perfectly pretty picture will get a lousy coat of paint more than 2/3 of the time, so if the image can't handle the pink or red it will louse up your enjoyment plenty.

The coloring is a hardware feature i think. So it is fast. 1 image could give hundreds of colors variations.
It is likely that they used on the mono nebula, the same technique used on the mono ship diagrams, and fonts.
So the images are 8 bits. They must use the same color palette as the others. If it is truth, it is good to take that in consideration.
In the q3_editor there is a link to a 8 bit palette in shades of gray and a description on how to apply it. Worth a try. I dunno.
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #14 on: March 10, 2016, 02:45:59 pm »
EDIT: Changed my mind. New plan.
« Last Edit: March 11, 2016, 02:20:44 pm by Corbomite »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #15 on: March 10, 2016, 02:55:34 pm »
So where do the colors come from? The game just gives the white nebula a cheap paint job, pink or red, in the mission itself. This is why it is bad news for the campaign side of things. Any perfectly pretty picture will get a lousy coat of paint more than 2/3 of the time, so if the image can't handle the pink or red it will louse up your enjoyment plenty.

The coloring is a hardware feature i think. So it is fast. 1 image could give hundreds of colors variations.
It is likely that they used on the mono nebula, the same technique used on the mono ship diagrams, and fonts.
So the images are 8 bits. They must use the same color palette as the others. If it is truth, it is good to take that in consideration.
In the q3_editor there is a link to a 8 bit palette in shades of gray and a description on how to apply it. Worth a try. I dunno.

If we can find a way to make it always default to white we will have solved that issue.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #16 on: March 10, 2016, 04:30:32 pm »
EDIT: Changed my mind. New plan.
« Last Edit: March 11, 2016, 02:22:15 pm by Corbomite »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #17 on: March 12, 2016, 12:38:55 am »
Update:


Capt. Adam is making another basic nebula and we hope to have two versions of that for your pleasure. They will look pretty good in F1 view for those who like that style.

The "better" ones will do what they do in that view and you can judge if you can stand them. They all look good in all color formats the game throws at them. They will be released with the space backgrounds pack coming soon.

Here are what I hope are the final product from me:


Light Stellar Nursery1



Light Emissions Nebula1



Light Stellar Nursery2



Light Emissions Nebula2



Light Stellar Nursery3



Light Emissions Nebula3



Medium Stellar Nursery1



Medium Emissions Nebula1



Medium Stellar Nursery2



Medium Emissions Nebula2



Medium Stellar Nursery3



Medium Emissions Nebula3



Heavy Stellar Nursery1



Heavy Emissions Nebula1



Heavy Stellar Nursery2



Heavy Emissions Nebula2



Heavy Stellar Nursery3



Heavy Emissions Nebula3


Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Ion Storms Ahead Sir!
« Reply #18 on: March 13, 2016, 09:24:26 pm »
UPDATE: See two post below this one for the updated images of the new ion storms.
« Last Edit: March 14, 2016, 07:51:09 pm by Corbomite »

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Ion Storms Ahead Sir!
« Reply #19 on: March 13, 2016, 11:05:25 pm »
Isn't funny that five minutes after you finish something that you think of a better way of doing it?

Even better ion storms on the way if I can figure this out. I have one looking pretty good on a rough right now.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Ion Storms Ahead Sir!
« Reply #20 on: March 14, 2016, 07:49:55 pm »
I am constantly amazed at what this game can do more than a decade on. I wanted better ion storms. I thought I might just clean up the originals, you know, just to look a little more pleasing, but this...

(And they even look good in F1 view for once!)

Mild Ion Storm









Moderate Ion Storm









Severe Ion Storm









And once again for you TOS/Memory Alpha fans, as an added bonus I give you:


The Lights of Zetar


Mind Your Minds!





They've Stuffed Themselves Dining On Memory Alpha And Now They're Looking For Dessert!





Only Fallout Boy Can Save Me Now!





My Eyes! The Goggles Do Nothing!





I'm going to see if I can make this into an actual moving monster. My first mild ion storm gave me and idea for the Companion from Metamorphosis that might work too.
« Last Edit: March 14, 2016, 08:10:13 pm by Corbomite »

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #21 on: March 14, 2016, 07:52:35 pm »
Wow.. i'm very impressed Corbomite!
Looks very nice!
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #22 on: March 14, 2016, 08:14:24 pm »
Thanks!

By the way, I think it would be possible to make the explosion graphic better or at least smoother, but making the textures would be tough. I have to test what happens to the normal textures when touched.

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #23 on: March 20, 2016, 08:47:55 pm »
Thanks Adam and Corbo.  :rwoot:
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #24 on: March 20, 2016, 08:58:29 pm »
Thanks Adam and Corbo.  :rwoot:

Thank you! My mod would be a lot clunkier w/o your efforts.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #25 on: March 20, 2016, 09:37:26 pm »
Wow. Lights of Zetar. Cool. :ThumbsUp:

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #26 on: March 20, 2016, 10:05:27 pm »
And it makes a pretty nifty shield texture too.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #27 on: March 21, 2016, 10:38:00 am »
I don't have SFC3, so no. The game adds the colors in SFC2. Color in your image will affect the color and brightness of the final in game look.

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #28 on: March 21, 2016, 03:12:33 pm »
All these new images led me to try them in CE's nebula. Unfortunately, the damn AI attempts to capture/H&R in a nebula environment! The game hangs when this violation of transporter rules is encountered. It would be better if the game crashed so I could attempt to modify the faulty instruction. The missions might be the problem because they modify the mechanics of the game. Free-for-all and Random Space Battle can both hang when the nebula maps are chosen.

So if your game (2.670 or 2.677) freezes, don't blame Adam and Corbomite. EAW 2.036 and OP 2.562 should be fine.

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #29 on: March 21, 2016, 05:16:21 pm »
My pack is not designed for anything but OP. In EAW changing your files out will change not only the nebula, but shields and black holes and other unknown things as well. It's not recommended.

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #30 on: March 21, 2016, 05:38:39 pm »
Corbomite, watching your effort on the samples, today i had an idea on how to make the function i wrote a little more generic, and apply it to to shields and ion storms too.
It's good to have some variety.
So i will add it soon. :)
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #31 on: March 21, 2016, 05:51:21 pm »
Corbomite, watching your effort on the samples, today i had an idea on how to make the function i wrote a little more generic, and apply it to to shields and ion storms too.
It's good to have some variety.
So i will add it soon. :)

Random ion storms would be great. The shield effect should be left to the player. They do have to see it every mission.

What would be cool is to have different weapons do different things to the graphic, but that's probably impossible.


Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 788
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #32 on: March 21, 2016, 07:43:17 pm »
Have been testing some ideas too...
What you think of this space dust concept?

"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #33 on: March 21, 2016, 08:00:01 pm »
Have been testing some ideas too...
What you think of this space dust concept?

If you could have that scale to match the distance counter, that would be impressive. One hex equals 10,000 km. Just make sure you know what else calls up spacedustlight  ;)

Offline TarMinyatur

  • Lt.
  • *
  • Posts: 938
  • Gender: Male
Re: Why, Yes You Can Make The In Mission Nebulas Look Better...
« Reply #34 on: March 21, 2016, 08:39:18 pm »
My pack is not designed for anything but OP. In EAW changing your files out will change not only the nebula, but shields and black holes and other unknown things as well. It's not recommended.
Understood. That's ok. But the bug I'm talking about occurs in unmodified 2.670, it has nothing to do with enhanced textures. I'm going to try to disable the AI command "style" that is called capture. The AI in CE is obsessed with capture, it even attempts to board fighters.