Search Unity

[Released!] Custom tree importer

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

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you can do so already.
    you still have to cut you mesh in case you want different phases and 2nd bending on the branches. use the probably existing uv seams to do so.
    then you have to mask the seams using vertex color blue so the seams will pick up the bending from its parent - like you would do for big branches.
     
  2. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    oh great tnx for explaining
     
  3. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    adding vertex color blue doesnt fix it , maybe im doing something wrong
    ive added the tag(_xmvcb) and painted the seams blue

    but branches get disconnected
     

    Attached Files:

  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    _xmvcb has to be added to the filename.
     
  5. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    ok that did it, tnx!
    i still have a issue that my leafplanes(doublesided) get split from each other were i paint vertex color green.
    i think it has to do something with the normals but im not sure
     
  6. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    nevermind ,fixed the normals.
    still cant get vertex color blue to attach my meshes to work tho, ill send u the mesh so u can see what im doing wrong
     
  7. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    in case anyone wonders , lars made some changes to the importer script and now u can have sculpted trees work within unity with all the benefits of the wind.
    the leaf tumbling shaders really make my trees come alive! tnx man
     
    florianalexandru05 likes this.
  8. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    That's great news, I'm still wondering how I'll make my unique tree using CTI.

     
    Mister-D likes this.
  9. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    its pretty easy, split up your mesh in branches and paint the cuts vertex color blue. bending will be fine in unity
     
  10. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    oHH, alright, I will try that eventually!! Hope it works, one of my friends tried that and it didn't work for him.
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    actually it is not that easy - and you will need a tweaked importer script.
     
    florianalexandru05 and Mister-D like this.
  12. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Is it something you didn't include in the pack? I might ask for it when I get to using CTI.
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is not in the pack yet.
     
  14. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im calling my asset pack done
    could probably add more but im pretty happy with the results so far
    all foliage was sculpted in zbrush , textured in substance painter and processed with the custom tree importer
    tnx for making this plugin
     
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    great!
    and do not forget to add the "powered by cti logo" please :)
     
    Mister-D likes this.
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    Nice going with the atmosphere there man! I like it!
     
    Mister-D likes this.
  17. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Oh man that is awesome @Mister-D! Great job!
     
    Mister-D likes this.
  18. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    tnx , i think its a joke , right? or do u have a logo i can add to the screenshots?
    tnx i went for a "dark woods" theme
    tnx, love your work too
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    no joke. you will find one in the folder: cti -> logos
     
    Mister-D likes this.
  20. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    I'm the proud owner of the fabulous CTI pack now and I couldn't be happier! :))

    Oh right and I forgot about my test video, I wasn't able to use the vertex blending technique so my branches just split : ( but the wind is fab!



    @larsbertram1 Do I really need that addon you are talking about for the branch blending? Couldn't get it to work by default.
     
    camta005 and Baldinoboy like this.
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    great.

    hmm, couldn't spot any disconnections in the video.

    your branches look more like – sorry :) – tubes put together, which is the regualr ay to model a tree.
    in this case all you need is to slightly overlap parent and child and you should be fine.

    mr. d modelled one single seamless mesh and wanted to break it up so the different branches could bend individually. so he had no overlap or such. in this case you would need the add on.
     
  22. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,811
    It's there, the braces are all disconnected, I could send you the file... I'm sure I could just overlap them a little but I'll have a lot of different types of trees, might want that addon tbh :)
     
  23. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    ok, found your logo
    my pack is released
    check> asset store link
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    congrats!
     
  25. jaschieffer

    jaschieffer

    Joined:
    Feb 15, 2017
    Posts:
    11
    Hello! I'm having a problem with the CTI shader when I have a spot light connected to my player as a flashlight. When I go up to plant using this shader, the foliage lighting pops when the light is on it rather than smoothly lighting up the plant. Is anybody familiar with this problem? This doesn't happen with point or directional lights.
     
  26. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Have never seen this issue. Which shader exactly? CTI LOD or CTI Tree Creator? Forward or Deferred?
     
  27. jaschieffer

    jaschieffer

    Joined:
    Feb 15, 2017
    Posts:
    11
    CTI/Tree Creator Leaves Optimized Tumbling and Deferred.

    Here is an example.

     
    Last edited: Oct 10, 2018
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    which version of unity? which api?
    the Tree Creator Leaves Optimized shaders uses forward even if you have set your camera to deferred. so it might be a problem with forward lighting in general... you may try to add an object using standard shader and set its rendering mode to transparent.
    afs tree creator shaders render in deferred by the way :)
     
    Last edited: Oct 10, 2018
  29. Deleted User

    Deleted User

    Guest

    Hello! I have an issue with terrain trees, they have a same rotation when I am placing them (no random rotation), how do you think are you able to fix this or it's fully on Unity side?
     
  30. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hi,

    Only LOD trees get random rotation. Normal terrain trees do not use random rotation unfortunately. You can make LOD trees with CTI of course using the CTI LOD shaders but the treecreator shaders are for standard terrain trees.
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    nothing to add :)
     
  32. Deleted User

    Deleted User

    Guest

    I tried to add LOD trees, rotation works fine but wind doesn't affect trees (with both LOD and Terrain shaders)
     
  33. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Did you add the CTI Wind for LOD Trees script to the windzone? There is also a windzone prefab, with the script already added, included with CTI that you can throw in the scene to test this.

    Also believe the wind will only work with LOD trees if they are using the CTI LOD shaders. So even with the script on the windzone the tree creator shader family will not receive wind correctly on LOD trees.

    Cheers
     
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    use the lod shaders and check "wind from script".
     
  35. Deleted User

    Deleted User

    Guest

    It works! Thanks!
     
  36. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello,

    does CTI work with tree creator files? Or would I have to export it to fbx, reorganize the mesh manually in Blender or some other software and import it to Unity again?
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    no.
    yes.

    but why would you want to do so? tree creator trees already contain some bending information...
     
  38. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Because I'm not happy with quality of this bending information. As you know a common practice is to make a small branches as leaves. And with just tree creator it's rather hard or even impossible to make those small branches not fly half or more meters away from parent one on strong wind. I'm wondering why TC won't just set wind influence for the 'bottom' vertices to some small or zero value; it would look so much batter imo.
    But anyway I hope CTI will do much better here.
    By the way, haven't you thought about such TC-CTI automatic conversion? TC trees are already structurized so re-doing it manually seems like a redundant step.
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    then you have to break them up...
    nope. as cti is about custom made meshes like trunk meshes showing up way more details than you usually can create using procedural approaches like the built in tree creator or speed tree.
     
  40. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    how does the cti leaves lod shader work?
    my leafplanes just become invisible
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you have to use a unity lodgroup and set the "fade mode" to speedtree.
     
  42. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    I have a number of CTI trees and I am trying to dial in the wind settings for a specific scene. It does not appear that the settings in the "CTI Windzone" are impacting these trees at all. I can make extreme changes in the inspector values but there is no change in the tree's movement. Within the tree prefabs, I can adjust the leaf movement in the leaf shader, and that works. How can I adjust the more general response to wind -- bending primarily? And why doesn't the CTI Windzone have any effect?
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    have you checked "Use wind from script" in the materials?
    is there a built in wind zone in your scene and is the "CTI_Custom Wind" script added as component to this wind zone?
    then everything should be just fine.
     
  44. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    Yes, both materials for each tree have this box checked.
    Yes, this is the "CTI Windzone" I refer to above. Is the name of this critical?
    Unfortunately it's not though. I have another scene that is the TFP demo scene, it uses the same trees I am using and also has a wind zone, and it works fine. When I adjust the settings in the wind zone the tree responds as one would expect. In my own scene though, using the same tree and an added wind zone, there is no response. Is there perhaps something I need to do to connect the wind zone to the tree -- it seems like such a connection is missing. Or, is possible that having the TFP scene -- even unloaded -- might be interfering with my scene?
     
  45. swredcam

    swredcam

    Joined:
    Apr 16, 2017
    Posts:
    130
    OK I figured it out. Writing that last post gave me an idea. It seemed unlikely that the windzone from an unloaded scene would be causing issues, but then I thought that maybe there was a second windzone in my own scene. It turned out there were about ten of them! Somehow I had added the windzone and CTI script to one of my tree prefabs, so each instance of that tree had a windzone. I deleted all the extras and now everything is good.
    In the unlikely event anyone else makes this mistake, it's easy to solve by right-clicking on the CTI_CustomWind.cs script in the Project window, and finding the references in the scene. Should only be one.
    Thank you!
     
    Willbkool_FPCS likes this.
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    fine :)
     
  47. Fer00m

    Fer00m

    Joined:
    Feb 28, 2014
    Posts:
    170
    Hey,
    I was just wondering if you're planning to add tessellation support for bark array shaders?
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    this is already supported, isn't it?
     
  49. Fer00m

    Fer00m

    Joined:
    Feb 28, 2014
    Posts:
    170
    I mean the array ones :) Unfortunately I can't find the input for heightmap array, unless I'm missing some update

     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    ah, it may only support detail maps.