Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visualization of Earth's beauty - Dev Diary

Discussion in 'Works In Progress - Archive' started by McDev02, Feb 18, 2014.

  1. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    $LunisLogosmall.jpg


    On this thread I want to post my progress of a globe render framework I need for a game.

    I have been working on some aspects of it quite a while now and I think that it can't hurt to share some of the recent progress to get some feedback. The framework I want to achieve needs to hanle a full scale Planet from space to ground view. Unlike other engines of this kind I am not looking for a realistic visualization of any spot on Earth nor will I use real full scale data of 90m resolution or so. My purpose is more to get inspired by several things and create a new style in some way. Playing Civilization 5 actually gave me a good representation of how I imagine a bit of the final terrain.


    What needs to be achieved?

    • Atmospheric effect which is suitable for any camera position and lighting condition. Especially from space and ground.
    • Water simulation. Having several versions and behaviours like a stormy sea or a silent rippled surface.
    • Weather simulation. Let it rain, snow and flash.
    • Clouds which are viewable from ground, space, in front of and "from inside".
    • Terrain which has good detail from any view and which does not need to much data, especially for texturing.
    • Vegetation which is at least adding detail and does not use to much performance.

    Why whould someone want to do this?
    Looking outside the window at the morning or at moonshine lets me assume how or what artists like Frederic Edwin Church must have felt while painting pictures as such below. My painting skills would need decades to be trained to beeing able to visualize my ideas. So I eventually use my CG knowledge which might be faster and more people may have fun with later.

    $church_hudsonRiver.jpg


    I will post some of my thoughts and tests that I have done already for any of those topics. If you also have some ideas of how to achieve or improve a single feature, let me know, this is why I start posting here.

    Height Data

    I am going to use 1.000m and 500m (or even 250m) resolution of srtm data and sample them into a custom set of data points. Those points are distributed in an geodesic icasohedron way to achieve an efficient data source. Some of the data I know actually have a waste of space while they store ocean in height which always is zero and have like 1.000 Data points at each pole because they sample in degrees.

    $DotDistribution.jpg

    There would be some other solutions like a cubic mapping of data which would result in a similar equal distribution. But I also need a grid for some aspects of the game and the icasohedron structure provides nearly a hexagonal grid. Therefore it makes sence to keep both in the same structure.


    I may leave some of the latest media here and describe them later in the posts.



    $BreakingWave.jpg

    $spec.jpg
     
    Last edited: Feb 18, 2014
    JamesArndt likes this.
  2. GeneBox

    GeneBox

    Joined:
    Nov 15, 2012
    Posts:
    480
    This is pretty good! Can't wait to see more!
     
  3. chrisx84

    chrisx84

    Joined:
    Nov 9, 2011
    Posts:
    85
    that water looks awesome. Kinda looks like Second Life water but works alot better then SL water.
     
  4. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    It is time for some description. Basically I am jsut writing down what I did recently so do not expect a tutorial or something like that. There might be time later if things are final and have been optimized. I am mostly interested in how you rate the results and techniques used here. But also feel free to ask additional things.

    Yesterday I have been working on the water again and I wanted to test a technique to have floating rivers.
    There would be some work to be done on a generator script which actually creates the river mesh propperly but I quickly did it by hand.
    But the importance was on prototyping the effect. And it seems to work quite well:

    $riverflow.jpg


    But how do my waves work? Generally I use a falloff texture which does describe the direction the waves should follow. On this image there is an example for the island on the top left. On the graph below you can imagine how the waves are then created. I just multiply the falloff by a value which describes the frequency of the waves and add some _Time to it. That's it basically.
    Then I did some further adjustments like a noise texture which distorts the wave time and distribution a bit. Also as vissible on the graph the waves start to collapse the nearer they come to the shore. Also I start to offset the verticies along the forward direction at the tops to generate the collapsing effect.

    $waveExample.jpg

    The falloff on the rivers is just uv.y which is mapped according to the flow. Anything I am doing here is for my own system and anything is based on precalculated data. So the falloff texture will be created by a tool and in fact it will be possible to edit the waves on any spot on the ocean as well on the shore. The adjustments might be type of waves, frequency, turbulences, speed and of course the amplitude. I am looking forward to test a tsunami just for fun :)

    There is still a lot to do to make it look appealing. I am moving forward to mimic the Unity water shader by adding reflections, refraction and trying to add some propper foam. But I still have one thing to solve. Because this water needs the depth map of the objects below to produce the deepness effect it does not write to depth. This is not a problem on tiny waves but if they are as big as here sorting issues will occur. I may add something to this later but I also have an idea I want to test before. But in worst case this would mean a twofold effort on rendering.

    $compositionWaves.jpg

    $water2.jpg


    I will let the water rest for a while. Anything I am doing is rought prototyping to come up with some playable but fundamental results quickly.
    I always was fascinated by the hills which get lost in the atmospheric fog and I wondered how to visualize this efficiently without drawing lots of sprites of trees.
    The idea I had is pretty cheated, but what is not? Because I already did some other test about trees I may cover that in the next post.
    What to you think? This technique would only be used for the very far away mountains and eventually would be combined with additional fakes and "real" sprite-trees in th middle and maybe 3D Trees in front.

    $TreeFake.jpg


    Please do not "Reply with Qoute" ;)
     
    Last edited: Nov 30, 2016
    JamesArndt likes this.
  5. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    Just updating some water.

    $wave2.jpg

    $wavesFoam.jpg
     
    JamesArndt likes this.
  6. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    This stuff is really great, and some of the remaining things i'm looking for regarding water, i'd pay for the priviledge of seeing how you're getting where you're going regarding the water to be honest! I'd likely be using it in conjunction with other material. Keep up the good work and definitely consider a product that covers your work in waves and shore effects, although hoping it wouldnt cost an arm and a leg
     
  7. Parallel_

    Parallel_

    Joined:
    Dec 9, 2012
    Posts:
    90
    Interesting, looking forward to seeing those waves crash.
     
  8. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    Well, that's the problem :) It sounds like a liquid simulation which that one above is definietly not. The major purpose is to make the shores more interesting. But well, we will see how it develops.

    If I got you right you want to see a package with that features, that is not the case currently. I am using this techniques for a game in first stage. For me it would take a lot of generelization and optimization to provide such a package. Currently I suit it to my needs to make it quick to develop.
    But sharing individual features is something that is more likely to be possible.
     
  9. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I'm more or less stuck over adapting one method of animating water to other behaviours much because i'm a little ignorant of how to, say, check by a texture and alter the vertex shader appropriately, to the point of shores looking like decent shores, not necessarily crashing waves, just the water behaving like the shores exist, and changing naturally. Much the same goes for rivers, theres plenty of information on river animation regarding textures, but not so much the geometry. Might not bit a big deal to you but i find that kind of knowledge exactly what i need these days! Still, it looks very good what you're aiming for and i'll be following it
     
  10. Parallel_

    Parallel_

    Joined:
    Dec 9, 2012
    Posts:
    90
    Yea ideally, but perhaps it's not needed. I've always wanted to see some nice crashing cgi surf, it's just so unsatisfactory that the waves never topple over ;). Maybe see how 'Surfs up' did it, for ideas : http://library.imageworks.com/pdfs/...-Up-the-making-of-an-animated-documentary.pdf
     
  11. piluve

    piluve

    Joined:
    Mar 17, 2012
    Posts:
    158
    :eek:
    Amazing.
     
  12. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    OK I thought you mean something like crashing against a cliff or something. The collapsing waves is something that I have in mind and I found kind of a bug which looks like that. At least I am looking for small waves that collapse before reaching the shore.

    And thanks for all the comments so far.
     
  13. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    Wouldn't that be a cool feature to achieve?

    Have a look at the waves crashing against the rocks, that is what I was talking about which can be tricky. But I belive there are some ways to do that.
    But not that it is on my list now, just wanted to share it :)

     
    JamesArndt likes this.
  14. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    the ocean waves!...that is just beautiful. The sunset sky also look amazing.
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    hmm this hasn't been updated in years and it just looks awesome. anyone made progress on it?
    this was in 2014 and in 2018 i haven't seen anything this good that doesn't require a million particle emissions