UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Submit Patch #4630 Improved 3D Geoscape Rendering
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Submit Patch
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/patches/503 Item 503] imported from sourceforge.net tracker on 2013-01-28 20:43:43

http://ufoai.ninex.info/forum/index.php?topic=4561.msg35301#msg35301

Now the city lights only show up where it's actually nighttime, and are prettier to boot. Also, I've implemented bump-mapping and specularity-mapping and texture-blending as well. This means that the 3D geoscape now has topographic rendering with lightsource-dependent shadows, and sunlight reflects off the water. It also means that the visuals now correctly represent seasonal changes with smooth, seamless changes over the course of the year.

These new rendering features are all handled by a GSLS shader program, but the older rendering methods all still work the way they always did (ie. there's no change to the way that nation overlays and the like appear). There is also a new option in the "options->game" menu that lets you switch between the new globe renderer and the old one (though you need to restart the program after switching the option before it will take effect).

This is particularly important because the new version has higher requirements than the old one. If your graphics card doesn't have the features required, it will automatically fall back on the old rendering system, but I think that any reasonably modern graphics card should work (if anyone has issues, please let me know). It also requires more system memory, especially if you use the high-res textures.

Speaking of textures, I've been using higher resolution images for the globe surface, which look much crisper and prettier when you zoom all the way in. The disadvantage is that they are, well, bigger. This means that they take longer to load into memory, and they take up more memory once loaded. It takes several extra seconds on my system to bring up the geoscape, with an additional ~3 second pause near the beginning of a new month while it loads the texture for that month.

That said, I can't upload the high res images here because they're ~25Mb a piece, and there are 12 of them. I have therefore uploaded lower resolution versions so people can actually see the system working, but I really think the high-res versions are prettier; I just don't know what the best way to distribute them is.

The current season system consists of one texture image per month; the images I'm using come from NASA's Blue Marble project (as did the images I started with when making the bump map, city lights, and gloss textures, though those required some modification). The system blends two textures, one associated with the beginning of the month, and the other associated with the end of the month (ie. the beginning of the following month). The two textures are combined according to how far through the month it is, so things change slowly and smoothly. If you want to see it in action, I recommend modifying the campaign.ufo to set the "minimum happiness" to something negative; otherwise, you'll generally loose after just a few months if you don't do anything but watch the globe spin, and you really need to speed things up to the fastest speed and watch for a few months to get the full effect Smiley

I've attached a diff relative to the current svn, along with a zipfile that contains the new images needed (extremely low-res versions only, I'm afraid, since the forum only accepts up to 1Mb of attachments; if someone wants to give me svn access so I can upload the high-res versions, my sourceforge username is "arisian"...Wink).

Please let me know what you think, or any issues you might have, especially if you experience anything that looks "wrong;" I've only been able to test this on my own system. It looks very pretty for me, but I'm not 100% confident that it will look the same on other brands of graphics cards (my current one is an nvidia geforce 9800gt).
===== Comments Ported from Sourceforge =====

====== tlh2000 (2010-03-23 17:11:23) ======


====== tlh2000 (2010-03-23 17:14:03) ======


====== tlh2000 (2010-03-23 17:14:19) ======


====== tlh2000 (2010-03-23 17:14:49) ======


====== tlh2000 (2010-03-23 17:15:04) ======


====== tlh2000 (2010-03-23 17:15:20) ======


====== tlh2000 (2010-03-23 17:15:54) ======

Updated patch with compile fixes
====== tlh2000 (2010-03-23 17:32:39) ======

r29104, r29105 and r29106 added parts of this to the svn already
====== tlh2000 (2010-03-23 17:34:57) ======

you should have a look at the R_UseProgram function
====== tlh2000 (2010-03-23 18:24:30) ======

updated version
====== tlh2000 (2010-03-23 19:35:16) ======

untested conversion to existing functions
====== tlh2000 (2010-03-24 07:05:31) ======

applied to trunk
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif