July 17, 2019, 08:32:09 PM

Author Topic: Strata Nova  (Read 2462 times)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #75 on: April 26, 2019, 08:35:19 AM »
THIS. LOOKS. GREAT.

Ok, minor things:
sun "pulsates" too fast in my opinion. If you wrote some interpolation stuff then the scale could be done "non linear" - eg use "bounce" or "quad" or so ... just to make it more interesting.

Why slower? if it is too fast then it attracts too much attention of the viewer.


Next the texture of the planets is not "smooth" (filtered) this way the rotation looks more pixelated then it should. Dunno if you can improve that.



Side note for interested tinker-boys: if you added a second layer to some planets containing only some clouds you could move them at a custom speed (slow) to make it even look cooler and more "lively".

Depending on performance issues I would set them up as "optional" (you can disable it).


@ rings
I mentioned planet rings already. Will look cool too. Hope it all in all does not become "too much" on screen then.


bye
Ron

Offline 3DzForMe

  • Hero Member
  • *****
  • Posts: 588
Re: Strata Nova
« Reply #76 on: April 26, 2019, 08:43:21 AM »
Quote
.   Side note for interested tinker-boys: if you added a second layer to some planets containing only some clouds you could move them at a custom speed (slow) to make it even look cooler and more "lively".   

This does sound like a great effect. I really like where this is going  ;)

I
Quote
. Here it is in motion with me changing the visuals as it plays:   

Oh yes, verrry impressive! 8)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1152
Re: Strata Nova
« Reply #77 on: April 26, 2019, 11:50:07 AM »
all above sorted:


includes better pulsing of sun, additional clouds and rings. added in orbit lines and it is starting to make sense again :)

Quote
Depending on performance issues
virtually no performance hit for all the visual trickery - it's all on the GPU

and remember... NO 3d!!
Here showing orbit lines and selected planet:

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #78 on: April 26, 2019, 01:38:02 PM »
Looks pleasing to the eyes.

With your 2D aproach the only way for anti-aliased outlines of the planets is to render them at 2x the size on a new texture (render to texture) and then to scale them down to 0.5, 0.5 so it utilized the texture filtering through the GPU.
Or there is an even simpler solution with shaders - I am not experienced in this regards.

bye
Ron

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1837
Re: Strata Nova
« Reply #79 on: April 26, 2019, 02:37:35 PM »
Quote
With your 2D aproach the only way for anti-aliased outlines of the planets is to render them at 2x the size on a new texture (render to texture) and then to scale them down to 0.5, 0.5 so it utilized the texture filtering through the GPU.

...or just soften the png edges a little in a Photoshop-type Program.   ;D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #80 on: April 26, 2019, 02:39:28 PM »
Which png edges?

IWasAdam is drawing the circles "live" (so maybe some kind of textured poly). The rotation is simulated by moving the texture over this poly.


bye
Ron

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1837
Re: Strata Nova
« Reply #81 on: April 26, 2019, 02:42:19 PM »
Ah ok, then a shader could be used to anti-alias.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1958
Re: Strata Nova
« Reply #82 on: April 26, 2019, 06:42:26 PM »
Looking good ;D Make sure you test your shader goodness on other hardware / OS's though :)

Quote
Or there is an even simpler solution with shaders - I am not experienced in this regards.
Just had a very quick look at a FXAA shader for openGL. Doesn't look too crazy but I'm not experienced with them either. I know there are other AA methods which produce better results but are more GPU / memory costly so I doubt you'd need to go crazy on the AA side for things beyond something light and simple.
Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #83 on: April 26, 2019, 07:27:44 PM »
Thanks for the link..but it seems as if fxaa is pretty costly.
There is no need for a full screen AA as the background image etc already look good.

It just needs the planets / overlays to be AA'd. Which is why I suggested to render each planet at 2x on an individual texture. Then render these textures at a scale of 50% ...it should then automatically be smoothed out.

If texts are already smooth (ttf and freetype) then you might render it afterwards to avoid "oversmoothing".

Utilizing render2texture can even speed up rendering for composite images with an animation speed lower than a pixel per frame.

Bye
Ron

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1958
Re: Strata Nova
« Reply #84 on: April 26, 2019, 08:13:14 PM »
Quote
Thanks for the link..but it seems as if fxaa is pretty costly.
No it's not costly. The clue's in the name "Fast approximate anti-aliasing". It can be applied to a texture and does not have to be full screen. It is also virtually cost free on a modest GPU
Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #85 on: April 26, 2019, 08:26:58 PM »
Was just judging on the framerates in your link.

If it works on textures than...this might be worth a try (if possible).


Bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1152
Re: Strata Nova
« Reply #86 on: April 27, 2019, 07:12:05 AM »
planet edges now have alpha blending:


I needed to tinker and play with the shader until it sorta seemed right

Offline Derron

  • Hero Member
  • *****
  • Posts: 2206
Re: Strata Nova
« Reply #87 on: April 27, 2019, 07:17:04 AM »
If you want - feel free to drop 2-3 sentences to describe how you eg. approached the anti-aliasing.

Think visually it is 'nough done for now (we will talk about the planet-HUD/info display once you settled for the information to display there). Back to the actual game development.


bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1152
Re: Strata Nova
« Reply #88 on: April 27, 2019, 07:31:21 AM »
ok, the alpha in the shader is not quite as simple as you'd think it was
you have the alpha. and the color must also be multiplied by the alpha to give the correct result

here is the code:
Code: [Select]
if (radius < innerline){
//inside the planet so alpha is 1
alpha = 1.0;
}else{
//edge of planet, modify the color and alpha
alpha = 1.0 - ((radius-innerline)*30.0);
col *= alpha;
}

so find the edge - move in a bit, and fade this 'bit'

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1152
Re: Strata Nova
« Reply #89 on: April 27, 2019, 08:35:55 AM »
Lighting corrected, shadow rotation errors sorted, alpha sorted, clouds and highlights corrected. Nailed it. I'm (on the visual side) done  8)