project-navigation
Personal tools

Author Topic: Improved 3D Geoscape Rendering [was: Nightime city lights in 3D geoscape]  (Read 82477 times)

Offline freegamer

  • Rookie
  • ***
  • Posts: 52
    • View Profile
we won't add the high res textures due to the reason muton rised above. we can offer another download of a pk3 file. and we will not remove the support for old cards
I think this might be an untenable position if you want the game to really look good in today's (or tomorrow's) gaming world.

You might want to consider distributing UFO:AI with a low-res and hi-res data pack option.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
I've replaced the geoscape textures with better ones. The night geoscape is still broken though. Can somebody please fix that?

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Thanx a lot, BTAxis !
Can somebody please fix that?
& thanx a lot for that one  ;), because I  :P :-[ :-X

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Hey guys, sorry I haven't been around for a bit.  I am still working on this stuff, but I'm continuing to add new features and improve the way things are implemented, so it doesn't really make sense to put lots of temporary stuff into the SVN, which is why I haven't been posting patches.

The issue with the nighttime illumination is caused by the fact that JPGs can't handle transparency.  We'll need to use .PNGs or .TIFFs or something instead.  I'm still working on trying to make textures which are relatively small on disk but also look pretty; I've thought of several things I could potentially do to improve the texture file size, but haven't had time to implement them yet.

Also, don't worry about the nation borders; the way I did it before was the quick and dirty version (which was fast to implement).  Right now I'm working on adding proper real-time glow/bloom effects, which should negate the need for having a separate "glow" texture for the nation overlay.

Finally, in terms of this game running on different systems, I'm making an effort to implement everything in such a way that all the new features are "optional," and can be disabled on systems with lower specs.  None of the old rendering code is going anywhere, and new rendering code will have menu options to disable, as well as being automatically disabled on graphics cards which don't support the required features.  This way, we should be able to get the game to look pretty on new systems without changing the "minimum" system requirements.

In terms of texture size, there are essentially two completely distinct issues, and I'm still not sure how important each one is.  First, there's the size of the image files on disk.  This is important to how long it will take people to download UFO:AI, and how much hard drive space it will take up.  Frankly, I don't think an extra 30Mb of disk space will make that big a difference for any system that's modern enough to run the game at all.

The second issue is how much memory the textures take up at runtime; this is both an issue of system memory (RAM), and of dedicated graphics card memory.  Here, the size of the textures *will* make a difference in terms of framerate on systems with different levels of graphics hardware.  If this is the real concern, however, it should be relatively straightforward to allow the user to select what size textures they want to use, again allowing the game to be played on both high-end and low-end systems.  This would still require us to have the high-res textures in the distributable, however.

Finally, as to bump-maps for ocean floors, they're easy enough to remove if people don't like them; once I'm done improving the rendering code I'll look at working on the textures.  Do other people have thoughts about whether oceans should have topographic depth or not?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Finally, as to bump-maps for ocean floors, they're easy enough to remove if people don't like them; once I'm done improving the rendering code I'll look at working on the textures.  Do other people have thoughts about whether oceans should have topographic depth or not?

imo it should not - but as it's very easy to get removed .. no prio until the rest is finished imo.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Hey arisian,
nice to see you're still workin' on that one  :)
Forget the jpgs, throw them out, use pngs instead, afaik we do not have support for TIFF (yet).
Great to see that you will implement additional graphic options !
Regarding the texture-size I will  :-X.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Thing with PNG is that it's a good deal bigger on disk than JPG for images like these. I used a PNG for the replacement night lights however, since it's actually smaller than JPG because it only contains black and white.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Sorry BTAxis, I just started to  >:( those jpgs because I am actually cleaning the ufo_tex jpgs from their ugly artifacts & really think we should convert all of the jpgs to pngs, because this format has a better design (lossless).
Somebody also mentioned to use tiff as it reduces the filesize further without reducing the quality, but I do not know how hard it would be to implement support for this. I learned that tga is more or less a simple version of png with a lesser rate of compression, so the lossless designs are (from big filesize to small):

tga->png->tiff

 ::)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
tiff is not and maybe won't ever be supported - but png is - and i've already done tests converting the tgas to pngs to reduce the size of the svn. for the jpegs, a simple convert won't work of course (due to the artifacts)

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Just a couple screenshots of the "glow" effect for the sun I'm working on; the first one is just real-time bloom, the second is real-time bloom combined with a static texture for the "rays of light."  It still needs some work; the current implementation is inefficient (my 9800gt is only getting 30FPS), and also screws up the cursor image (for reasons I have not yet been able to figure out), but at least now you have some pretty pictures to look at while you wait :)

Also, as to image formats, I personally am a big fan of lossless compression; I think Mattn calculated that we could save something like 100Mb by converting the .TGA images to .PPM, so my personal preference would be to use half of that savings to include decent looking globe textures.  Though I might be a bit biased, given that I made them ;)

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
about "old cards and new features", nations border and daytime is not new, and need to be worked at all cards, don't forget.
and one more, could you look to the XVI overlay?

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Nation borders and day/night work the same way as they always did if you disable the new features.  I haven't even looked at the XVI overlay, though I don't think any of the changes I've made should have affected it.  Did you have specific thoughts about changes you'd like to see in the XVI overlay?

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Well, now XVI is not looks as beauty as it can, and I believe in your talents :-)
May be some neon-green light? Or even slight animation, if it possible? I can provide save with activated XVI if you need in it.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Screenshots look good!

Offline freegamer

  • Rookie
  • ***
  • Posts: 52
    • View Profile
Finally, as to bump-maps for ocean floors, they're easy enough to remove if people don't like them; once I'm done improving the rendering code I'll look at working on the textures.  Do other people have thoughts about whether oceans should have topographic depth or not?
The thing is, water is not totally translucent.  There's a reason you don't see any hue variation - other than in shallow waters - in images of the globe (1024x1024 image, source).  So it looks odd to have the topgraphic depth represented by bump maps.

Light mainly travels to ~100m in the ocean.  From there to ~1000m it is very dim, and from there downwards it is no light at all (reference).

There are two questions:
1. does the depth of the ocean affect UFO:AI gameplay?
2. if it does - is there a better way to represent it?