Search Unity

Terrain 4 Mobile System

Discussion in 'Assets and Asset Store' started by SJAM, May 15, 2011.

  1. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    for a while, I was afraid that it is because of my last update. But its not that.
    I have try on 1.5x versions of my T4M, no problem for me. It's works fine.

    So, I don't know why you have this problem... I suggest you to try again on new scene to see if you have the same problem.

    Keep me aware ;)
     
  2. markofjohnson

    markofjohnson

    Joined:
    Oct 12, 2010
    Posts:
    68
    Hi there. I'm comparing Unity terrain with T4M for use with iPhone ES1.1 and 2.0. I've downloaded the Lagoon demo and have deployed it to an original iPhone as well as a 3GS. On the original iPhone there is no cliffs or beach, but there is water rocks and trees. I'm guessing that I need to switch out a shader that works on ES 1.1? How can I fix it?

    How do I move around the Lagoon in the Unity game window / emulate touch input with the mouse or keyboard?

    Our needs are:
    - larger terrain for a flight sim game, no terrain details needed (ie OK without trees or grass)
    - at least 2 terrain textures, preferably 3 but could get away with 2.
    - willing to build or integrate a tilling or LOD system if needed to get a larger world
    - main target arm7 devices, don't care ES 2 or 1.1.
    - would like to support arm6 devices if possible. (This is possible with Unity terrain, but only with the base terrain texture)
    - would like to get it under 20mb (may be impossible)
    - don't mind editing terrain in a heightmap tool or a mesh editor

    Can you comment on how T4M might fit our needs?
    Many thanks.
     
  3. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    @Azert2k

    Do you know witch terrain is faster?
    Yours or the unity own version now on 3.4
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    T4D is worlds faster.

    The Unity own is by far too heavy in nearly every case as already a handfull of collider with rigidbody or character colliders will create so much cpu strain that you really learn to suffer (tested on 3GS, which is what you want to target as low end at the time). Even the 512x512 T4M terrain is significantly lighter

    also due to the nature of unity terrains depending on many textures from which its generated at startup, its quite a bit slower on the loading end


    Realistically seen you should potentially model your whole environment for a mobile game to get best performance at highest detail, the second best is T4M and the lazy and expensive is Unity Terrain
     
  5. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Do you mean model my environment that i only render and then have simple colider?
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    For example yes.
    Tahts the most optimal form because it uses detailed meshes only where you need, low quality in the rest, you have explicit control over batching etc if you do it right, can opt for occlusion culling etc
     
  7. pneill

    pneill

    Joined:
    Jan 21, 2007
    Posts:
    207
    Is there a way to plant more than one tree at a time. I would love to "mass plant" trees or at least to have a larger brush size.
     
  8. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Sorry, I'm away from any keyboard for now, except my phone :)

    Thank a lot, Dreamora, for help.


    @markofjohnson

    "larger terrain for a flight sim game, no terrain details needed (ie OK without trees or grass)"
    You can add as much T4M Terrain on the scene you want (you can control the detail of each part)

    " at least 2 terrain textures, preferably 3 but could get away with 2"
    T4M is deliver with a lot of shader 2,3,4 textures.

    "willing to build or integrate a tilling or LOD system if needed to get a larger world"
    Sorry, but this part can cost a lost of performance and become like Unity Terrain.

    "main target arm7 devices, don't care ES 2 or 1.1,would like to support arm6 devices if possible. (This is possible with Unity terrain, but only with the base terrain texture)"
    In shader list you can find MBX shader, but I don't think that the performances are good on Pre-3GS...

    "would like to get it under 20mb (may be impossible)"
    Depend of the size of meshs, and others thing of your project.

    "don't mind editing terrain in a heightmap tool or a mesh editor"
    Edition of meshes must be made before the conversion on T4M terrain.

    @M_Stolley
    as said Dreamora, the T4M is more adapted and more faster for the mobiles.(for now...)

    @pneill
    "Is there a way to plant more than one tree at a time. I would love to "mass plant" trees or at least to have a larger brush size"

    I did not do a "mass plant" by choice, because I wanted to master the exact number of trees wanted on the scene.
    Many people, who use T4M for the Unity WebPlayer, ask me to adapt T4M for the WebPlayer also with :

    - Mass Planting
    - More complex shaders (for SM3 for exemple).
    - etc...

    I will make this, very soon... I have not much time available at the present time... too much jobs in same time.
     
    Last edited: Aug 23, 2011
  9. markofjohnson

    markofjohnson

    Joined:
    Oct 12, 2010
    Posts:
    68
    I have purchased T4M and am now exploring it. Does T4M support both ES2.0 and 1.1 in the same game? Ie one binary and then in code I switch in the correct assets needed depending on iPhone 3GS vs an older device? Looks like I can share the same terrain, but have to paint the textures on it twice and have 2 copies of the splat maps?
     
  10. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    In Fact, if you want share the same scene for all device, you must use : 2TexturesGLES1.1Shaders -> 2TexturesVLMBXSGXGLES1.1, but you can't use LightMap. On MBX device (pre 3GS) the Terrain is Double (2x vertex and 2 drawcall)

    I encourage nobody to use the T4M for pre-3G, performances are not good on these devices at the base with complex 3D scenes.
     
  11. Bryan

    Bryan

    Joined:
    Feb 27, 2011
    Posts:
    36
    Hello. I have a few questions.

    1. Under graphics Emulation I have
    No Emulation
    Shader Model 3
    Shader Model 2
    Shader Model 1
    DirectX7

    Which is the equivalent to "OpenG LES 2.0" Like in the tutorial?

    In the T4MS Window on the leftmost button I have "Change GLES2 Shader --> GLES 1.1Shader" right underneath. Is this related?



    2nd, When I add my tree objects they appear sideways. how do I fix this? Also, what if I want them to be bigger than the the "50' value?



    3rd. I noticed that placing the trees puts them into a folder in the hierarchy, which you can select and move manually. Are they intended to be treated like normal game objects? Or are they intended to act like the default Unity Tree painting trees where you can't select them?



    4th. I can't seem to get the "Layer Manager" to work. Whatever my sliders are set to, I constantly see all my trees.



    5th. Do you have any plans to update the tutorial? my screens are different, and it's a little hard to follow.



    Thanks!
     
  12. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    1. Under graphics Emulation I have
    No Emulation
    Shader Model 3
    Shader Model 2
    Shader Model 1
    DirectX7

    Which is the equivalent to "OpenG LES 2.0" Like in the tutorial?

    You have this emulation only if you target mobile device. Not need for others case.


    In the T4MS Window on the leftmost button I have "Change GLES2 Shader --> GLES 1.1Shader" right underneath. Is this related?

    Yes, only if you want change your T4M terrain GLES mode. Now on GLES 2, all shader work over 25fps, also in HD.

    2nd, When I add my tree objects they appear sideways. how do I fix this? Also, what if I want them to be bigger than the the "50' value?

    You must have tree center axies at base of your tree, like for unity terrain.



    3rd. I *noticed that placing the trees puts them into a folder in the hierarchy, which you can select and move manually. Are they intended to be treated like normal game objects? Or are they intended to act like the default Unity Tree painting trees where you can't select them?

    Like normal gameobject, not like Unity tree terrain.



    4th. I can't seem to get the "Layer Manager" to work. Whatever my sliders are set to, I constantly see all my trees.


    For that, you must use T4M camera (last T4M), after add T4M camera you can tweak tree distance view.

    5th. Do you have any plans to update the tutorial? my screens are different, and it's a little hard to follow.

    Yes sorry, I will make that soon.


    Best Regards

    Azert2k
     
    Last edited: Sep 7, 2011
  13. Bryan

    Bryan

    Joined:
    Feb 27, 2011
    Posts:
    36
    Thanks for such a quick response! In response to my first question, We are targeting mobile devices. (I don't know what kind, or even what the differences are between them.) I'm more of an artist than a developer. From what I read in the Unity documentation, the Graphics emulation just makes the scene in the editor look like how it would look on lesser graphics cards. If this is the case, is it something I can switch around? Or even have off entirely, and has no effect on the final game(just helps preview more accurately in the editor)? I ask because it's the first option, and I would hate to pick the wrong one, and then start making my land, then mid project realize the I screwed up the first step and have to redo everything.
     
  14. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    In fact, if you target the mobiles devices (you have mobile licence) so go to files menu -> Building Settings -> select mobile icon (iOs or Android) and click on Switch Plateform...

    Now you have the graphic emulation (opengles 1.1, 2), so, the good environment to targeting on mobiles devices with a graphic preview and script debugger for mobiles (some things are different between mobile targetting and others devices)
     
  15. Bryan

    Bryan

    Joined:
    Feb 27, 2011
    Posts:
    36
    Thank you. That helped a lot! Now I'm running into an issue where I can't texture paint the edges of the terrain. The texture is whatever my first slot is. I've tried bringing the terrain.png file into Gimp, and manually painting it, but upon reimporting into Unity the texture doesn't work properly. The red(alpha) is now black. What am I doing wrong?
     
  16. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Ok, to paint correctly the edges : choose the sqare brush.(last brush of the list)
     
  17. jackson5759

    jackson5759

    Joined:
    Sep 18, 2011
    Posts:
    3
    Hi Azert2k,

    I have some problem when I baking my beast lightMap. I have a house model that i import from Maya (fbx). The house placed on my terrain. I have change it to T4M and painted it too. When i bake my lightmap, it seems that there is red color and green color light bleeding on my model. I believe this red/green color is from the "terrain.png" which i think is the masking color.. can i know how to get this be done?

    thanks..
     
  18. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    I think It's because the mask is on MainTex... thank for reporting, I will made an Update for this soon.


    until the next update, remove the mask texture on the shader before the lightmap process
    and replace it after.


    I'm leaving my house for another one in this time, and I won't have an Internet connection during a little moment, so I will put a little time to make the future update

    But I keep in touch with my iPhone for an emergency.


    Best Regards

    Azert2k
     
    Last edited: Sep 18, 2011
  19. jackson5759

    jackson5759

    Joined:
    Sep 18, 2011
    Posts:
    3
    Hi Azert2k,

    Thanks for the fast respond. This is a great tool for Unity Mobile.

    Can i know when i move my camera close to the planting, it starts to lag for a while and when i navigate away (further) from the plant, it become smooth again.. Is this normal? Cause i'm actually putting the trees by T4M then i make all the trees as combined children to reduce my drawcalls. I don't think this is anything do with the tris cause I tried to use my import model and make it to more than 200k tris, it doesnt lag like when i navigate close to the plants.

    Is this normal?

    Thanks for the great tool in UNITY!
     
  20. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello and thank a lot,

    This problem is transparent shader performance reason... In fact,the transparents shaders are very heavy for mobile system, so to optimise a little use 128x128 texture and blend shader(cutout shader is too heavy) and use unlit transparent shader : in my lagoon scene I have the same problem with grass but less with my tree shader. Try to make a tree mesh with no transparency shader, your performance will be increased.

    For my future update I will try to make a best transpent shader.

    My best

    Stephane
     
  21. jackson5759

    jackson5759

    Joined:
    Sep 18, 2011
    Posts:
    3
    sorry that i'm too noob.. can kindly teach me how to make the blend shader unlit transparent shader? sorry..

    are you saying alpha blending for blend shader?
     
    Last edited: Sep 19, 2011
  22. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    Alpha testing shader can be found in : Transparent/Cutout (lit) or Unlit/Transparent Cutout (decrease dramatic performance but have Z write)

    Alpha Blending shader can be found in : Transparent/ or Unlit/Transparent (best performance than Alpha testing, but they don't have a Z Write, so a mesh can appear like blended with other one)

    Mix between Alpha testing/Blending, very heavy shader.

    So on mobile, avoid a maximum of transparency shader.

    Best Regards

    Stephane "Azert2k"

    You can try with my tree shader in TerrainForMobile/VegetationT4M for good perfomance but sometime les mesh can appear blended.

    Or you can make trees with opaque leaves and forget the transparent shaders for best performances.

    Best Regards

    Stéphane 'Azert2k'
     
    Last edited: Sep 19, 2011
  23. mrlarad

    mrlarad

    Joined:
    Sep 26, 2011
    Posts:
    5
    hello i purchase t4m but i can't build terrain in my iPhone 3g 8G i try mbx lite ,opengl 1.1 nothing the splash screen look at me lol
    what is the configuration to works for iPhone 3G 8G.
     
  24. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    " the splash screen look at me " lol

    Thinking to make a T4M terrain under 3k vertx because on mbx, the number of pass for terrain is 2. Like I say before, it's strongly recommanded to use T4M on 3Gs+ for performance reasons.

    Best regards

    Stephane
     
  25. davidrivera

    davidrivera

    Joined:
    Apr 8, 2009
    Posts:
    19
    Hi Azert2k,

    T4M is a fantastic product. Will T4M work with Unity 3.4.1? T4M works great with Unity 3.4, however, I want to upgrade to Unity 3.4.1 but I won't if it causes problems with T4M.
     
  26. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hi and Thank !

    You can update Unity, no problem with this update.

    Have fun :)

    Best Regards

    Stephane 'Azert2k'
     
  27. orrtcloud

    orrtcloud

    Joined:
    Aug 3, 2011
    Posts:
    45
    Hi Stephane,

    So can we use normal Unity terrain scripting functions with this? My ships need to know where the ground is :). Also, I looked at teh performance link on your site but there are no benchmarks. Should there be? I think some comparisons to Unity's terrain would be good.
     
  28. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    The T4M terrain have mesh collider, not unity terrain
    collider and have his own function. Conversion, painting
    and planting. Not the same like unity classic terrain. For
    performance, I have re-write all shader on last update and
    performance are very increased, so, I wait home internet
    connection(I have moved on other place) and I make that ;)

    sorry for my english, I'm on the iphone, without translator for syntax
     
  29. vonknut

    vonknut

    Joined:
    Oct 7, 2011
    Posts:
    5
    Hey just bought it and are looking forward to have my leves look sexy while keeping performance :)

    But:

    1)
    When I'm converting a terrain that is not a square (e.g. W32,H16,L48) it comes out as a square after conversion.
    -even though I manually indput the correct sizes.

    Any ideas what I do wrong?


    2)
    And when I'm far awar from the terrain, but try to paint textures on it, the textures appears another place. But when I zoom in, they appear where my brush is.
    -is that just "life" or is there a easy fix for this?


    Edit:

    3)
    And is there anyway of reimporting a splatmap on a new-processed terrain?
    -e.g. when you found out that some of the geometry needed fixing, so you find the old Unity-terrain, tweak a bit, reprocess it in T4M, then want to modify the splatmap a bit.


    4):
    And lastly, bought and installed fine on my desktop computer. But when trying to import it on my laptop (same unity / assetstore license), it doesn't show up (even after restarting unity).
    -is it "one computer only" or am I doing anything wrong?

    FOUND THE PROBLEM => when installing the "lagoon" demo, a "standard asset" folder appears in your unity project, which conflict with the "Terrain 4 Mobile" installation.
    => so don't install the "lagoon" in another project, where you want to use "Terrain 4 Mobile".
     
    Last edited: Oct 11, 2011
  30. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello and thank for your buying,

    Now I just my phone and 3G connection. So, tomorow at my work, I will helping you.

    Best Regards

    Stephane

    Edit :

    ok, fine :) if you want contact me directly : azert2k@gmail.com

    My Best

    Stephane "Azert2k"
     
    Last edited: Oct 11, 2011
  31. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    HI Azert2k.
    I bought your t4m package recently and it works great.

    But I have a problem. I am using opengl es 2.0 and 3 layers of texture.

    The textures on the ground seem to loose dithering and look pixelated. This happens on the galaxy tab 10.1 and not on my se x10 mini.

    Do you know what it could be? Thank you.
     

    Attached Files:

  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Either:

    1. texture isn't set to bilinear filtering

    or

    2. Tile it less, failing that, you need to raise precision in the shader (this is slightly slower so is optional)
     
  33. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi hippocoder.

    I am using the same texture with the unity terrain and in the galaxy tab it shows just fine. (It has bilinear filtering enabled)

    I can't understand the 2nd thing you said. How can I raise precision in the shader?
    thank you.
     
  34. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
  35. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Thanks Azert2k.
    A project depends on this and I want to know if I can use it.
    As I said above the inbuilt unity terrain shader works but not the t4m shader.
    Thanks again.
     
  36. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Weird ! My shader is similar that unity terrain shader, but my shader have some optimisations...

    Have you trying the "3texturesdiffusesimple"? Or have you trying the 2 others ?

    Tell me that,to know if it my shader or not, because the "3texturesdiffusesimple" have just light optimisation, so you must have the same result than unity terrain shader.

    If you have the same trouble, chevk if your texture have "point" filter mode and replace by bilinear.

    Keep me aware :)
     
  37. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi Azert2k. It seems that your shaders are just fine.

    The problem is in the tiling of the texture layer.

    More then 20x tile the texture looks unfiltered.
    Do you know how I can overcome this?


    Also I cannot create a mask texture higher the 512x512 (512x512 produces a 256x256 mask
    texture and 1024,2048 produce a 512x512 one).

    @Hippocoder. How can I raise the precision in the shader?
     
    Last edited: Oct 18, 2011
  38. orrtcloud

    orrtcloud

    Joined:
    Aug 3, 2011
    Posts:
    45
    This might sound like a basic question but what exactly does a mask texture do? Add depth or something? How do I make one?
     
  39. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    @elias_t

    On my Asus Transformer, I have 54x54 tiled textures (256x256), and I don't have any problem... I have try with 512x512, no problem too.
    If you have the problem only on galaxy tab 10.1 and not on my se x10 mini (like my Asus Transformer), I think is more an galaxy tab driver problem.

    Other idea, after finish, duplicate the mask texture and change RGBA32 format by an Android compressed format, before build the scene, and replace the original by this last. (maybe the Galaxy ab, don't like RGBA format)

    Caution : if you want paint again, think to replace the compressed texture by original texture.

    Try to make a more big texture(512x512), with more tiles on the same texture, to avoid a maximum of shader's tile.


    @elias_t and @orrtcloud

    the texture mask is used to combine other textures, but has no effect on the depth of the other textures. it is RGB32, Readable, and don't have mipmap. The difference in size can affect the accuracy of the mixture, but not the texture filtering.

    When I will again have my internet connection (I moved), I would do an update for the size of the texture mask, to use 256x256, 512x512, 1024x1024 and 2048x2048 (for web and PC)... if you can't wait, send me a email at azert2k@gmail.com I would give you the change to make on the script. (think to send me InVoice code of the buying on the mail).

    Best Regards

    Stephane 'Azert2k' Jamin
     
    Last edited: Oct 18, 2011
  40. sergio_gamelancers

    sergio_gamelancers

    Joined:
    Apr 11, 2011
    Posts:
    9
    Is there a max width for terrain? I need to build a terrain around 16000 x 16000 by image 2049x2049?
     
  41. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello Sergio,

    Too large for mobile !!
     
  42. sergio_gamelancers

    sergio_gamelancers

    Joined:
    Apr 11, 2011
    Posts:
    9
    How long could I build one?
     
  43. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    So,

    I recover my internet connection...

    I appeal to you to help me to plan the Terrain4mobile roadmap.

    So, post here what you would like to see in the next updates of T4M. (fix, new features,etc)

    I would study the feasibility of your requests, for implement them in the T4M.

    Thank of your interest and your participation.
     
  44. petero181

    petero181

    Joined:
    Feb 23, 2011
    Posts:
    104
    Hi, Terrain 4 Mobile System is a great terrain for mobile, I just bought and in developing next games. But I have a little problem on seagull. for example : in scene01 i use seagull ... and when I go to scene02 n use seagull too, I got this error :

    MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Transform.get_position ()
    SeagullAI.LateUpdate () (at Assets/PairMe/Scripts/ScriptFromLagoon/SeagullAI.js:21)

    The error message are in LateUpdate() ... what should I do ...
     
  45. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello,

    Seagull script is just for demo :)

    I will see that, tonight and I keep you aware
     
  46. petero181

    petero181

    Joined:
    Feb 23, 2011
    Posts:
    104
    Hi, yes I know this script is just for demo. I need the script for my games. And just figure it out. Its fixed now ... thx for your response. Nice Terrain. Btw, may I know how to delete unused polygon ? I have just try this step :
    1. edit the terrain in terrain editor
    2. process the terrain into terrain 4 mobile system
    3. get the obj file and import into maya and delete the unused polygon
    4. export again to obj and copy to our game project

    but I found that the result after that are the terrain are too jagged. Any solution, cause I saw your demo terrain are so smooth. thx again.
     
  47. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    I just purchase T4M, but there is an error after importing says: Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js(16,19): BCE0018: The name 'ShootFx' does not denote a valid type ('not found').

    This doesn't happen with FPSInputController.js that come with Unity 3.4.2 but happen with FPSInputController.js from T4M package.
     
  48. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hello all,

    @Petero
    For Lagoon Scene,
    1 - I have made my terrain with EarthSculptor for terrain mesh (this product simplify your mesh).
    2 - In Unity, I have imported the obj, and I convert to T4M, to paint and plant.

    @Sanpats
    Maybe because Unity 3.4.2 update, I will see that, and I keep you aware.

    I will started a new Update, now...
     
    Last edited: Nov 7, 2011
  49. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    It's only happen when I import to my project, and the package override the default FPSInputController.js. If I create new project and import only T4M, there will be no problem.
     
  50. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    It's a problem, with standard asset... If you dont use my control script just import the T4M, not the lagoon scenes.