Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[BETA PROGRAM] Landscape Builder - realworld, GPU acceleration, prefab placement

Discussion in 'Assets and Asset Store' started by sstrong, Apr 30, 2016.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Is there a reason why you need to use the Legacy terrain textures? As explained earlier, these are only for people upgrading projects from Unity 4.x.
     
  2. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    No, I only switch to that because I consider it "battle tested", so I use it when I want to see the effect of switching the terrain shader.
    I also bought 3 modules for Microsplat, so that will be my final solution, but I still have to verify that it won't eat my framerate, so I'm not yet stable on using it, must first set it up and test it.

    Btw, the black textures on terrain are due to the GPU rendering.
    Just rendered them after activating it: black.
    Switched it off, rerendered: correct.
    I have a GTX 750 Ti.

    I also pushed the specular of the third texture to 1 and rerendered the textures. No change.
    Set specular at 0.012, no change.
     
    Last edited: Sep 30, 2018
  3. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Can the size of a terrain be changed?
    I can't find a way to do it... and I find it very limiting that I have a template that I set in example to 2000 to make my tests and reach the "final" result and then I can't scale it up to have the complete terrain.
     
    Last edited: Sep 30, 2018
  4. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Did you get any errors or warning in the console when it rendered a black terrain on the GTX 750 Ti? Also, are you using Mac OSX or Windows? And which OS versions?
    We do know of an Texturing GPU issue with Win10Pro and U2018.3.0b1 (which we're currently working on fix for).
     
  5. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Windows 7 Pro, Unity 2018.1.6f1, 32GB RAM.

    I didn't check the console, sorry. I'll do next time.
     
    sstrong likes this.
  6. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    You should be able to apply a template to a landscape of a different size.

    1. From the Landscape tab, Save Template
    2. Create a new Landscape of a different size (can have a different number of terrains if you like too)
    3. Apply the saved Template to the new Landscape in the Landscape tab. You can selectively import and apply different components from the saved Template.
    There is more information on using Templates in the section in the manual on page 25.

    There is also some more information here in a post on templates.

    You can also import the Template Package into other projects or even send them to other team members located in other parts of the world.
     
  7. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Ahhh sorry I didn't see that you can apply a template to a terrain! :mad::confused:
     
  8. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Far texture much more specular than near texture. LB Standard.
    Oh and of course this terrain has NO smoothness applied to any texture.
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      57.4 KB
      Views:
      741
    • 2.jpg
      2.jpg
      File size:
      58.8 KB
      Views:
      700
    • 3.jpg
      3.jpg
      File size:
      61.1 KB
      Views:
      695
    • 4.jpg
      4.jpg
      File size:
      61.3 KB
      Views:
      701
  9. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Ok. What style of game are you building? You mentioned creating something that had landscapes 40km x 40km. Most AAA games with large development teams and big budgets are smaller than that.
     
  10. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    It's an off-road racing game, something like the Paris-Dakar but MORE off-road.
    There will be short stages of around 5 Km, but also long ones of around 30 Km, where the player will have to run for half an hour to complete the stage.
    Also, I will use the same terrains for more than one stage of the tracks.
    Up to now my tests show the feasibility of the product is positive, and my graphic board is only a 750 Ti.
    I'm still at around 150 fps with all the image effects that I plan to put on the camera active, so there's plenty of room to drop the quality for less powerful PCs.
    I also have several years of experience in videogame production in a AAA company, so I'm not completely blind on what I'm doing :D:p
     
    Last edited: Oct 1, 2018
    sstrong likes this.
  11. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Placing prefabs... seems that somewhere after 6000-7000 prefabs placed, the tool gets mad and messes up all the hierarchy in the scene. Tried over and over. It works correctly up to these numbers (even though only some terrains are affected, some remain completely empty), past that it's a mess.
    I deleted the objects manually and repopulated automatically and it seems all ok, but the limit remains.
     
  12. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Ok. Have you tried the same using a Uniform Group from the Groups tab? You can use the Convert button on the legacy Mesh/Prefab tab.

    What settings / rules are you using where some terrains are not populated?
     
    Last edited: Oct 2, 2018
  13. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Wait, I didn't check well.
    All therrains get populated.
    It's only that I didn't see that you create an additional sub-object for each mesh.
    So, only the number of objects problem exists.

    When it happens, the objects are distributed out of the LB main objects through all the already existing elements in the map list.
    It seems the tool is misreading the number of objects to place per Km: it places many more.
    In example, I have now 2 objects placed: one is max 10 times per SqKm, the other is 15 times.
    The LB terrain is composed by 25 chunks (5x5).
    In total, they should feature 250 + 375 objects.
    But Landscape Stats says prefabs in landscape: 9322.
    Duh and for now at 9322 I didn't get the problem of prefabs dispersed in the map list...
     
  14. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Ok, if you send me a template I can test that out. Also, where possible use Uniform Groups from the Groups tab. I've added a note in the next build. Uniform Groups should be faster than Mesh/Prefab tab in most scenarios as it uses a different optimisation algorithm.
     
    PolyMad likes this.
  15. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    For anyone testing the experimental GPU Texturing in LB, there is a known problem with edge blending between textures. We're working on a fix.

    It would be great if someone could try Texturing with GPU Acceleration enabled on Mac OSX Metal. Let us know if you see any errors or warnings in the Unity Console. Knowing the graphics card model would be a bonus for us.
     
  16. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    I tried GPU rendering with different terrains and settings, it always gives me back black textures near. Far zone looks ok.
     
  17. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Which version of LB? Is this Mac or Win10? Make sure you're on the latest build of LB (currently 2.0.6 Beta 4u). Also, check for warnings or errors in the Unity Console.
     
    Last edited: Oct 5, 2018
  18. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Unity 2018.3 Support Announcement

    In preparation for the release of 2018.3, we've added support in Landscape Builder 2.0.6 Beta 4v and newer.

    Let us know if you see any issues. Please tell us:
    1. The LB version you are using (e.g. LB 2.0.6 Beta 4v)
    2. The Unity version (e.g. U2018.3.0b1)
    3. Any warnings or errors you see in the Unity Console window
    4. If possible, how we can re-pro your issue
    LB should now work correctly with the new terrain system and nested prefabs. We've also fixed some issues with GPU Acceleration.
     
    Last edited: Oct 5, 2018
  19. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Win 7 on i5 with 32 GB RAM and 750 Ti but only 2 GB video ram, so that may be a problem... even though I tried with only 4 chunks and still black textures.
     
  20. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Which version of LB are you using (earlier versions had issues on later versions of Unity)? I'm running lower spec Win10 (although I7) with 64 terrains with no issues. I'll also test on i5 later.
     
  21. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Testing and Console Errors

    We work hard to make sure LB runs in the Unity Editor with no errors or warnings. Please keep an eye on the Unity Console. If you see any warnings or errors generally it means something has gone wrong and (probably) needs reporting in this forum.

    We build in a LOT of error checking so that (hopefully) you'll be informed when things aren't working correctly. Reporting these (preferably with re-pro steps), helps us improve the stability of the product.
     
  22. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Sorry, forgot about that: 206 B4d on Unity 2018.1.6f1.
    I have a persistent red error about Surforge though, but it shouldn't affect this.

    I LOVE that philosophy of not having errors in the console!
    Got none in fact on this Beta either!
     
  23. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Thanks. Fixed lots of bugs since then. Try 2.0.6 Beta 4v
     
  24. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    You could also try enabling the (incomplete) topography gpu acceleration with a perlin base layer in 2.0.6 Beta 4v+. If you just get a flat terrain (all 0 heights) then there is something not working with your setup.
     
  25. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    OK going to test it.
     
  26. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    GPU Acceleration for Grass

    upload_2018-10-8_10-46-1.png


    This is now ready for testing. It requires v2.0.6 Beta 5d or newer.

    Please report any console warnings, errors or issues (along with your graphics card specs and OS).

    Grass and Texturing on GPU currently have an issue with height rules when using a lower terrain resolution. You might see some issues along the edges of the textures or grass in the landscape. We are working on a fix for this.
     
  27. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Shortly we'll be testing LB with Vegetation Studio Pro (which is currently in beta).
     
  28. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    I saw another strange bug yesterday, but nothing serious.
    I have a terrain in 4 chunks. When rendering textures, the status bar was holding back of 1 unit.
    In example, when rendering was at 3 chunks, the bar was still at 2.
    When it reached 3 chunks, the bar was at half way.
    Tried with v. 4v, still like that. See attached pictures.
    This, of course, without GPU acceleration enabled, which I am going to try now.

    Btw: the topography GPU acceleration button didn't work for me, couldn't activate it.
    Edit: in 4v it's working.

    1.jpg 2.jpg 3.jpg
     
    Last edited: Oct 8, 2018
  29. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Woohoo blazing fast the texturing with GPU! And no black textures now.
    Topography on GPU changes completely the landscape though.
     
    sstrong likes this.
  30. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Yep, known issue. We've looked at it a few times but haven't come up with a solution yet. It has to do with how the Unity status bars work with Cancel.
     
  31. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    And we haven't really spent any effort on performance optimisation yet. Just trying to get to feature parity with non-GPU. Topography isn't ready yet, still has several, eh, "issues".
     
    PolyMad likes this.
  32. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    This is not in the last build, right?

    One thing: where is the landscape data stored? I see it's not stored in the root object in the scene, I'm wondering where it is.
    I created a prefab with the terrain in mistake. When I deleted the prefab, the terrain was gone and now I don't know where that data was stored.

    Btw: now the template saving doesn't seem to be working correctly. Even including all the textures only creates a small package of 5Kb.
     
    Last edited: Oct 8, 2018
  33. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    The terrain data is stored in the scene. If you delete the Landscape root object you also delete the terrain data. If you create a template you "should" be able to re-create the landscape. I'm not sure if we've tested your scenario - probably did back a couple of years ago... All the meta-data for a landscape is stored in the landscape object.
     
  34. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Sorry, maybe I didn't upload the latest build. 2.0.6 Beta 5f is now uploaded.

    Yeah, you could be in trouble if the terrains got deleted before a template was created.

    Try this:
    1. Duplicate the template you just created (so you still have original)
    2. Click on the duplicate template and go to inspector
    3. Ensure "Populate Landscape" is unchecked
    4. Click Debug Mode
    5. Expand "Topography Layers List"
    6. Are there any elements? If so, expand the first one and see if it contains your settings
     
  35. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    So I can't understand why when I deleted the prefab, also all the terrains were deleted. Shouldn't they stay there and just lose the prefab connection? Also, the root object doesn't show any variables, they are all hidden?
     
  36. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Luckily I had saved a template when the topography was good, and texturing was just at the beginning stage.
    Thank you for the instructions!
     
    sstrong likes this.
  37. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Feature request: placement can be refined with better rules.
    In example, one could be something like "zone acuteness".
    This would allow to put objects just in concave (holes) or convex (peaks) zones.
     
  38. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Colliders don't seem to work for trees in v. 4v.
    Tried both one of my meshes with convex collider set and one existing tree from Speedtree.
     
  39. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Also, if you tick "Export Package" the template will be saved outside the Asset Database which is "safe" from the reaches of the sometimes quirky Unity serialisation and prefab systems. BTW prefab behaviour has changed again in Unity 2018.3 so be careful how you take prefabs of the landscape gameobject. When in doubt, use a Template.
     
  40. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Is this in Trees tab or Groups tab?
     
  41. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Yep, it's on our roadmap
     
  42. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Just tried the following SpeedTrees (without mods from Asset Store), and they all worked fine in Trees tab.

    London Plane Desktop, White Oak Desktop, Green Ash

    Also tried Broadleaf_Desktop_Optimized2 that comes with LB (from the Unity demo assets).

    If you create a new landscape in a new scene, with say the Broadleaf_Desktop_Optimized2 tree, do you get colliders?
     
  43. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    OK, the tree was without collider or something, but I can't understand that of my mesh. That has a collider, the prefab works.
     
  44. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    So all good, or is there still an issue with your tree?
     
  45. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    The tree works, but my mesh doesn't, and it has convex mesh collider.

    I also have another issue, with billboard distance.
    My mesh works correctly (even though the shader is wrong atm, so I have just a black mesh instead of a correct billboard), when I change billboard distance in the terrain settings it's ok.
    But the tree Broadleaf_Desktop doesn't seem to be affected by the billboard distance, I can't raise it past a certain distance. Maybe trees can have a per-item override on this value?

    Edit: found the billboard problem.
    It seems that the SCALING of the trees also acts as a multiplier for the billboard distance.
    It makes sense, as you want a small tree to become a billboard nearier than a large one.
    But I still have some difference in when the billboard is applied: on my mesh it happens farther than on the tree.
    Well, I guess this is not your problem but Unity's Speedtree implementation setup.
     
  46. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    For Unity terrain trees, billboard distance is set (by Unity) at the terrain level. :-(
     
  47. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    OK found the collider problem: at import, for some reason, the collider doesn't get generated.
     
  48. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    When importing the mesh into Unity from a 3rd party 3D modelling tool?
     
  49. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Some problem with mesh collider: I added a sphere collider to the prefab and it works.
    Still have to understand if it's LB problem or Unity.
    Maybe "trees" can't have mesh colliders because of performance reasons?
     
  50. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Oh, yes, this is a Unity thing. You should use capsule colliders when using the Trees tab. If you want to use mesh colliders (which are really slow), add your trees using a Uniform Group on the Groups tab. If you have a lot of trees, don't use mesh colliders.