Terrain test Pictures

ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
So, It looks like Hugh has made the terrain test available to everyone. And since A few of us tester types have been playing around with it, and maybe, might have, definitely written the generators for some of the Steam app page of the terrain test. I thought it might be nice to share some screenshots and sort of maybe some code/mods in case you want to paly around with generated terrain etc.

http://tinyurl.com/sttguide

jZRxNflIiBfc.jpg

First off, Let me tell you this very important detail. Those .dlls I'm gonna link can do anything. So, really only run ones that you trust.

jcVZEYMXo21HU.png

Do you trust me? If not, I provided source code for them so you want to build your own. You need mono develop, and you need to reference 3 dlls in the Installed copy of the Terrain test tool: Assembly-CSharp.dll, Assembly-CSharp-firstpass.dll, and UnityEngine.dll. Once you have the compiled dlls, or if you trust me, they go in the mod folder of the terrain test tool install.

Get some mods and source code here: https://www.dropbox.com/s/0npnkbkk9ztbno5/Confused.zip

I think I scrubbed all the old mods. If the don't let you make a world with them they are broken. Let me know and I'll fix the dlls and source. Look for Not implemented exceptions if you want to fix it yourself.

jb0YViatUMvfYg.jpg

Now that that is out of the way, some screenshots, There should be waaay more of these but I foolishly have been overwriting them all, so these are the ones I found stumbling across things. The link above has a dozen or so mor incase you want more of them.

jKKpibT5cBMPq.jpg

jbigf0D7lJ5Ahu.png


Comments

  • AurOn2AurOn2 COOKIES! FREEDOM, AND BISCUITS! Australia Join Date: 2012-01-13 Member: 140224Members, Forum Moderators, NS2 Playtester, Forum staff
    looking puuuurdy good guys.
    Now to see how the water works out in proper.
  • Racer1Racer1 Join Date: 2002-11-22 Member: 9615Members
    edited February 2014
    I tried out the lava one on my gaming laptop (see spec below). It seemed to run reasonably well.
    Tested at 1440x900, 1680x1050, and 1920x1080 in "Good" mode on LavaExample

    While generating new areas, there was hitching once a second, even if I didn't move around much. Otherwise, it was relatively smooth. It seemed a bit choppy at high res.

    Is there a way to enable showing FPS or anything? I couldn't find any metric to report.

    Other comments:
    - Collision worked well. Are we going to be allowed generation of "squishy" surfaces?
    - Distance fade needs to be much more gradual.
    - You can REALLY get lost inside those caves. The game is going to have to provide a way for the player to find their way out, or it could quickly become annoying.
    - Suggest online site for players to post (source code for) there own terrain mods, to allow sharing.

    MSI GE60 - i7 3610QM (2.3-3.3GHz 6MB cache) - GeForceGT 650M
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    I am having fun so far :D Gonna need to have more fun with mathf

    DdbAPjp.jpg
  • SteveRockSteveRock Join Date: 2012-10-01 Member: 161215Members, NS2 Developer, Subnautica Developer
    Luitjens wrote: »
    I am having fun so far :D Gonna need to have more fun with mathf

    DdbAPjp.jpg

    Awesome :) Really nice caves there. Is that like two layers of perlin noise?
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    edited February 2014
    Yea, just working with the perlin noise(5 of them, I could combine them using a few statements down to 2 I think though...) One from top, 4 from bottom, I want to add some of those gpu gems from nivida and algorithm passses
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Awesome work you guys!

    (hey Josh!)
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
    Howdy doody!

    Tweaking with numbers, mostly exclusions--- come up with some impressive looking terrain
    KUQNPiN.jpg
  • BensonBenson Join Date: 2012-03-07 Member: 148303Members, Reinforced - Shadow, WC 2013 - Shadow
    This thread just makes me more excited to get start playing this game ASAP.

    Can't wait to get into all the nooks and crannies :D
  • LuitjensLuitjens Join Date: 2010-07-26 Member: 73034Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, Subnautica Playtester
  • RadimaXRadimaX Join Date: 2013-02-05 Member: 182840Members
    what engine is this? Ms.Paint?
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Ms paint the engine.

    Draw your weapons.

    also, some playing around with caves and building interesting looking connections into them:
    j0X2sLPaXAw82.png
    jULe4oqATKzAr.png
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    How do you get such large line of sights? I turn off fog and just end up with a level that only renders halfway across my screen... I have to move closer for it to render further..
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    the top most slider should control render distance.

    Played around with reefs today:
    FebN8st.jpg
    more:
    http://minus.com/mblQk5b3wz3upB
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    WoW - Those screens linked are like 50 shades of Awesome. Any chance of a link to some code files? Or will you just be keeping these bad boys to yourself :)
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    ITs more fun if more people are doing it:)

    The code for most of it is in the first post. I just added padReef.cs and dll to it, which is what that last bit was. Most of the screen are me playing with everything up to the algo pass to make interesting terrain to cover in pads
  • ellnicellnic Join Date: 2010-07-19 Member: 72559Members, Reinforced - Shadow
    It really looks beautiful
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    Looks awesome, at this moment in time whatever you guys are doing is beyond my knowledge but hopefully in the next few years I'll be helping do cool stuff too
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    It's not really that complex mathematically.

    For the sake of simplicity, I am gonna do some hand wavy type thing, but, basically, imagine that you and I are drawing a map on some graph paper. For each square we assign a tile type to it. for now we are gonna deal in 2 kinds of tiles. forests and fields.

    We start off by looking at each square, and just roll a dice and we get this really odd looking patch work of forests and fields. If white is forests and black is fields we will get something like this:
    noise.gif

    Which is pretty cool. But, isn't that cool. After all its hard to get like a deep dark forest since most of them are right next to some fields and fields are pretty small as well.

    The obvious choice is to use something other than random luck to pick what something should be. Some sort of function. Now, given that we are huge nerds we decide that the obvious choice here is to use the x ,y coordinates of the place on the map to pick what it is. This is a great idea. We can make checkerboards, and lines and stuff.

    In subnautica something like that looked like this:
    ni9lr4S.png
    (that is something like (x +y) modulo number of Textures)

    The thing is that it looks pretty cool but its sort of repetitive. What we need is some sort of function that takes coordinates and turns them into a semi ordered but still random looking pattern of forests and fields. It turns out that people, Notably for us Ken Perlin for the movie Tron, have been tying to figure out ways to make interesting looking patterns of dots for a long time. As good programmers we are bright enough to know a good thing when we see it and we decide to use his noise. His noise looks like this:
    Perlin_noise.jpg. For what we are doing you really don't need to know how or why this works, just that it does. The function here could be anything, cosine, tangent, anything that makes data from some numbers.

    Now, that, my friend, is so cool. Right? We are gonna make all the light areas forests and all the dark ones fields.


    With me so far?

    Good.

    So, to step back to the terrain test it basically asks you what to do with the square at (x,y,z) You wave your hands, plug the numbers into some sort of function and tell it one of the things in this picture by number with 0 being water. There are 11 textures as of this writing. This will explain why I keep multiplying things by 11 later.

    So to make something that is pure random we do this, assume that Random.NextDouble() makes a number between 0 and 1 with a boat load of decimal places:
    The_Tile = Math.Round( Random.NextDouble() * 11) ;
    

    As you can see that should make a purely random, but mostly solid world that looks like say, this:
    Cs5gy3v.png

    Right, what do we do to make this work with a function like say, perlin noise?
    The_Tile = Math.Round( Mathf.PerlinNoise(x,y) * 11) ;
    

    So, that means that in the picture we have up there lighter stuff is further down on the list of textures and darker stuff is more likely to be water. For that map on graph paper this is kick ass. We have this really cool bunch of stuff grouped into clusters and just basically looking ultra cool.


    Okay, so how do you use this to make mountains? The short answer is math.

    The long answer is we take perlin noise, we spread it out so that the white bits are really stretched out, we then us the value with the height of tallest mountain we care about. We then check to see if y, out altitude, is above the resulting height. If it is make the square water, in all other cases make the square rocks.
    int tallest_mountain = 8848;//height of everest in meters.
    float noise_here = Mathf.PerlinNoise(x/60f, y/60f);// get the noise and stretch it out 60x.
    float valley_floor = -6000;//minimum height in meters to output. (the test only goes up to 3200 metes so we chop the bottom off)
    
    int The_Tile = 0; //water;
    
    if( y < tallest_mountain * noise_here + valley_floor){
         The_Tile = 6;//ROCKS
    }
    
    return The_Tile;
    


    At this point, I am gonna give up. But, that is generally how it works. If you want i can cover the algo pass as well, but I think that Steve does it all pretty well here: http://steamcommunity.com/sharedfiles/filedetails/?id=225171191











  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    edited February 2014
    Alright thanks for the write up, I'll probably need to re-read it again but I get the 'concept'.. god help me if this is what path I'm going down my next few semesters >_>

    I might give the terrain test a try though and see if I can manage anything... (or nothing :P)
Sign In or Register to comment.