Search Unity

TurboForest: Unity fast billboard forest rendering

Discussion in 'Assets and Asset Store' started by Alekxss, Jan 23, 2014.

  1. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Better to increase 100000, if trouble with very hight ground mesh.
     
  2. Baldwin

    Baldwin

    Joined:
    Apr 1, 2014
    Posts:
    37
    I got it working, now its mirroring on the other side of the mesh.....its also doubling the amount of tress =slowdowns I got 2,000,000 trees now its rendering 4mil :/

    http://puu.sh/8khmf.png
     
  3. Baldwin

    Baldwin

    Joined:
    Apr 1, 2014
    Posts:
    37
    Along with the mirror fix, how can I change the code where as, the tress only turns with the camera at X (Left Right) and not Y(Up down)

    Pic: http://puu.sh/8kwhE.png See how its not on the mesh still but looking up with the camera? I want it to only rotate on the X axes thing, so it stays on the mesh when looking up or down
     
    Last edited: Apr 23, 2014
  4. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Amount of trees doubling because of shadow render pass I guess.
    Sorry, but right now shader don't have feature to prevent rotating billboards by X axis. Its primary maked to look at forest from bird fly height, from airpne for example. And billboards always facing camera.
    I realy can't say how can it fix fast, because not soppose this feature.
     
  5. venz

    venz

    Joined:
    Sep 25, 2014
    Posts:
    2
    Hello there!

    Thanks for really good performance billboard forest!
    Still working on this project? Could you please try to make tree shadows lightmap-bakable?
    I've got a problem with Beast lightmap baking of shadows of these trees. They are not producing their shadows at all or their shadow is at wrong place in the map.

    Thank you in advance.
     
  6. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Hi, i'm morking on second version somtimes with more features, will check this lightmap bug too. But I can't guarantee it will works, because this forest is not usual mesh and not usual sprite.
     
    MACINA_df likes this.
  7. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    hi here 3 question about process workflow
    so it's working now on android mobile ?
    any way to change Saturation by Hue ?
    any workflow for transform to billboard ? like 3ds max scene or unity please thank's
     
  8. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Im maked version, that good run on Android device (JXD S7800b, with Mali 400 GPU).
    It have brightness and saturation randomizers, chunk-separating and other fixes from this thread.
    https://www.assetstore.unity3d.com/en/#!/content/26354

    But it's paid from now.
     
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Is the version in the asset store v1 or v2?

    Should I be waiting for v2?
     
  10. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    In asset store is something like v2.
     
  11. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Feel free to leave here you features wishes for paid version.
     
  12. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Hmm. When I read this, I thought I understood what you meant, but now I realize you could be saying something else. So let me try to get a clarification.

    Do you mean the current version in the store is close to being v2 already, and it will be fully upgraded to v2 whenever v2 is completed?

    Or will v2, whenever it is made, be a completely different item to purchase in the store?
     
  13. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    In asset store is v2 it's paid and it's completed.
    It use same technique to render trees as free version posted here.
    If there will be any bugs, i will fix it quickly.
    And I want to add some more new trees to it, but cost will be same.

    Free version here is v1.

    Difference free(v1)/paid(v2):
    1. v2 runs on Android devices - v1 is not.
    2. v2 shadow lookup is same as diffuse, it means when sun is near ground - you can see tree trunk in shadow, when sun in zenith - shadow will look like you see tree from upwards. v1 shadows same with any sun angle.
    3. v2 have new trees textures, that more looks like usual forest. v1 have default 3DSMax simple trees.
    4. v2 is generate forest in editor mode, v1 in game.
    5. v2 separate forest by chunks (it improve render speed in some cases), v1 not.
    6. v2 have brightness and saturation randomizers in materila, it means that you can easy adjust it after forest generated. v1 is have only brightess randomizer on generation step.
    7. v2 materials uses one tree per material, it means you can use 1024x1024 tree texture (4096x4096 atlas). v1 uses 4 trees in one texture, and each tree qualyty can be max 512.
    8. v2 trees distribution algorithm is completely different than v1. It's faster, can generate less than 10 000 trees per mesh (v1 have bug with it)

    :) like this
     
    hopeful likes this.
  14. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Excellent! And a great list of features, too. :)

    I remember seeing this thread when you started it about a year ago, but I didn't have it on "watch" so I lost track of it. A couple of days ago I saw TurboForest show up in the asset store, and I thought, "Hey, that guy must have finished his project! It looks great!" And so I bought it.

    I'm glad to see that it is indeed the second version, which is what I assumed it was when I saw the demo.

    You should create a new "[RELEASED] TurboForest" thread so that people new to it don't get confused by all that has gone on before, during development.
     
  15. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    cool and about process to make new tree ?
     
    hopeful likes this.
  16. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
  17. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  18. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
  19. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    not sure it's just one idea who can give autumn style
     
    hopeful and Alekxss like this.
  20. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Thanks, i think it's good idea and i will add it soon.
     
    hopeful likes this.
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I guess a winter scene, where the deciduous tree model has no leaves, is also a possibility.
     
  22. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Sure, you can render to texture anything you want :)

    Maybe it will better to change texture HUE in Photoshop, to discard additional calculations in shader?
     
  23. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    New textures for autumn and winter trees seems like the best solution to me.

    Will leafless trees cause problems for the tree shadows?
     
  24. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    No, all must be cool :)

    Not big deal, anyway i want to add some more trees.
     
    hopeful likes this.
  25. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Yes i buy it's beautyfull gift Christmas i'am happy
    back later after mobile try for this time we lost mesh when make prefab with him
    so it's impossible to instantiate and maybie one minimun range close on generate can be welcome
     
  26. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Thanks, i hope this tool will save your design time.
    I don't understanding this, can you say in another?
     
  27. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    Purchased! Was always a fan of this work. Thank you!

    My requests would be: (keep in mind that I haven't played with the new version much yet)

    - A 'spherical' mode where the normal is based on the center of a sphere (or 0,0,0) for each vertex

    - Ground cover support - add basic grass/brush to the ground beneath the trees

    - Support for a tree map of sorts, where one channel is the size? of the tree, one is the type? and the other represents the position of a gradient to apply to the tree at the map point (i.e. green -> brown)? (this could be extended into a simple tree 'painter')

    - Mesh -> Billboard renderer (maps to tree type in tree map)

    - Shader leaves - use 'bare'/winter version of a tree for billboards, instead only apply leaves in the shader so they can be controlled by a tree map type/size/gradient. This would let you animate leaves blowing off of the trees by spawning leaf particles while reducing the leaf count in the tree map for that tree.
     
  28. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Nice :)

    That's a heavy requests and some of them can break main concept "Turbo" of this tool :D

    But anyway, i will keep in mind all requests from this post when next time continue developement.
     
  29. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    possibility to get only 360 shader for make other stuff like grass with maybie only 4 side for get 4 variation in one texture
    perfect for mobile
    for exemple i have try
    it's close to good but we can do better :)
     
  30. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    360 is a bad idea. It need more frames per texture. Even now, each tree have 16 frames (let's say camera angles) and even 16 it's too low.
    But ok, let's count all.
    16 frames(angles) is 1/4 of full 360 turn.
    Regular model will need 1 full turn for each of 16 angles, i.e. 16*4=64 and it's only one angle when camera looks forward.
    16 angles * 64(360)frames = 1024 frames.
    Maximum possible texture size is 4096 usual, so each frame will be 4x4 pixel size :) that's not acceptable.
    Of course we can decrace frame size, but it prevent more twitch visible when frames changed.

    And even if we decrace angles(frames) count to 4 per 1/4 of turn it produse each frame size 16x16 pixels, thats not acceptable too.

    So if my mathematics is correct - for smooth animated model turn in billboard texture 360 is not possible now.
    Sorry if make you sad :(
     
  31. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  32. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
  33. Novus Inceptio

    Novus Inceptio

    Joined:
    Dec 7, 2014
    Posts:
    36
    PizzaGuy213, Alekxss and jason-fisher like this.
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I was thinking another standard "tree" to have in the kit might be some sort of desert bush. There's a lot of desert to fly over in the world, and most of it is not really bare land.
     
  35. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Realy nice to see it in action :) Good luck with your project.
    But the way. You can some darkening terrain mesh vertices under the forest places, it can give something like ambient occlusion effect withot performance down.
     
  36. Novus Inceptio

    Novus Inceptio

    Joined:
    Dec 7, 2014
    Posts:
    36
    It's not 100% complete.
    I need to replace billboards mainly so that correspond to the flora used in the game.

    But basically it's OK with regard to what these "fake" trees meet;)
     
  37. PizzaGuy213

    PizzaGuy213

    Joined:
    Nov 23, 2010
    Posts:
    305
    First off, very cool and handy asset!

    Question: Would it be possible in some way to integrate your system with the new speedtrees, basically replace the billboard LOD group of speedtrees with your system.? We mainly use speedtrees in our project, and could really use your system as a solution for the birds eye view. It probably would be a very usefull system to a Lot of people :)
     
    Last edited: Mar 12, 2015
    hopeful likes this.
  38. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    I thinking about this a little, and tryed to combine mesh trees with TurboForest - not give acceptable speed and i droped this idea.
    Techicue is simple in fact.
    We ned to render Unity tree (or any tree) in TF atlas, it's not big deal with Unity.
    Next, place TF quads according usual trees positions\scale.
    Render all with 2 cameras, where first is render far LOD (turboforest) for example near clip 50 far 1000
    And second camera from near 0 to far 50 which renders usual mesh trees.
    It realy works, but even 1km x 1km native density forest renders too slow in my tests.
    Anyway, thanks for the tip ;) I see that TF users want's to render own trees easy just in Unity editor and will work on it.
     
    hopeful likes this.
  39. PizzaGuy213

    PizzaGuy213

    Joined:
    Nov 23, 2010
    Posts:
    305
    Hi Aily,

    Just to be clear, I really meant just to use TB as a replacement for Speedtree billboards, not the mesh trees.

    Like this: Turbo Forest Scene Example.png

    and having it set up with the Speedtrees like this:

    Turbo Forest LOD group Example.png


    So the mesh trees would just be normal speedtrees, but Turbo Forest does all the billboards.

    That would be fantastic!
     
    hopeful likes this.
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I have always thought of the Turbo Forest trees as fast trees that can be used to make the not-so-close part of a forest or even trees in a slightly distant urban scenario. I've not actually tried to implement them yet, so what is it that stops you from using them in conjunction with the SpeedTrees (and other trees) right now?
     
  41. PizzaGuy213

    PizzaGuy213

    Joined:
    Nov 23, 2010
    Posts:
    305
    Well, I was mainly curious if that is a possibility, mainly with an eye on the mesh batching.
     
  42. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Hi Aily,

    I had a question. I'm developing environments for the oculus rift and what the rift does on tree billboards is they sway up down left and right really bad almost to the point where the billboards feel like there dancing around you as you move your head around the scene. This billboard system is perfect so is there a way to use this billboard system but not have the billboards face the camera at all they just stay put and not move at all. If so its an instant buy for me. Please let me know. Thanks.

    -Miguel
     
  43. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    It's realy fast shader code, which facing trees to camera. It not do LookAt function, just each billboard always at same direction that viewport plane. That is why you se how trees rotating while rotating view.
    I still thinking how rework it and stay fast speed, but current don't have good ideas.
    Anyway, if we can fix rotation and make real quaternion lookat - when you move in scene - trees will be turning and facing camera, but turn(non orbital) will be fixed.
     
  44. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Is there a way in the Turbo Forest free package I can see the billboards not moving at all they just show up and stay put. Can you tell me if there are some lines of code to change to see that happening. I just want to see that happening so I know it works and buy the system then get back to work on what Im working on. So what I am trying to do in the oculus rift is use real 3d trees in front of you then in the background use this system so the billboards dont need to be facing you just created and not move at all.
     
  45. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Any idea of when an update of Turbo Forest for Unity 5 might be released?
     
  46. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Working on it :) trying to combine TF with new lighting system, make it better and add features requested here.

    :) true lookAt rotation seems like not acceptable

     
  47. Novus Inceptio

    Novus Inceptio

    Joined:
    Dec 7, 2014
    Posts:
    36
    On the Unity 5 everything works fine - although I have therefore much modified version of the basic TurboForest - basically rewritten for the needs of my project and SpeedTree, but it works.



     
    radimoto, hopeful and mgear like this.
  48. Alekxss

    Alekxss

    Joined:
    Mar 25, 2013
    Posts:
    170
    Looks great!
    Paid version have problems with attenuation (it's too bright) and not affected by GI, only ambient.
     
    Novus Inceptio likes this.
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    It's looking like getting TF and SpeedTree working together is going to be a common need.
     
  50. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    nice i waitting for unity 5 too and maybie compability with horizon[on]