Search Unity

[Released!] Custom tree importer

Discussion in 'Assets and Asset Store' started by larsbertram1, Aug 19, 2014.

  1. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,015
    I'm having trouble with some custom CTI trees made by Baldinoboy. They look great in his test scenes, but when I bring them into my game project, they don't look nearly as nice. He thinks something is messed up in my project, but I sure can't figure out what it is. I've checked everything:

    * Linear color space
    * Deferred rendering
    * Assigned the ATG_....Deferred shaders to the Graphics settings.

    Using 2018.2.14 on Mac High Sierra.

    Here's a comparison -- test project on left, my project on right. Any idea what the problem could be?

    Kerry suggests asking: Is there a way to have only CTI Deferred Shading enabled when combined with other Deferred shader packs?


    thanks
    Dave

    Screen Shot 2018-11-14 at 10.58.53 PM.png
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    it is quite difficult to spot the difference in your comparison... but the atg and cti deferred lighting shader handle translucent lighting a bit differently.
    cti would not handle grass properly. so you would have to combine both which made the shader a bit more complex and expensive.
     
  3. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,015
    Well, here's another comparison to make the difference clearer. And Kerry has both ATG grass and CTI trees in his test scene, and they all look fantastic --there's softness and subtle gradiations in his scene, while the trees in my scene/project are very harsh. So something is not working correctly on the trees for me.

    tree comparison2.jpg
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    hmm, i can't see any translucency at all.
    are you sure you have assigned the custom deferred shader?
    and if so: which ones?
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,015
    Something was just screwed up in my project. I deleted ATG, CTI and all the tree models, then copied all the latest versions of them back in....and voila, it all looks fantastic again!
     
    Baldinoboy likes this.
  6. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    I just can't praise this tool enough! All my trees are working fantastically and I love it. I even used leaf turbulence wich I didn't think I'd find useful but it's more realistic. Fully tested, works as terrain trees to!




    I'll post a video sometime when it's done but I actually came here to say that making unique trees that's only one mesh with thick branches is doible. For people that might take that approach, just set your trunk wind to low and cut mostly the top smaller branches and it works really well. All my trees started as single meshes actually so the trick here is to extrude them inwards a bit after you cut them.
     
    Zimnel, nbac and Baldinoboy like this.
  7. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    239
    nice results
     
    florianalexandru05 likes this.
  8. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    94
    Hello,

    I think there is something wrong with CTI Lod leaves shader. I have imported cti into empty project, changed color space to linear, switched deffered shaders, opened LOD demo scene and the result is that leaves are not rendered unless it's on the verge of two lods.


    Unity 2018.2.13f and CTI 3.16
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    hi there,
    as you are using unity 2018 you have to use the "new" leaf shader. the folder "cti runtime components" contains a package which will install it.
     
    DrInternet likes this.
  10. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    94
    Indeed, problem fixed. Now that you mentioned it is written in "readme 2018". I guess I was too ocupied with full documentation. Speaking of which: I'm reading that tree creator shaders need double sided geometry. However I noticed it works fine with a single sided one. Wasn't documentation updated to the newer version of CTI or "tree creator" means "build-in tree creator" not "cti tree creator"?

    EDIT: Also, I think there is a typo with a tag table.
     
    Last edited: Dec 3, 2018
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    it means "bult in tree creator shaders". CTI lod shaders are written fro single sided geometry.
     
  12. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    So here is the CTI_trees working with animated lods and everything! I made video for all the trees as well but will post after I finished the merged video.

    Video Deleted
     
    Last edited: Dec 9, 2018
    Willbkool_FPCS likes this.
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    i like it!
     
    florianalexandru05 likes this.
  14. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    Thanks, here's the final tech video for trees!
     
    ftejada and Zimnel like this.
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    nice, but some of the billboards have the wrong season texture assigned...
     
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    Wich ones?

    Btw, now for some reason when I use them as terrain trees, the leaf cards get disconnected from the branches. Any idea what might be the cause? Am using lod trees.
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    at min 1:21 the lower left ones.

    you have to select "wind from script" in ALL materials (leaf and bark).
    i guess one uses it, the other does not.
     
    Last edited: Dec 7, 2018
  18. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    Ah, ok I see. it''s just the way the billboard was baked. I might need to set the cutout of the leaf shader lower as it's thinner than the billboard. Those are gonna be last minute adjustments. I only wanted to showcase the functioning of the wind in this video :)

    Yeah, you're right! I forgot to set the use wind from script on the bark as well. Everything works fine!
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    great!
     
  20. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,512
    does cti shaders support hdrpipeline?
    or will u add it?
     
  21. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    HDRP is still in Beta right? Not sure if it was officially released with 2018.3. If it is still in beta support is not smart since it will probably change a few more times and break any support.
     
  22. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,512
    yeah figured so, its just that im creating a hdrp package and would love to have some trees react to wind
     
  23. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    Yeah I know. Off topic but did they add the sky occlusion to the HDRP yet?
     
  24. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,512
    dont know really, havent tried all the new features yet
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    i will when it is out of beta :)
     
    Mister-D likes this.
  26. Cleuton-Albuquerque

    Cleuton-Albuquerque

    Joined:
    May 29, 2017
    Posts:
    28
    Hello friend, is this package feasible to produce games for mobile?

    Hug.
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    yes.
     
  28. Cleuton-Albuquerque

    Cleuton-Albuquerque

    Joined:
    May 29, 2017
    Posts:
    28
    Thanks.
     
  29. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    Its easy to make grass to with CTI! Love it!

    Remaking the grass and small plants while I do the terrains.






    Also I think I found a way to use Segi for my real time nature wich is great!

     
    Zimnel, ftejada and Baldinoboy like this.
  30. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898


    <3

    2.jpg
     

    Attached Files:

    • 3.jpg
      3.jpg
      File size:
      1.8 MB
      Views:
      106
    • 4.jpg
      4.jpg
      File size:
      1.9 MB
      Views:
      105
    • 5.jpg
      5.jpg
      File size:
      2.1 MB
      Views:
      142
    • 7.jpg
      7.jpg
      File size:
      1.8 MB
      Views:
      130
    ftejada and Baldinoboy like this.
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    <3
     
    florianalexandru05 likes this.
  32. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    My map walk through in all its entirety. This is the final result of the CTI, nature pack!
    Rendering used: Vanilla Unity with standard shader + SEGI for GI and CTI for foliage and wind.

    I apologize for the obnoxious walking!




    Btw, any plans for incorporating CTI with the HD render pipeline, any updates on that?
     
    Zimnel, camta005 and Baldinoboy like this.
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
    nice job!
    although the leaf planes look a bit to harsh to my eyes. have you tried to smooth out the normals just a little bit?
    and do you blend terrian and rocks? if so, which solution do you use?
     
  34. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    Ah, yeah I know what you are referring to. :( I initially wanted to have smooth normals for the tree planes but for some reason every time I exported a tree with custom normals the shading of the leaves got messed up in weird ways, Unity just didn't like it. It's not a CTI problem it's something wrong with blender export. That doesn't happen in 3ds max but I'm not using max so I just had to live with it. Nah, I didn't blend anything, not with shaders at least. I just made a cliff texture from the models and used it as a tile and pained where the terrain and mesh meet. Same thing with grass on the cliffs.

    ...Then again I might try the smooth normals again, I haven't uploaded the pack yet but if it acts funny I'll leave it at that.
     
  35. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    Yeah @florianalexandru05, I have the same issue with Blender. Only way I can combat this is having sparse atlases, small planes, and many branches. Rough on the tri count but only way to make a tree look latest gen. Same for plants unless I use ATG Grass shader.

    Only thing I have not tried but would recommend testing is exporting the tree at different xyz directions. Blender exports objects into Unity at x90 by default. So maybe this issue is what is causing the normal smoothing problem. Can try doing the normal edits with the tree lying down and then rotate it back up? Probably not but wish there was a fix.
     
    florianalexandru05 likes this.
  36. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    995

    Have you tried using the different rending engines. Cycles may let you tweak it a bit more.
     
  37. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    Do not think changing rendering engines in Blender would affect the normal edit modifier or the mesh after export.
     
  38. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    995
    It was a long shot thought :) Odd problem though. Trying to think what would cause it.
     
  39. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    No, I didn't try that but it might be worth a shot although I doubt it. Perhaps Blender 2.8 would do better but tbh, I don't want to risk having defective trees in unity. :/ I send that tree to a friend and it was really messed up.
     
  40. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    106
    Is there any issue with modeling a tree with no branches, just trunk and leaves? It's a tropical bush and has just a single trunk with radiant leaves. I am not getting the leaf motion I would expect, instead it looks the leaves are behaving as branches. Do I need some sort of proxy branch maybe? Thank you!
     
  41. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    No that will be fine. I have made small bushes and even grass with no trunk with CTI.

    Only thing is you will probably have to adjust for wind strength. When having something small like a bush noticed the main wind strength is way too strong. So I added the main wind and turbulence global modifiers at about _01 to 05 to the exported name on some small models to have the wind work properly. Is good to do for most smaller plants and tree anyway since you want the strongest of the wind in the tall trees not the ground cover.
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,846
  43. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    As the person above said, I also made bushes with no trunk or branches at all but one proxy trunk, you just have to set your wind tags to very low. The same issue can be fixed that way with small grass and plants that are small like that but you gotta be careful it will blow away at strong wind which is to be expected and normal.
     
  44. Fer00m

    Fer00m

    Joined:
    Feb 28, 2014
    Posts:
    80
    Hey,
    I got an issue with PostProcess stack v2 and CTI. Just released a package and realized about the problem right when it went live. It seems when both space screen reflections and HDR on camera is enabled it acts as if deferred shader settings weren't properly setup (even though they are) and the vegetation gets green and blue colors. Has anyone else encountered it or knows the solution (other than disabling either HDR or SSR :D)?

    Also another question I have is whether CTI shaders support indirect instancing? Cheers!
     
  45. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    898
    I have that problem also when using any kind of SSR tool for some reason, so it's not just you. I just turned it off!
     
  46. Zimnel

    Zimnel

    Joined:
    Apr 23, 2015
    Posts:
    26
    Hi, is this compatible with voxelized terrains? I'm using the Voxelfarm plugin for Unity (it imports voxelized terrains created in Voxel Studio).
     
  47. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,301
    Hi @Zimnel, The Custom Tree Importer is used for importing modeled trees into Unity with high quality wind and shading. It can be used to create non-lod tree creator trees or LOD Tree prefabs similar to SpeedTree. So using them on a 3rd party terrain system is dependent on its tree support. Just ask the voxel terrain dev if his system supports LOD Trees like SpeedTree or treecreator trees. If so than CTI trees should work fine.

    You can also just use the trees as gameobjects if your scene is not large.

    Also believe Vegetation Studio Pro works with different types of terrains well now and CTI is compatible with it. The current CTI shaders need to be updated but even Instanced Indirect support is ready.
     
    Last edited: Feb 9, 2019
    Zimnel likes this.
  48. Zimnel

    Zimnel

    Joined:
    Apr 23, 2015
    Posts:
    26
    Thanks for the detailed response, I hope I can make it work : )
     
  49. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    106
    Thank you for the help guys!
     
  50. Zimnel

    Zimnel

    Joined:
    Apr 23, 2015
    Posts:
    26
    I had a positive response from VoxelFarm, LOD trees are compatible with voxelized terrain : )