Search Unity

HORIZON[ON] - Bridge the gap between the sky and your scenery.

Discussion in 'Assets and Asset Store' started by Becoming, Jul 30, 2014.

?

In which scenarios would you use Horizon[ON] ?

  1. Small to medium sized terrains (first/third person view/driving game)

    33.8%
  2. Small to medium sized terrains (flying game)

    17.5%
  3. Big to huge sized terrains (first/third person view/driving game)

    41.3%
  4. Big to huge sized terrains (flying game)

    32.1%
  5. Small to medium sized terrains on mobile (first/third person view/driving game)

    16.9%
  6. Small to medium sized terrains on mobile (flying game)

    13.0%
  7. Big to huge sized terrains on mobile (first/third person view/driving game)

    16.3%
  8. Big to huge sized terrains on mobile (flying game)

    18.0%
Multiple votes are allowed.
  1. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Thanks for the reply.

    I went through the tutorial in the manual. I think I can do most things, except trying to figure out how to get a heightmap of the real world terrain from WC to use on the Horizon terrain.

    I think I basically just need to somehow convert the RAW heightmap from WC into an ARGB texture for the displacement stuff in Horizon?

    Not quite sure how to normalize the heightmap from TC, maybe I should ask Nathaniel about that.

    Edit:

    Actually, if I can make the Horizon terrain use the real world heightmap from WC, it should continue right where my TC terrain leaves off, so I shouldn't even have to flatten the edges, right?

    Maybe I am using Horizon in a completely wrong way?
     
    Last edited: Mar 30, 2015
  2. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Oh, that one is relatively simple, you have the raw heightmap and open it in photoshop as 16bit, 1 channel image. press control+L to open the levels dialog, put the left marker to the start of your histogram and the right marker to the end of the histogram, accept the changes.(look for levels in photoshop tutorials if you want to learn more on that). Now go to "image" in the top menu, then to mode, select 8 bit. select discard information. Press control+a to select everything, control+c to copy it... make a new file, go to the channels tab select channel R and paste the image in there. This is all you need to do for a 1 layer setup with the displacement feature. you might want to do 4 layers, then you have to provide 4 different heightmaps, one in each channel. Therefor ARGB... You should also look into making the layers tileable, like you would do with a regular texture, but that goes more into detail and i need to work out a real tutorial on that. I hope this will get you on track for now.

    It might be that the comands are called a bit different in the english version of photoshop but i think i remebered them correctly.
     
  3. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    The problem with that is I think Teila's project may be similar to mine where we wont be loading all the tiles at the same time due to memory restraints. So, for my project at least, the tiles will have to be dynamically loaded as the player gets near them. I'm still a bit concerned about how the horizon will be generated from the specific neighboring terrains once Sectr breaks them into scenes. For a flight game, where I'm looking down at the terrain, I don't see it as a big of an issue as I would with a first person/third person mmo camera type view. If my character is walking across a tile that is flattish plains but a tile in the distance contains mountains which should be viewable from the current tile, I'm wondering how Horizon[On} would handle that with Sectr Stream. I like that it works with TC and RTP and that is a huge plus. I'm still just a tad concerned about large land masses that wont be loaded all at the same time.
     
    twobob likes this.
  4. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    There are a few different ways to deal with that, the first that comes to my mind is to make meshes for all the terrains and switch them out with the according terrain. Exporting a terrain as an obj and letting a poly reduction algorithm run over it in the 3d app of your choice would be a good way to get replacement terrain tiles. You could use Horizon[ON] shaders on these meshes as they are fast and specially made for large scale and distant terrains. Though, there is no such thing as a perfect workflow for all cases, so you have to be a bit inventive. Horizon[ON] is certainly flexible enough to allow for your custom way. Of course we can not plan ahaead for all different usecases, that's the reason we made Horizon[ON] as flexible as possible. For such cases as yours, there is no out of the box solution but i am confident that it is possible to get great results if you are a bit creative and learn the possiblities that Horizon[ON] offers. One thing is certain, having nothing in place of the unloaded terrains would be not a solution either. However you solve it, i still believe that having a horizon object is benefitial for the astethics of any game that uses terrains. I also shared some thoughts on Sectr workflow on the previous page in case you haven't already seen the post.
     
    twobob likes this.
  5. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    @Becoming

    Thanks for the tips on the normalization piece.

    Am I using Horizon for the wrong reason if I want to have my 1kmX1km terrain surrounded by 5kmX5km of "Horizon terrain" but instead of the Horizon terrain being somewhat random and tiled, make it completely from the WC heightmap?

    Maybe I should just be creating a very large low res mesh around my terrain...?
     
  6. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    No, its definitely valid to use Horizon[ON] that way but it is just not the way i would recommend. Your way works just fine, the only reason i would not do it that way is that you could use smaller textures and still get a higher resolution look the other way. Also your horizon could be MUCH bigger with VERY little performance impact. Another reason would be more control over where certain areas are placed.
     
  7. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Shadow and sunshafts test:

    Shadows.gif
     
    twobob, adventurefan, John-G and 3 others like this.
  8. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    See, now is that awesome or what? huh?

    :D heroic

    And I too was considering the dynamic moving world problem as I intend to load tiles..
    Will keep considering it. seems doable
     
  9. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Sorry, you confused me there.

    You are saying that it is valid to use Horizon using real world heightmaps from WC for large surrounding area, right? But you are saying you WOULDN'T use one large heightmap for Horizon like that, because you could just make a fake terrain with a tiled smaller heightmap?
     
  10. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Yeah, sorry din't mean to confuse you... its perfectly fine to do it like you intendend. It is just a matter of preference. Keep me updated on your progress :)
     
  11. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Last chance today to beat the highscores on the demoscene challenge for this month(sorry mac users, i still haven't got around to make a mac version of the demo). You can win Horizon[ON], SnazzyGrid and SnazzyPaint... Check the first post on this thread for more info ;) At least Gekigengar's score is possible to beat, the 1st and 2nd place are pretty tough to beat i'd say but surprise me :)
     
  12. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I tried and scored about 4000 :p Think I will just accept I should write games not play them.
    ... I am trying out those flat shading tricks today on the surrounding stuff.
    Good luck everyone!
     
  13. jmjd

    jmjd

    Joined:
    Nov 14, 2012
    Posts:
    50
    Well, I've been waiting to post this for a couple weeks. Hopefully, nobody's been waiting to do the same with a higher score:

    Horizon[ON] Demo - Score 14027300.png
     
  14. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Thats brutal :eek::D
     
  15. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    To clarify the winning conditions, for this month only posts that are made within march count, if you post afterwards it will count for the next month... oh and to be fair, winners can not compete again. Any objections?
     
  16. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    manual edits finished - chuck me RL email for the sendback.

    also I think I got the hang of the flat thing... Will start implementing it now I have a nice layer 1/2 merge :)
    Capture.JPG

    Final thing. Gimp II
    FILTERS -> MAP -> Make Seamless is probably worth a mention for making simple (non-filter or mask) seamless repeating patterns for the edges...

    Cheers
     

    Attached Files:

    Last edited: Mar 31, 2015
  17. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    yeah, that looks much less like a glitch and more like an actual artstyle :p :D curious for more!
     
    twobob likes this.
  18. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I just built for Android and use a Build Report Tool asset. It showed that Horizon[ON] Displacement.shader took up 116.4MB of space! The transition shader took up 106MB!

    Is this normal?! LOL
     
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Is this on 4.x?

    Sounds like a shader thingy...

    "Modifying the shadercode to reduce buildsize"

    Page 19 of the manual

    upload_2015-3-31_18-35-18.png
     
    Last edited: Mar 31, 2015
  20. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I am just putting together the displacements now...
    Hence my other question...

    since 768 oddly doesn't seem to EXACTLY match my 3x256 terrains... so I was checking the scales (800 -> 810 looks right?) as I have to logarithmically extrapolate this value, I don't want to fiddle with it twice... it's close enough. I shifted a few verts, everyone's happy. moving on.
     
    Last edited: Mar 31, 2015
  21. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Hmm, not sure why that would be the case, are you sure you dont have some scaling on a parent that does not match? Dont forget to utilize the child compensation of SnazzyGrid in case you have to fiddle with the scales...
     
  22. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Thanks twobob, I should have looked there. I knew there was something in there about the shader keywords, but didn't realize it had anything to do with the build size :)
     
    twobob likes this.
  23. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Yeah, it's a bit weird. The first 768 is spot on. then I put in place my first outer loop. _disp_start

    but when I go to add my 2nd. if I choose 1536 I got a little gap and had to go with 1532 ^2 after that.
    Maybe it was something I did, but nothing so obvious as a parent transform :p

    I will reconsider it when I do it again. It's fine as it is for now.
    upload_2015-3-31_19-57-25.png

    upload_2015-3-31_19-57-46.png

    upload_2015-3-31_19-58-36.png

    upload_2015-3-31_19-59-32.png

    You can actually tell that I had to mungle the 2nd ring occasionally - now I look around -

    upload_2015-3-31_20-1-8.png

    So actually I will try to fix it in a bit.

    But yeah, awesome bit of kit mate. I think we can say that is not a terrible match for a non-artist like me.

    Entire scene with 100+ trees and 768 m2 of land 80k tris :)
     
  24. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    I'd say that looks quite good... i guess you could even cheat on that inaccuracy if you just place the outer ring a bit lower, i don't think it would be noticable, anyway i am still intersted where that could come from...

    From the artist side i only have a little suggestion, try to brighten the global tint a tiny bit, i think the colors would match better with the super clear sky. Also for the Sun light i found that the sweet spot for brightness is a value of 2(in linear color space) and the sun light should be slightly orange(just a tiny bit).

    Quite nice to see that it is useable with this kind of style, the flexibility really pays off in the end :D
    And as you say non-artist... that must be the nicest programmer art i've seen so far ;)
     
    twobob likes this.
  25. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Rough Geometry burden figures. (of note for android)

    before
    upload_2015-3-31_20-24-45.png

    after

    upload_2015-3-31_20-25-30.png

    it's about a 50k burden worst case in this scenario. (the verts are cheap)
    Will shove it on a terrible android at some point and see if I can kill it ;)
    Obviously baked displacements are an alternative (see the manual future reader) and I used the very most expensive 5 ring custom setup. I think this is really incredible as a system.

    It really does run very nicely. Kudos
     
    Last edited: Apr 1, 2015
  26. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    @twobob I like how you combined the two packages. Nice! I'm going to have to try this at some point as well. Thanks for sharing the screen shots.
     
    twobob likes this.
  27. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
  28. jmjd

    jmjd

    Joined:
    Nov 14, 2012
    Posts:
    50
    So I don't know if this will count (or even zedalis's last post) depending on where @Becoming is located and which time zone is used as the end of March. But since he posted that score, I had to give it one more go. Either way, I'd just like to say thanks to zedalis. Thanks for "motivating" me to spend the last few hours popping balloons, instead of getting any actual work done. ;)

    Actually, the real the thanks goes to you Becoming, this contest was fun! You've got a fun little game, with amazing visuals to go with it.

    So here's my final score, probably not valid, but just in case since there's still a little bit to go before it's no longer March for me:

    Horizon[ON] Demo - Score 15288100.png
     
  29. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    @Becoming I need help with this error that gets generated with z-fighting script on:

    NullReferenceException: Object reference not set to an instance of an object
    Horizon.HorizonCompensateZFighting.Update () (at Assets/Horizon[ON]/Sources/Scripts/HorizonCompensateZFighting.cs:16)

    Nothing seems broken and the script does what it needs but that error fills up the console log. Not sure why it does this. The script is attached to Horizon[On]Transition_Terrain
     
  30. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    I forgot to do a null check for camera.main, probably your camera is not tagged as main camera... in the next update i will just use a public transform instead of the main camera. In the meantime you can replace the code with this(or just tag your Camera as Main Camera):
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. namespace Horizon {
    5.     [AddComponentMenu("Horizon[ON]/Horizon[ON] Compensate Z-Fighting")]
    6.     public class HorizonCompensateZFighting : MonoBehaviour {
    7.  
    8.         public Transform myCamera;
    9.  
    10.         public float minCamHeight = 2.0f;
    11.         public float minOffsetY = 0.5f;
    12.         public float maxCamHeight = 500.0f;
    13.         public float maxOffsetY = 5.0f;
    14.  
    15.         float currentOffset = 0.0f;
    16.        
    17.         void Update () {
    18.             if (myCamera != null){
    19.                 if (myCamera.position.y <= minCamHeight){ currentOffset = minOffsetY; }
    20.                 currentOffset = Mathf.Lerp (minOffsetY, maxOffsetY, (myCamera.position.y/maxCamHeight));
    21.                 if (myCamera.position.y >= maxCamHeight) { currentOffset = maxOffsetY; }
    22.                 transform.position = new Vector3(transform.position.x, currentOffset, transform.position.z);
    23.             }
    24.         }
    25.     }
    26. }
    Don't forget to assign your camera in the inspector ;)
     
  31. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    Yes that fixes the issue! Thanks.
     
  32. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Winners.jpg
    Congratulation to the winners of the march competition :) i must say jmjd and ZedalisDesign have really surprised me with their ambition. I would not have expected that somebody can endure my game that long... sorry to steal you guys so much time :D

    Since you are both a bit on the insane side with your scores and was not really clear about the timezone(was not even thinking about it tbh) i decided to give you both the prizes of the first place. jmjd got the official 1st place and ZedalisDesign the 2nd but you both deserved the full prizes. So i hope you can make good use of Horizon[ON], SnazzyGrid and SnazzyPaint. I know that Gekigengar already has Horizon[ON] and he was also so clever to get SnazzyGrid ;) so i can "only" offer SnazzyPaint.

    I hope you guys have use for the assets! I will make a Hall of Fame in the first post and you guys have your places there well deserved! I'll contat you via PM about the prizes ;)

    So, competition for April is open!!

    PS: if somebody has an idea how to make the game a bit more interesting and challenging(no crazy effort though), let me know... i'll have to revisit the demo soon as i still have to make a mac version, maybe i can build in some new features along the way.
     
    twobob likes this.
  33. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Just messing about, here's some things

    upload_2015-4-2_1-34-14.png

    Making natural looking variations to existent Heightmaps, the Mandelbrot at low settings can be your friend. (and is free)

    Gimp -> Filters -> Map -> Fractal Trace

    If you are stuck for normals or tile repeating Third party apps like Bitmap2Material can really help here


    upload_2015-4-2_1-53-34.png


    Also if you are not going for reality you can be pretty avant-garde with the settings

    upload_2015-4-2_1-51-51.png

    Really experimenting with the masks can give nice effects, Here is more mangled Mandelbrot

    upload_2015-4-2_1-59-47.png

    upload_2015-4-2_2-0-28.png

    Enjoy!
     
    Last edited: Apr 2, 2015
  34. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    possible to get mobile demo scène just look for reduce number of Tris please
     
  35. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
  36. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
  37. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hi Becoming,

    First off Tom (RTP Tom) recommended horizon[on] and seeing as RTP is one of my keystone assets I bought it.

    I'm hoping you will help me establish my workflow for this asset, and to that you need to know what I'm doing and what tools.

    Fortunately I made videos a while back which do just that
    (Note I put a space in the links because I didn't want them to show up in the forum as videos and confuse others)
    This is what I do https://youtu.be/ tjVJsgPU8C4
    This is what it looks like https://youtu.be/ FNwj9vbqCCw

    The main benefit I think RTP gives me is: it allows me to lower my terrain resolution because it does relief shader wizardry thing that makes terrains look great.

    Questions

    I'm going to use cliffs, rivers and oceans to stop the player falling off the edge of the map. Cliffs don't need to be very high they just need to be steep, and I can put a collider in the water or drowned them, probably drowned them to teach them a lesson lol.

    Question 1 How did you make those cliffs? they're great and I need cliffs.
    I have a workflow where I can make a terrain in world machine
    import it into Unity
    Fiddle with it with terrain brushes
    Export it back in to world machine
    Do world machine things to it like erosion
    and import it back into unity.
    But I have difficulty making cliffs.

    Question 2
    I'm going to put question 2 in a different post
     
  38. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Cliffs in the demo are made using a mesh displacement I believe.
     
  39. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Thanks Twobob I just found the cliff mesh in the project and thought it might be something like that.
     
  40. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hi again Becoming,

    The first question was like an introduction and a little question, this is the main question.

    I'm almost certainly going for a single 4km by 4km terrain.
    Cliffs and water will stop the player before they get near the edge of the terrain.

    I'm hoping I can export the geometry and texture maps needed for Horizon[on] from World machine. But I'm not sure what I need to be exporting in what form and how big.

    I'm looking in Horizon[ON] / Prefabs / BlendMeshes Displaced / Horizon[ON]_Disp_Ring_High and thinking What?

    Any help would be greatly appreciated

    Roy
     
  41. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    It's very clear after reading the readme what those things are for, what inputs they expect and how they are implemented.
    Have you read it? He asked in his least confrontational typing...

    I would say possibly repeating external "block" of info, with normal data.

    Looking at the demo examples (which I /think/ maybe were exported from WC) that is more or less it, with a few extra notes: Water being a certain channel, Water auto-flattening, other channel considerations. However, the example files do tell you a lot. Same with the readme (and of course the in-line info callouts on the editor)
     
    Last edited: Apr 5, 2015
  42. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Any turbo forest integration :
     
  43. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Ohh wow twobob why are you jumping on my posts asking "confrontationally" if I have read the readme?
    Are you officially providing support for this asset? because I've not rated or reviewed it yet.

    I'm simply asking the author for some help and advice about their asset which I've purchased.

    as the manual states "note manual not readme"
    and
    Which is exactly what I'm trying to do.
     
  44. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Sigh. "Least confrontational."
    And I asked so I didn't regurgitate it all again.

    Apologies for asking - what I thought - was a very straightforward question.
     
    Last edited: Apr 5, 2015
  45. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    It's okay twobob I know you meant well, Unity5 has chopped up most of my workflows like a flipping chainsaw, its going to take me a long time to get to where I was last month.

    At the backend of last year when I made those videos I heard a whisper that someone was developing an asset / solution for what I was trying to do, so I worked on something else and waited for Horizon[on].

    I need to understand not only how to create the maps and geometry for horizon[on] but also what is best practice for performance.

    I'm hoping to make a macro in world machine to spit out everything I need for horizon[on] because that's how I make terrains at the moment.

    At first glance I was thinking that horizon[on] would use the same textures as the terrain but perhaps the horizon[on] textures need to be a higher resolution because they're covering a larger area, I don't know.

    Roy
     
  46. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    EDIT: I p'm ed you better details.

    regards,
     
    Last edited: Apr 5, 2015
  47. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    FWIW: TurboForest isn't U5 ready AFAIK, the author said last night...

    However "batched mesh tree placement" support via the water channel (if unused for example) would be cool :p hehehe. Oh and I want an aardvark, an acrobat and a ballerina...Meh I am so old...
     
  48. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    Easy workaround for trees is make a dummy mesh/terrain just underneath and place them on that :p

    Native support could be nice though.
     
    twobob likes this.
  49. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    For trees i would suggest to bake the displacement(see diplacement section in manual)and add a temporary mesh collider on the Horizon[ON] elements, then use something like quickbrush to place trees(preferably billboards or even better just quads facing the scene origin) on Horizon[ON]. This way you can have lots of fake trees(millions) with least performance impact.
     
  50. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    So obvious.

    I actually didn't realise that baking displacement would work on the _start _mid _mid _mid _end stuff...

    Will certainly be trying that out. thanks