Search Unity

The Secret to Great Terrain on Mobile

Discussion in 'iOS and tvOS' started by protopop, Mar 2, 2015.

  1. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Android version?
     
    protopop and pixxelbob like this.
  2. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks for asking. I do plan on the Android version once the IOS version is finished.

    I have a prototype running on my Nexus 5:


    Its straightforward except i ought unity pro ios and android basic back before subscriptions. So i dont have access to render textures in android (it uses the old license) so i noticed the filters and rflections are not working. ill have to figure this out - my perpetual licesne expires in march 2017, then i will switch to sunscription that will give me access to parity on android, but i dont want to wait that long so i have to decide if i can afford to go on subscription 6 months early or if there is another way. anyways all to say i am working on it in the background and i want to see BrightRidge in android:)
     
    lclemens and JamesArndt like this.
  3. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Cool will keep on the lookout for the Android build. My wife and I moved away from iOS devices a while ago.
     
    protopop likes this.
  4. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Take two:) BrightRidge storymode has been re-submitted to the App store. Here's the trailer
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    When the Android version will appear ? :D
    A tiled terrain system could have helped on lower devides , as using billboards.
    Anyway great insight on using terrain on mobile.
     
    protopop likes this.
  6. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Can I ask you a few technical questions? If so: What did you use for post processing, bloom, light shafts, etc?
    Did you use fog or some other more optimized trick?
     
    mukki014 and protopop like this.
  7. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    The post processing is partly the default Unity Bloom etc, and part Colorful FX for color processing etc
    I used regular unity fog and Global fog - i cant remember where i found that one but i THINK its part of the unity effects
     
  8. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks:)

    I have an android version almost ready.To upload it to the Google Play store you need a way to split the files into 2 because its bigger than 100mb (Unity can do that) but the problem is it looks like you need a way to host the second part of the file on your own server in case the download fails, and that's something i don't have the money to do. I don't know if its a hard requirement or not because for me the instructions are very complicated, so that's the main reason i haven't released it yet. I am trying to find time to figure it out, and once i do ill release the android version.
     
    recon0303 likes this.
  9. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    recon0303 and protopop like this.
  10. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    thank you:) I did read this thread, but it seems to me like it is unresolved about catering downloads for people with a failed obb downloader. The only thing i dont get is are we expected to host the obb ourselves for cases where the initial downloader fails? cause it seems like that in the google docs. I bet i could just upload it and it would mostly work, but the terms and conditions are beyond what we can understand so i dont know the penalties if we dont cater for an alternate download in case of those failures.
     
  11. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We've got two games (one with tens of thousands of downloads) with an OBB expansion file and it works just fine -- never had a reported problem with it.

    1) In Unity, on Player settings, check Split Application Binary under Publishing Settings.

    2) Build the game, then check/rename the two files (not 100% sure this is necessary, but works for us):
    main.1.com.myname.gamename.apk
    main.1.com.myname.gamename.obb

    3) In the Google developer console, on the APK page, switch to Advanced mode, then drag the apk file into the upload panel. After it's finished uploading, you'll have an option to add an expansion file. Select the OBB and upload it.

    4) Voila! It works!
     
    recon0303 likes this.
  12. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    @gecko If you didn't add code to check to make sure the OBB file successfully downloaded, then you are risking the possibility that a user only downloaded the main apk and not the OBB and your scene will have exceptions, etc.
     
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    @mbowen89 : From what I've read, that's only for older devices/versions of Android...is that your understanding? We require 4.2+ and haven't heard of any problems.
     
    protopop likes this.
  14. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you guys.I really appreciate the clear directions and multi analysis.
    It seems the deal is upload at your own risk.
    It's unlikely downloads will fail but if you don't cater to it you're breaking the terms of service.
    I have some thinking to do. a LOT of people are asking for BrightRidge on Android.

    Meanwhile, here's some end results of my terrain on mobile:

    https://www.instagram.com/protopopgames/
     
  15. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I also remember reading that on older devices, it would more likely have issues. Here's what Google says:

    That's the one thing, a user might actually accidentally delete an obb when cleaning up their device, and not remove the APK. I'm just saying that it's really not that much code or difficult when you sit down to do it (adding in OBB code to verify) so if you make any money at all from your apps, it's worth it.
     
    protopop likes this.
  16. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    @mbowen89 -- where do I find that OBB code for verification?
     
  17. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    https://www.assetstore.unity3d.com/en/#!/content/3189

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.IO;
    4. using System;
    5.  
    6. public class GooglePlayDownloader
    7. {
    8.     #if UNITY_ANDROID
    9.     private static AndroidJavaClass detectAndroidJNI;
    10.  
    11.     public static bool RunningOnAndroid()
    12.     {
    13.         #if UNITY_ANDROID
    14.         if (detectAndroidJNI == null)
    15.         {
    16.             detectAndroidJNI = new AndroidJavaClass("android.os.Build");
    17.         }
    18.         return detectAndroidJNI.GetRawClass() != IntPtr.Zero;
    19.         #else
    20.         return false;
    21.         #endif
    22.          
    23.  
    24.     }
    25.  
    26.     private static AndroidJavaClass Environment;
    27.     private const string Environment_MEDIA_MOUNTED = "mounted";
    28.  
    29.     static GooglePlayDownloader()
    30.     {
    31.         if (!RunningOnAndroid())
    32.             return;
    33.  
    34.         Environment = new AndroidJavaClass("android.os.Environment");
    35.      
    36.         using (AndroidJavaClass dl_service = new AndroidJavaClass("com.unity3d.plugin.downloader.UnityDownloaderService"))
    37.         {
    38.         // stuff for LVL -- MODIFY FOR YOUR APPLICATION!
    39.             dl_service.SetStatic("BASE64_PUBLIC_KEY", "KEY");
    40.         // used by the preference obfuscater
    41.             dl_service.SetStatic("SALT", new byte[]{1, 43, 256-12, 256-1, 54, 98, 256-100, 256-12, 43, 2, 256-8, 256-4, 9, 5, 256-106, 256-108, 256-33, 45, 256-1, 84});
    42.         }
    43.     }
    44.  
    45.     public static string GetExpansionFilePath()
    46.     {
    47.         populateOBBData();
    48.  
    49.         if (Environment.CallStatic<string>("getExternalStorageState") != Environment_MEDIA_MOUNTED)
    50.             return null;
    51.          
    52.         const string obbPath = "Android/obb";
    53.          
    54.         using (AndroidJavaObject externalStorageDirectory = Environment.CallStatic<AndroidJavaObject>("getExternalStorageDirectory"))
    55.         {
    56.             string root = externalStorageDirectory.Call<string>("getPath");
    57.             return String.Format("{0}/{1}/{2}", root, obbPath, obb_package);
    58.         }
    59.     }
    60.     public static string GetMainOBBPath(string expansionFilePath)
    61.     {
    62.         populateOBBData();
    63.  
    64.         if (expansionFilePath == null)
    65.             return null;
    66.         string main = String.Format("{0}/main.{1}.{2}.obb", expansionFilePath, obb_version, obb_package);
    67.         if (!File.Exists(main)) {
    68.             return null;
    69.         } else {
    70.             //new obb exists, delete old ones
    71.             DeleteOldOBBs();
    72.         }
    73.         return main;
    74.     }
    75.     public static string GetPatchOBBPath(string expansionFilePath)
    76.     {
    77.         populateOBBData();
    78.  
    79.         if (expansionFilePath == null)
    80.             return null;
    81.         string main = String.Format("{0}/patch.{1}.{2}.obb", expansionFilePath, obb_version, obb_package);
    82.         if (!File.Exists(main)) {
    83.             return null;
    84.         } else {
    85.             //new obb exists, delete old ones
    86.             DeleteOldOBBs();
    87.         }
    88.         return main;
    89.     }
    90.     public static void FetchOBB()
    91.     {
    92.         using (AndroidJavaClass unity_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
    93.         {
    94.             AndroidJavaObject current_activity = unity_player.GetStatic<AndroidJavaObject>("currentActivity");
    95.  
    96.             AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent",
    97.                                                             current_activity,
    98.                                                             new AndroidJavaClass("com.unity3d.plugin.downloader.UnityDownloaderActivity"));
    99.  
    100.             int Intent_FLAG_ACTIVITY_NO_ANIMATION = 0x10000;
    101.             intent.Call<AndroidJavaObject>("addFlags", Intent_FLAG_ACTIVITY_NO_ANIMATION);
    102.             intent.Call<AndroidJavaObject>("putExtra", "unityplayer.Activity",
    103.                                                         current_activity.Call<AndroidJavaObject>("getClass").Call<string>("getName"));
    104.             current_activity.Call("startActivity", intent);
    105.  
    106.             if (AndroidJNI.ExceptionOccurred() != System.IntPtr.Zero)
    107.             {
    108.                 Debug.LogError("Exception occurred while attempting to start DownloaderActivity - is the AndroidManifest.xml incorrect?");
    109.                 AndroidJNI.ExceptionDescribe();
    110.                 AndroidJNI.ExceptionClear();
    111.             }
    112.         }
    113.     }
    114.  
    115.     public static void DeleteOldOBBs() {
    116.         populateOBBData();
    117.         string expansionFilePath = GetExpansionFilePath();
    118.         if (expansionFilePath == null) {
    119.             return;
    120.         }          
    121.         for (int i = obb_version - 1; i > 0; i--) {
    122.             string old_obb = String.Format("{0}/main.{1}.{2}.obb", expansionFilePath, i, obb_package);
    123.             if (File.Exists(old_obb)) {
    124.                 File.Delete(old_obb);
    125.             }
    126.         }
    127.     }
    128.  
    129.     // This code will reuse the package version from the .apk when looking for the .obb
    130.     // Modify as appropriate
    131.     private static string obb_package;
    132.     private static int obb_version = 0;
    133.     private static void populateOBBData()
    134.     {
    135.         if (obb_version != 0)
    136.             return;
    137.         using (AndroidJavaClass unity_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
    138.         {
    139.             AndroidJavaObject current_activity = unity_player.GetStatic<AndroidJavaObject>("currentActivity");
    140.             obb_package = current_activity.Call<string>("getPackageName");
    141.             AndroidJavaObject package_info = current_activity.Call<AndroidJavaObject>("getPackageManager").Call<AndroidJavaObject>("getPackageInfo", obb_package, 0);
    142.             obb_version = package_info.Get<int>("versionCode");
    143.         }
    144.     }
    145.     #endif
    146. }
    147.  
    And then in my main scene script I have some code that does this basically:
    Code (CSharp):
    1. #if UNITY_ANDROID
    2.     public void CheckOBBDownloadUpdate() {
    3.         mainPath = GooglePlayDownloader.GetMainOBBPath(expPath);
    4.         if (mainPath != null) {
    5.             //OBB finished downloading?!
    6.             obb_download_failed = false;
    7.         }
    8.     }
    9.  
    10.     public void RetryDownload(){
    11.         GooglePlayDownloader.FetchOBB();
    12.         CheckOBBDownloadUpdate();
    13.     }
    14.     #endif
    This is from June 2015, I don't think even Unity 5, so take with a grain of salt, but it should work the same.
     
  18. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Oh so Google will still host the "backup" obb? we dont have to host it ourselves, just include this fallback? Thats enough encouragement for me to give it another try. a LOT of people have been asking for BrightRidge on Android. Thanks for including the code:)

     
    mukki014 likes this.
  19. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    When you upload your apk, you upload the OBB file. Google then will do it's best to make sure the user downloads it when installing. What your code does, is checks to make sure the OBB file is indeed on the device, and if not, contact Google servers and download it.
     
    protopop likes this.
  20. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Im going to try this again this weekend - thank you:)

     
  21. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hey Protopop, game looks amazing, i will download it once it releases.

    Anyways, what are you using for terrain shaders?? I have had issues, and alot of games made in Unity I see the same issue.... This is not from my game but same issue... wondering what you may have used ? Thanks!

    PS: Have you used Terrain Composer 2 yet?? I been a tester and been using, really loving it, and I used TC1 for years.
     

    Attached Files:

    protopop likes this.
  22. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks recon0303:) Your game looks like fun. I'm a big fan of bright colors and easy to read landscapes. My games can look kind of messy comparatively:)

    Im just using the terrain standard shader. Ive tried using asset store ones but i always seem to end up with these really low res terrain textures, so i just stuck with the basics.

    My game is available for IOS:) Its at version 6 - try it out if you like - i appreciate the support:
    https://itunes.apple.com/us/app/nimian-legends-brightridge/id1021026309?ls=1&mt=8
     
  23. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    thats not my game, at all, that is just a image I found that looked like the same issue. But thanks anyways. would love to try, but I don't have any thing apple related, I will wait for your Android version as I develop and have 6 devices for Android .
     
    protopop likes this.
  24. LT23Live

    LT23Live

    Joined:
    Jul 8, 2014
    Posts:
    98
    I've been following your forum for quite some time now! It's amazing to see how far you've come and your tips have definitely helped me out quite a bit.

    Have you thought about releasing an android version or have you already?
     
    protopop likes this.
  25. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you:) Im working on the android version, and ive been just figuring out how to get a beta on the Play store - i almost have it figured out.
     
  26. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    ps theres a pic of an early android beta above - its the old version but the new one mostly works too - just some filters to fix.
     
  27. LT23Live

    LT23Live

    Joined:
    Jul 8, 2014
    Posts:
    98
    @protopop I see it now :)
    I can't wait to try it.
    Good luck uploading! I know its a b***h getting it to work.
     
    protopop likes this.
  28. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Love & Tin. A new BrightRidge Adventure coming in update 6

     
    wahyuway, zugsoft and recon0303 like this.
  29. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Love what you are doing here!! :)
     
    mukki014, JamesArndt and protopop like this.
  30. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks Adam. I'm a big fan of your work, your professional approach with customers, and your heavy contributions to discussions. You've done great work:)

    I think world design is so much fun. Its connection to math makes it interesting on a technical level, and a philosophical one too when you think about the similarities between math based terrain and real nature, and what that might mean for the basis of nature in real life.
     
    AdamGoodrich likes this.
  31. Derojo

    Derojo

    Joined:
    Nov 19, 2014
    Posts:
    2
    Hi Protopop, you did a really great job on polishing your work, really like the world you created!

    I have some questions regarding post processing, would be really great if you can answer them :) I'm working on a mobile VR relaxation game for my final thesis and I am designing a forest with unity terrain.

    1. What did you use for the atmospheric scattering like the sun shafts? I've seen some open source variant and also the blacksmith one on the asset store but they seem too heavy for mobile.
    2. How did you create your sky, do you use a day/night cycle or made your own procedural sky?
    3. Did you create the foliage like the grass, flowers yourself? and do you use the "Advanced foliage shader?"
     
    protopop likes this.
  32. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks Derojo. Sorry about the delay, i havent been to the forum in a week or so.

    That sounds like an amazing thesis - wow, its great to see people exploring indeas and concepts that would have been science fiction when i was a kid. Its like i heard about Data Journalism the other day, journalists who analyze and draw conclusions from large amounts of data, and thought it was a clever future twist on a traditional career.

    Quite a few people have written me saying how exploring BrightRidge has calmed them, so i think theres something ti this. You can feel great about reseraching something positive that can help people beyond entertainment. I can say from experience, the older most people get the more stresses can get to you. Having new tools based on you research might someday help a lot of people.

    Im happy to answer your questions:)

    1. The actual sun shafts are off by default, but can be turned on in OPTIONS > PLAYGROUND > EFFECTS. They use the default unity sunshaft shader (and it doesnt work on android so im looking for an alternative - thankfully my code structures very object oriented so very plugin/plugout friendly).

    For the misty particulate effect its actually just a gradient on a plain thats placed in front of the camera. It simulates the dust and interacts great with lens flares.

    In fact a lot of my approach is kind of smoke and mirrors - i try to create the IMPRESSION of real nature, its mess and chaos, instead of accurately physically simulating it.

    2. The sky is just a skybox for each time of day (actually the morning sky is the sunset skybox, rotated and tinted orange). I wrote a simple script to handle the changing sun position, color, strength and ambient light. Combining this together its kind of a basic semi-procedural sky. I want to go fully procedural, but i have to figure out how to keep the great clouds. Im sure i wil swap in a fully procedural system at some point though. BTW i read an interesting pdf from the Guerilla games website about their skies and clouds in Horizon Zero Dawn (best game!) and its neat how much attention they paid to getting their clouds performant and looking just right

    3. Most of the grass is from the asset store, various package, one or two (like the white flowers) are 3d renders ive had for ages. Nothing special there. I tried using advanced foliage shaders (they look incredible) but i could never quite get it to work. For VR though if its compatible i would definitely try them because its all those advance plugins that can really make a more robust (like non mobile) scene look so good.

    Oh yeah, and Global Fog. Its your atmospheres best friend:) im using the one that comes with unity.
     
    radimoto and chelnok like this.
  33. Derojo

    Derojo

    Joined:
    Nov 19, 2014
    Posts:
    2
    Thanks for the detailed explanation and your openness! Those clever tricks could help me a lot in getting that extra feeling of being immersed in the environment (the presence is strongly related to getting that relaxation going on)

    Developing for VR, and in my case mobile VR, comes to optimizing and know what you can and cannot use. Most post-processing effects aren't suitable. I will try to use global fog or maybe just the normal fog settings, just need to try things out :)

    I can understand that some people experience calmness when exploring the world of BrightRidge; you used pleasant colors and the world looks realistic in a way that you convince your audience in being in the environment. Also music and sounds are very important, and for my prototype, getting that relaxation going on music and sounds are going to play the leading role.

    Thanks again, and good luck with further developments!
     
    protopop likes this.
  34. barcode802

    barcode802

    Joined:
    Apr 6, 2014
    Posts:
    36
    Hey Protopop - just wanted to give a shout-out because I really enjoyed your Brightridge and was surprised to find this thread when doing a google search about Unity terrain optimization! Thanks for making this nice experience and sharing it with all of us!
     
    protopop likes this.
  35. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you for taking the time to let me know:) Im glad you played the game. Its funny how things are connected on the web isnt it? I really enjoy making natural worlds, and i am working on more updates for the game as we speak.
     
  36. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    @protopop Amazing!!!!

    The game is so cool to play

    How do you achieve that distant full horizon with what looks like mountains and trees and details with only 200,000 budget?
     
    protopop likes this.
  37. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you:)

    I do a lot of optimizations for mobile - the game is really chunky - some people say its beautiful, others say its low res and ugly. i just focus on getting the look and feel of nature's mess and many people seem to like it. I use all the standard optimizations, compressed textures and being careful about how many i use, trying to optimize my scripts, nice skyboxes, and provide a lot of customization options so you can tailor it to your device - people have sent me pics from the newest android devices with all the settings pumped up and it can look pretty amazing. But it all comes at a price of making it all fit back to an iPhone 5s - i start the game in much lower quality on earlier devices, and i have a robust crash management flow so that when it crashes you at least start right back where you left off. There a lot more tips and tricks in this thread from me and from others as well:)

    One more big thing is the version of Unity. Im still using unity 5.2 because its the only version ive found stable enough. I find with each new version the mobile performance has decreased, maybe they are focused more on AAA visuals and I wish there was a little more corporate will to slow down and make the software stable instead of fast progress that some of us on mobile cant follow. If you're using a newer version of Unity you MAY encounter poorer performance and that can make a difference. For example as it stands right now i cannot get the game to work at all in Unity 5.4 . im actually not sure what i am going to do about that because its a big deal, but i just keep moving forward for now and squeeze as much as i can out of Unity 5.2, which has been a preetty great piece of software and a good friend for the last couple of years;)

    I am taking all i have learned and working on a new world too - here's some shots:





     
    JamesArndt likes this.
  38. omerselman

    omerselman

    Joined:
    Mar 5, 2016
    Posts:
    20
    For those who read this "secrets"; dont chase ghosts.
    I been trying to create an open world with the unity terrain and standart shaders as he suggested. I tried almost every possible ways and with all those heights on the scene and foliege, textures ; do you know what i found out? Creating an open world map with those scales are not possible. Even if you use a single texture with set to 128 and tailing to 400 do you know what will you get? Damn low fps rates. That is not possible. So i started to play with options. Increased error rate, decreases view range, added occolusion cullings, changed all textures to mobile, deleted all unnecessary models, got ride of trees and grass, removed shadows, baked lights, removed heights. At the end what i had left was a 500x500 flat terrain with one texture and still very low fps rate when i look to ground. What i planned was mountanious open world with 5k x 5k and the result was worse than minecraft.
    So i decieded to try something else. I used a mesh with Lod. Do you know what? That fps rate doubled and hit to 60. Even with much height, bigger terrain and skybox..
    So i said to myself, how come??? How the hell he could made it? I donwloaded the game than checked almost every details. You know what? He actually said the truth! He uses unity terrain. Damn!! He said truth but not all of it. When i checked around i reliesed that error rate changes. Whoot? He uses meshes as well. What da hell? He said he uses unity terrain only how come?? I been chasing ghosts for a long time and thats cause he said he used unity terrain only." Save as much as possible" damn it, i was punching air.. you see photos? They are meshes combined with terrain. The pixel error rate causes swifting the details of half of screen and other side stands still. Why? cause it is a mesh!!! Checked whole map and figured out how he did it. There are terrain bases combined with meshes. So when you walk around you see terrain cause the walkable areas are mostly terrain and it is mostly flat. If i were him i would add more terrains to enable disable when i use or dont need it. Anyways on the other hand when walk over mountainous areas actually you walk over mesh. Damn it. I lost so much time to believe his advices. Guyz, open the game, check the details. You will see what is actually there.
    Combination of terrain and mesh
    Using lod
    Using occolusion culling
    Particle effects
    Low poly grass and trees
    High terrain error rate
    View plants when they are about 10x close to you
    Etc etc..
    and definetly do not build your large scale terrain with unity terrain, use mesh or combine them as he did..
     

    Attached Files:

    protopop likes this.
  39. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Yeah I haven't tested my Android builds out of 5.6 yet, but I hope the performance isn't too far regressed from 5.2 or 5.4? I wonder if anyone has discovered the source of these performance slowdowns. I know sometimes it's literally a new checkbox in Unity for some feature you don't need on mobile, and it's checked on by default. I'd be very interested in a discussion in a thread on these mobile performance regressions, because I hear conflicting reports. You will read some people saying after their 5.4 upgrade, etc they saw a 10fps performance boost.
     
    protopop and theANMATOR2b like this.
  40. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    i KINDA suspect it has something to do with the way 5.4+ handles object transforms - i use a lot of gameobjects as a kind of visual coder, and my heirarchies are deep for organization. I think now it uses a lot more cpu when you change the order of a transform in the heirachy, although i have heard even this has been improved in newer versions. I also suspect that everything gets reflection probes and shadows now in deferred. The fact that its no longer an option to turn it off says to me that there must be some extra processing associated with this. In 5.2 i can control it on a case by case basis. It turs out dealing with upgrading older projects is actually a HUGE undertaking because of these things:) It all moves so fast so i hope for the best and i will at least be able to move to 5.3 for now it looks like.
     
  41. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thanks for trying out the game:)

    There are about 30 or so giant rocks and cliffs around the world that are meshes - they just sit on the terrain. Is that what you mean by terrain meshes? The rest though is unity terrain, wherever you see ground textures like the mountains etc. You can see an example of the mountain LOD changing here: at about 27:07


    the version you have in the screenshots is the old version - no realtime lights, no stories etc. But i used unity terrain there too, even though its unity 4 it should act the same.

    It sounds like using a mesh and no unity terrain speeds things up. if i can find a way to convert my textured and tree filled terrain to a mesh i would give it a try. maybe i can get even more performance.

    thanks for the tip.
     
    theANMATOR2b likes this.
  42. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    By the way - im working on a new world (A snow filled mountain range) for the sequel. Here's a few promo shots:)







     
    BackwoodsGaming and neoshaman like this.
  43. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Nice compositions. The robot has a nice fill light on the right side. Might consider subtle (softer) fill light on the other images as well. ;)
     
    protopop likes this.
  44. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you, for the compliment and the good advice:)
     
  45. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Tested Nimian Legends : Vandgels on iPad Air2 and Mini 4 and performance is better than BrightRidge. Here's some screenshots of my travels from iPad Air2

    The landscape, wildlife, and new shapechanges are working great, and performance is even better than BrightRidge so far. I've learned a lot from my last game, which I'm still updating, and I've worked hard on the story. I'm looking forward to releasing the game this fall :)



     
    theANMATOR2b likes this.
  46. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    hey what would you suggest for adreno 306+opengl ES 3.0 + dx9 and 1gb ram? i wanna create a terrain for android.
    thank you
     
    protopop likes this.
  47. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    I dont know android that well, but my game needs at least 2gb in general - so i would use a small terrain like 1024x1024 or 2048x2048 if you dont use too many textures. Its kind of a mix between how much texture memory you use and the cpu which makes the performance. I would run a test on your device to see - i have a nexus 5 and i try to make sure things work on it as my base android model.
     
    mukki014 likes this.
  48. Muneebrehmanafridi

    Muneebrehmanafridi

    Joined:
    Jul 19, 2016
    Posts:
    1
    Hello brother, as an environment designer for mobile games. i wanna ask a question about terrain vegetation up to long distance view.
    i do follow your all above explained procedure with using latest version of terrain composer 2, but still i have more batches then 1200 or 1500 with 150K verts, which kills the performance of our game, how can i optimize my following shown scene.
     

    Attached Files:

    protopop likes this.
  49. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Great game as always.
    I wonder why the grass and trees does not have snow on snow floor :rolleyes:
     
    protopop likes this.
  50. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    wow thats really pretty

    For vegetation its pretty basic:

    Offer users options to change grass density and distance - and set it automatically by device type - on earlier devices my grass density and distance is much lower

    Lower your tree billboard distance

    Limit Max mesh trees to something like 16

    Check your grass patches amount on your terrain settings - i dont remember off hand but in general i lowered these

    It also depends on how much else you have going on in your scene - and i only get high rame rates oin newer devices - there are plenty of players who have compkained about low framerates on my game over time - i just have to accept it and i keep optimizing other parts of the game in each update which can overall improve things - for example simplify your AI scripts

    looking forward to seeing your game