aliens

Author Topic: Globe improvements  (Read 68217 times)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Globe improvements
« Reply #15 on: October 09, 2011, 05:08:58 pm »
My patch? do you mean this patch of near-pole lighting correction or what?

Jumping of trajectory near pole is a side-effect of having trajectory granularity of 111km "jumps".
He means path. :P

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #16 on: October 09, 2011, 05:29:24 pm »
yes :D 1 `t` made no difference :D

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #17 on: November 27, 2011, 05:14:36 pm »
I should start spamming here, not in `Android port` (its because my code cant be ported to Java :D ) and this topic is about improving globe :D
I made progress on my globe shadowing. its still `work in progress` but on full zoom out work in 100% without any glitches.
I can use it to shading lands too, this could fix some bugs from current version.

this method have some drawback. I loose around 20 fps form 140 and increase memory usage (but this is `static` memory, allocate only once).

[ps]
my github fork is updated, if someone want see my ugly code, can do it now :)
I need some refactoring to merge it with current OpenXcom.

« Last Edit: November 27, 2011, 06:05:08 pm by Yankes »

Volutar

  • Guest
Re: Globe improvements
« Reply #18 on: November 28, 2011, 05:26:48 am »
Yankes, looks very nice.
I suggest you to post globe in lesser resolution (640x400 is enough). And post some "whole-earth" shaded shots (with land shaded same way as ocean).

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Globe improvements
« Reply #19 on: November 28, 2011, 09:51:10 am »
Looking good. Can't wait to see it in the official builds.

Keep it up!

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Globe improvements
« Reply #20 on: November 28, 2011, 02:13:26 pm »
Sure is looking pretty, hopefully the code won't ruin the illusion. ;)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #21 on: November 29, 2011, 12:06:34 am »
ok I finished it :)
now work with every zoom level and shading lands too.
when i get some free time I will move my code to current  version of xcom.

[ps]
btw is possible to made this shadow to behave as real one (aka polars days and nights)
« Last Edit: November 29, 2011, 12:15:07 am by Yankes »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #22 on: November 29, 2011, 02:14:33 am »
new complicity useless feature! we can have polar night! :D
btw who want fix now Battlescape? because now it can have wrong brightness on battlefield :)

[ps]
I indeed buged battlescape :D now it crash in my build :D
« Last Edit: November 29, 2011, 02:26:34 am by Yankes »

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Globe improvements
« Reply #23 on: November 29, 2011, 09:23:34 am »
new complicity useless feature! we can have polar night! :D

Useless indeed, but I won't mind having it in an "openxcom custom settings" page somewhere. Good job.

Does it behave like the real deal? Meaning that at the poles it's slowly drifting between night and day over the course of six months?

Offline hsbckb

  • Colonel
  • ****
  • Posts: 275
  • Gill Man
    • View Profile
Re: Globe improvements
« Reply #24 on: November 29, 2011, 10:25:31 am »
new complicity useless feature! we can have polar night! :D

I don't think so. :) Your job is really great! 

Volutar

  • Guest
Re: Globe improvements
« Reply #25 on: November 29, 2011, 02:52:06 pm »
Yankes, very nice. Polar nights is realistic, and could be a gameplay feature, but actually will look ugly when globe is rotating.
About time-fixing for battlescape... Yankes, can you shrink or enlarge terminator semishaded area width? Or it's hardcoded?

PS. Btw, if you have per-pixel calculations, you may use something like dithering, to make shading smoother.
« Last Edit: November 29, 2011, 03:09:24 pm by Volutar »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #26 on: November 29, 2011, 03:33:05 pm »
Useless indeed, but I won't mind having it in an "openxcom custom settings" page somewhere. Good job.

Does it behave like the real deal? Meaning that at the poles it's slowly drifting between night and day over the course of six months?
yes, if you switch to 1day speed you will see moving shadow :)

Yankes, very nice. Polar nights is realistic, and could be a gameplay feature, but actually will look ugly when globe is rotating.
About time-fixing for battlescape... Yankes, can you shrink or enlarge terminator semishaded area width? Or it's hardcoded?

PS. Btw, if you have per-pixel calculations, you may use something like dithering, to make shading smoother.
yes I can easy change size of transition without any problems, its one number per zoom level, it can be easy any number.

smoother? I think better is made palette smoother, I made 32 strips of different shadow values, but I get strips anyway.

Volutar

  • Guest
Re: Globe improvements
« Reply #27 on: November 29, 2011, 09:16:02 pm »
smoother? I think better is made palette smoother, I made 32 strips of different shadow values, but I get strips anyway.
Oh, if you draw them by strips, it doesn't matter.. Only per-pixel manipulation allow "dithering" technique.
Battlescape light intensivity can easily be taken from terminator position. Though you can keep old one.
BTW at north and south poles there always be dim light :) (Because XCOM Earth doesn't have inclanation angle).

P.S.: Pole "hard" terminator line bug will be vanished with this shading used for whole globe...

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Globe improvements
« Reply #28 on: November 29, 2011, 10:46:28 pm »
new complicity useless feature! we can have polar night! :D
btw who want fix now Battlescape? because now it can have wrong brightness on battlefield :)

[ps]
I indeed buged battlescape :D now it crash in my build :D
Battlescape gets the light shade from the polygon the mission is on through Globe::getShade, if your shading is no longer polygon-based you probably have to rewrite the code to get the light shade off a specific lon/lat position.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Globe improvements
« Reply #29 on: November 30, 2011, 01:12:53 pm »
Oh, if you draw them by strips, it doesn't matter.. Only per-pixel manipulation allow "dithering" technique.
Battlescape light intensivity can easily be taken from terminator position. Though you can keep old one.
BTW at north and south poles there always be dim light :) (Because XCOM Earth doesn't have inclanation angle).

P.S.: Pole "hard" terminator line bug will be vanished with this shading used for whole globe...
I probably didnt say this clearly. I get this stripes from per-pixel manipulation. I dont draw them directly.

I tried add some sort of dithering by some random values but effects wasnt  good enough. My system have one limitation, I cant get any information about pixels around  current one. I have some ideas how to get effect similar to dithering but now I dont have time to implements it.