Home Unity

Unity Terrain

Hi guys im trying to create a game environment using a terrain in unity the problem is the terrain drops my fps drasticaly for 10pfs when before they are 50/60fps... If i try it with a single mesh it stays 50fps..

Right now im using a 500 by 500 terrain with resolution of 1016... Is this too large or wt the hell am i doing wrong here??

Appreciate any help

Replies

  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 20
    This would be expected if you're casting any dynamic lights onto the terrain. Baking should help improve performance (though in unity 5 expect to way a looooooooooooong time to finish that bake, and your lightmap count is going to go up quite a bit).

    In some cases i've had better luck importing a custom mesh instead of using unity's built in terrain, though the range of applications become more narrow with this approach.
  • Paykoman
    Thats wat im thinking about to make, cuz i try use bake lights too and when i over the bake all my bake lights turn off, so i hv no light in scene lol only directional light working xD
  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 20
    Make sure your directional light is set to "Baked Only" instead of realtime, otherwise the renderer will ignore that light
  • gsokol
    Offline / Send Message
    gsokol polycounter lvl 14
    What hardware are you running this on. PC? Mobile? This makes a big difference.

    Seems like a huge drop in performance for what is really a small terrain. Unity's terrain certainly isn't super optimized, but it shouldn't be *that* bad.
  • EthanBurnsides
    Offline / Send Message
    EthanBurnsides polycounter lvl 2
    How big is the terrain map?
  • Eric Chadwick
    How big is the terrain map?
    He says how big in the first post.



    We are using Unity terrains in our mobile game, but only to use the sculpting and painting tools in Unity to match our camera and prop meshes.

    Once we're done creating it, we export it to a mesh and splatmap, decimate the mesh in 3ds Max, then import that back into Unity. Works pretty well.

    The performance and memory gains from using a decimated mesh are significant, for us.

    We also make the Unity terrain into a prefab, so we can drag it back into the scene if we need to edit anything. 
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    MikeF said:
    Make sure your directional light is set to "Baked Only" instead of realtime, otherwise the renderer will ignore that light
    Funnily enough, it's a little haphazard.. I've found that for instance "Realtime" lights get baked into lightmaps as well and I do seem to remember it occuring the other way around as well. I basically disable/enable Realtime lights per script before I start the long, long, long bakes ;)
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    I'd gladly suspect your non standard resolution to be a culprit of your trouble ;) (1016) try to use power of 2 +1px eg 1025 as heightmap resolution or similar number.. 
Sign In or Register to comment.