State of Fortune

Can we see a video? :smiley:

Sure, it says more than the photos :slight_smile:

bpm4IEvFUho

The sky is getting better (can actually look up now :slight_smile: ), still need to improve the clouds and add some gradients though.

Mike

Looking GREAT so far! As far as the sun and clouds go, one trick I learned is to render it with additive blending. Like this in C++:
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
(Then back to your normal blending op)
Blend the clouds before the scene of course, but then try rendering(blending) the sun AFTER everything else. Iā€™m assuming you know how to determine if the sun is really behind something ā€“ you can shrink the sun image as it becomes blocked.
Java should be pretty much the same. Just enable and blend away, results are amazing. I use a single picture for the sun in this video I did: http://www.youtube.com/watch?v=-4n4Nz1xFKQ (file link because iā€™m not thread-jacking :p).

Daaamnnn thatā€™s gorgeous! :open_mouth:

That looks nice but as content gets added it will be a whole lot of tests every frame, especially when adding blended content and taking that in account. I think Iā€™ll have to settle for now with making the clouds more 3Dā€™ish and less sharp, as well as adding the gradients for over day and sun set/rise. If going back to the sun Iā€™d prefer to add a god ray shader :slight_smile:

Thank you Mr. King :slight_smile:

Mike

Would be awesome to see an applet or a download soon! This looks amazing.

As promised! It still lacks a few graphical things and there is no content what so ever. I just wanted to get an okay version out there as there seemed to be a demand :slight_smile:

Let me know if there are any issues. Iā€™m currently not checking if you have shader support before turning on water and so on, but maybe the console will output something :wink:

http://stateoffortune.com

Mike

Good stuff! Runs smoothly on my laptop.

This deserves so much of a better title than terrain somethingā€¦I mean at least capitalize the S. This is pretty cool though, Iā€™d say even better than Skyrim (graphics wise), with the water.

Nice, thanks for testing!

I changed the title to something lessā€¦ weird.

Runs awfully smooth!

Looks awsome however i found 2 things:
Gras looks really low quality from close.
Water looks odd (repetitive) from an distance (showing the tiles).

i see you have one big quad to draw the water all over, how did you manage to not make it glitch with the triangles from the terrain?
When an triangle intersects with the big water quad, my test was glitching like hell.

Food for thought: You might what to peek at atmospheric scatteringā€¦a cheap model can do a reasonable sky and the extinction + inscattering will make the terrain look much more realistic.

The up close I was planning to solve by adding ā€œrealā€ grass in your close vicinity. The other way is to use a better texture (already using one of 1024x1024) or pushing it together (makes it look very repetitive far away).

The dudv/normal map indeed looks very weird when far away, Iā€™ll look into what to do about that, maybe mip map it less to make it shimmer a bit.

The terrain is drawn using one call, not one for above and one for underneath the sea. The way to draw it like that and still use it for reflection/refraction is to use clipping.
I.e.
Set clipping to only draw where z<0 (under water)
Draw all terrain, all terrain above water will be clipped away
Set clipping to only draw where z>0 (above water)
Draw all terrain, all terrain under water will be clipped away

That sounds great, Iā€™ll look into what it is and if I can implement it :slight_smile:

EDIT: Right, thatā€™s what I meant with having gradients on the sky for sun rise and sun set. I didnā€™t know the fancy word :slight_smile:

Mike

Nice water shader!
It could be improved if you allow the specularity of the water to vary. Water gradually stops being a mirror when the angle increases. But then you might have to change the shader for rendering the terrain?

Thanks! :slight_smile:

There should indeed be some kind of sweet spot. If you currently look down you will see the bottom of the sea instead of the clouds. But there is nothing that stops the reflection when looking really far away (It should become increasingly blurry). I donā€™t think Iā€™ll spend too much time on the water though as it already looks better than the rest of the engine.

Mike

Nah, thatā€™s not what I meant. You could use a gradient for the sky and that would be pretty reasonable, but I think a physically based model would probably be around the same cost (assuming youā€™re doing a texture look-up for the gradient) and not give you the flexibly to change atmosphere conditions. But really I was think more about the terrain. Some unoptimized examples by bjgil2 here: http://www.java-gaming.org/topics/atmospheric-scattering/28366/view.html

That is a big lump of code :slight_smile: If you could do what you might and create a minimalistic version Iā€™d definitely have a stab at implementing it and see what the graphical nice-ness vs performance impact is.

Mike

Iā€™m intending toā€¦just lack of motivation & free-time are slowing me down. :slight_smile:

Youā€™re water shader is nice ! I love the blue light coming out from water at night (even if it may be not made on purpose).
A farming game would be sweeeet !! :stuck_out_tongue: