YASP (Yet Another Shady Planet) ;-)

Thinking about improving the Artwork in Vega Strike, or making your own Mod? Submit your question and ideas in this forum.

Moderator: pyramid

klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

@Zeog, Reddish look: Yep, as I said... my monitor's fault - I thought it was ok, but my monitor shows weird colors. I recalibrated it using a better monitor and it's now OK, but I didn't take any more screenshots nor posted them anywhere. I'll soon translate the shader to Cg and make it part of the System Explorer :D

@hellcat: Pretty much what I did... I precomputed the integrals and placed them in a texture 8) not that they were that hard to compute, though - only a couple cos/acos/sin/asin. I'll only use multipass to fix the horizon while looking at shallow angles, up close - it doesn't blend with the background as it should, it just looks like a solid sphere (I still didn't get to it... once I got a nice look, motivation just vanished ;) ). Anyway... it's not a complex multipass, it's just an odd-blended pass (ONE INVSRCALPHA)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

why does that need another pass? can't the fragment program do such a blend when it's being drawn in the first place? or is the geometry different
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

hellcatv wrote:why does that need another pass? can't the fragment program do such a blend when it's being drawn in the first place? or is the geometry different
That - it has to be a bigger sphere.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Klauss, you might want to consider a billboard centered on the planet and a big hole in the center. Hold on; I'll make ya one...
http://www.deeplayer.com/dan_w/tmp/atmoring.zip
Image
Gave it a slant to help with the lighting; so instead of two passes for a whole bunch of pixels, you can do one pass for the planet up to the horizon; and you could say the ring is a "second pass" but it's got a lot less pixels and lends itself better to an exponentially thinning halo.
Last edited by chuck_starchaser on Tue Jan 24, 2006 3:04 pm, edited 1 time in total.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Thanks, but it would be cumbersome not to use a sphere.
Mostly because the shader deduces where the ray is hitting by computing the angle of incidence - without a sphere, the angle won't be as meaningful.

Besides... I wasn't going to waste the other pixels - I was going to use the oportunity to render the clouds.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Was editing as you posted..
Anyways, up to you, but I'd say the angle is already there in the planet's sphere. The clouds I was able to do in the same one pass, but I'm not sure if you can with the 9800.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

And, there's an advantage to doing the clouds onto the same sphere as the ground, I thought I'd mention: You can then do the clouds' shadows too. What you'd need to do is compute a per-vertex texture offset, in the vertex shader, so that the clouds and their shadows look right.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Actually, I'm going to do the shadows in the first pass alone - shadows, without clouds - to achieve a somewhat more realistic lighting. That was the plan, at least: I'd modulate light color by shadowing factors, computed by a simple ray cast from the light to the ground - knowing the cloud's height, computing the intersection should be straight-forward. IIRC: a simple dot product, product by scalar, addition, blah...

So... yes, I was going to do the shadows, but in the first pass.

The second pass would add some atmospheric scattering, plus the clouds, which would (I think) create very realistic lighting. The only problem whose solution I've been procrastinating is making the actual clouds seem at a lower altitude than the true geometry - but it should be possible and not very hard, I just didn't get to think about it.

I've been stalling on those issues since I started doing some HDR work, aside from actual engine coding (not only art is part of the framework, I keep reminding myself ;) ).

Hey... that reminds me: I'll start a thread to link HDR stuff - it looks pretty 8)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

klauss wrote:The only problem whose solution I've been procrastinating is making the actual clouds seem at a lower altitude than the true geometry
Even if you had to do it in two passes; I don't get what's the need for a second sphere. You could use GL's offset feature, if it is to ensure it draws on top of the ground and not under it.
I've been stalling on those issues since I started doing some HDR work,
I'm always willing to help with shaders; only problems are
a) my card is a 6800GT, so I might come up with something that doesn't jive with yours, but this is a minor problem
b) I believe you're working with CG? My only experience is with GLSL, but this is a minor problem
c) I'm not set up for work with your Ogre WIP; not sure how big a problem this is
d) I'm not sure what to do at the seam, where the texture wraps around, for interpolated texture offsets to come out right. This is my problem
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

To get this kind of perspective correctness.

Granted, those aren't clouds... but clouds would look similar at very shallow angles (and very close to the surface), and also it would be great to be able to, with the same shader but using special lighting - controlled by some parameters - be able to do something similar to the aurora. I imagine gas giants would be quite active in this regard, so it would be great if you could notice this kind of thing when you get close.

EDIT: Oh... don't worry about using GLSL... I can translate to and from it, and it does work with the Ogre WIP - only when using the OpenGL renderer, of course. And feel free to ask whatever you need to get the Ogre WIP working.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

I see what you mean. I wonder if the planet could be offset inwards on the fly... That would really do the trick...
For auroras like that you'd need a 3D texture :-0 Closest thing would be the O-ring thing, actually, for auroas at the horizon.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Ok - new stuff, with chuck's help.

I wasn't going to post until it's truly finished, but lately I've gotten really busy with RL and I'm not sure when it'll get finished. So... I thought I'd let the WIP go public for the time being.

So... oblivion... what was that about not posting WIPs? I guess noone follows that bit of advice, huh? Even I that adhered to it am now posting WIPs.

BTW: 1-4 is one batch, 5-8 is another (different - with different textures), and 9 is a recent WIP with new techniques.
Colors may need tweaking under the new textures which seem a bit preprocessed already (taken from the celestia motherlode).

Hm... I have to brighten the clouds... the usual 0..1 range doesn't seem to be enough.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Paslowo
Mercenary
Mercenary
Posts: 121
Joined: Mon Dec 05, 2005 10:01 am
Contact:

Post by Paslowo »

If this is the actual in-game screenshot, that can be extremely awsome.
Zeog
ISO Party Member
ISO Party Member
Posts: 453
Joined: Fri Jun 03, 2005 10:30 am
Location: Europe

Post by Zeog »

That is beautiful, klauss! Really!

The cloud shadows are cool or is that bump mapping? Anyway, it looks like the clouds are too thick or flying too high. But you and chuck certainly noticed this already.

Two thumbs up for working on this AND keeping the masses entertained! :D
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Thanks :D

Yep, clouds are that high since I can't get shallow enough angles to appreciate the shadows easily with the previewer. They should be about quarter-tenth height, roughly, for what I've seen in actual satellite pictures.

And it's not in-game, just in-engine (the explorer).
I have yet to polish the shaders, punch in the fallbacks, and a lot of final touches (besides tweaking and optimizing) before I commit, though. And I don't really have the time for that right now :(

PS: Actually, the shots themselves are from RenderMonkey. But the thing is in the explorer already and looks pretty much the same.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
hurleybird
Elite
Elite
Posts: 1671
Joined: Fri Jan 03, 2003 12:46 am
Location: Earth, Sol system.
Contact:

Post by hurleybird »

Wow... just wow. Love the clouds klauss! I did notice some polar distortion in the secound picture though.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Ah, yes... polar caps. They're a bitch.
I imageine I'l either add a huge cloud to the polar caps, or remove it, but something uniform is the only option to make the distortion unnoticeable. It's the maps... not the shaders... I hope.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Oblivion
Artisan Extraordinaire
Artisan Extraordinaire
Posts: 1269
Joined: Tue Mar 21, 2006 10:55 am
Location: Philippines

Post by Oblivion »

THIS is what they would actually look like INGAME?? :shock:
SUPERCALLIFRAGILISTICEXPIALIDOCIOUS!
So... oblivion... what was that about not posting WIPs? I guess noone follows that bit of advice, huh? Even I that adhered to it am now posting WIPs.
:wink: I never said that. I just reacted to another post. (I'm not sure if it was Chuck or was it you? :lol: ) Hehe, I'm posting several WIP stations later too. :P

Anyway, the planet rocks, but it's still only Earth. How about the others? :wink:
A Step Into Oblivion

Dreams of things that will never be,
Songs of thoughts only I can hear,
Leave me be to sleep forever,
To dream my dreams,
And sing my hymns,
Of things that will never be...
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Oblivion wrote:THIS is what they would actually look like INGAME??
Yes.
Perhaps I mentioned already... at 60FPS - GF6600 / 128MB.
Anyway, the planet rocks, but it's still only Earth. How about the others? :wink:
Next, when I have some time, I'll be having fun with gas giants. Probably Jupiter - or Saturn. Depends on whether I try my hand at ring shadows from the start or not ;)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Halleck
Elite
Elite
Posts: 1832
Joined: Sat Jan 15, 2005 10:21 pm
Location: State of Denial
Contact:

Post by Halleck »

Are you using an icosphere?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

No... I'm that lazy.
I'm not sure changing to icosphere is as easy as changing the geometry, you know... the shaders assume a spherical shape in several places, and although an icosphere is still a sphere, I'm not entirely certain it will behave equivalently. I sure hope so, but I don't want to face that problem (if there is one) right now :roll:

Anyway... it won't help that much (an icosphere, with polar distortion). It's a topological pitfall on the spherical UV coordinates, not the geometry or vertex layout.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Halleck
Elite
Elite
Posts: 1832
Joined: Sat Jan 15, 2005 10:21 pm
Location: State of Denial
Contact:

Post by Halleck »

That's what I was afraid of.
Post Reply