Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Any resourceful way to make leaves of a tree in Blender?

Discussion in 'Asset Importing & Exporting' started by santiagolopezpereyra, Nov 25, 2018.

  1. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    I've been developing some trees, but the problem with creating leaves is that my knowledge of the process boils the matter down to two alternatives:

    a) use particle systems with a leaf object (pro: is fast; con: creates waaaaaay too much geometry).
    b) place the leaves one by one or by groups (pro: less polygones generated than with particles; con: slow and tedious).

    Is there some alternative? Some way to fill a tree with leaves that is automatic (or at least fast) and doesn't generate too much polygones? Because with 100 hundred leaves on a tree I can easily go from 1000 faces (base tree) to nearly 100.000, which is overkill for Unity.

    EDIT: To clarify, I'm not making ultra-realistic trees. I'm somewhere between low-poly and realistic, without being neither of them.
     
  2. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    You could use something automatic. With Blender, you can specify on what part of the model you want leaves to be emitted from and then have them emit that way with the hair/particle system. Of course you have to tailor it to how much geometry you want, but it is much quicker than doing it by hand. Also, have you considered speedtree? I don't know if it does what you want, but if it is within your budget I'm sure it could help.
     
  3. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    I have defined vertex groups for my leaves when using particles, yes. This reduces the geometry, but not enough to make it suitable for Unity. I don't think SpeedTree will work for me since my game takes a quite particular style of trees (if you want an example follow the link below; I've posted some of my trees on my twitter account):

    https://twitter.com/charma14094349/status/1066533983905869825

    Perhaps this will give you an idea of why SpeedTree isn't the solution for me.
     
  4. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Yeah, I see pretty well in those pictures, makes sense. However, I'm still not sure why you can't get the particle emission method to work. It doesn't only take the vertex groups, but you also can control the actual amount of particles. I see no reason the method that shouldn't work since you can directly control just how much geometry it makes in the particle systems.
     
  5. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,068
    There is supposed to be a leaves add on, included in blender that
    automatically generates leaves, onto an object.:)

    Unfortunately, I can't remember the correct name, of the add on though.:confused:
     
  6. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    Because if I place, let's say, 50 leaves, because of the nature of how the Particle System places those leaves, the tree still looks as if very few leaves were placed. In other words, 50 leaves added by Particle System looks as a lot less than 50 leaves added by hand, though the same amount of geometry is created. That's way for my trees to look with many leaves, though 50 leaves would be enough by hand, I probably have to triple that on the particle system to make it look as robust.

    I would be great if you remebered! If you do, please comment. I'll google it anyway, perhaps the unfailing memory of Google will save us! Though I googled this problem a lot before posting it here and I found no info on any addon :/
     
    BrandyStarbrite likes this.
  7. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    So what it is that is different about your hand placed leaves as compared to the ones placed by the particle system? Is it the angle they are placed at? Is it the positioning? There are possibly some settings you could change to make the particles behave more like the ones you are placing by hand.

    Another thought, what kind of geometry are these leaves? Is it complicated, or is it more like the single quad(2 triangles)? If you are going simple like the quads are, you should be OK to have a pretty good amount of them, especially since they would be drawn with a single draw call using the same material with very little geometry(4 verts each).

    **********EDIT

    The add-on you are looking for may be called "Sapling" and if I'm not mistaken is included in your Blender installation. It is in my installation anyway. I'm not sure if it will do just leaves though, or if it can only do whole trees, or how it works exactly.

    If there is another add-on that would work better, I'm not sure what it is. Any time I've needed something like this, the particle system has been able to get it done.

    EDIT Again***************

    I forgot that there is the "ivy" add-on as well that directly works with vines and leaves and could possibly work for you. I don't know how to make it work right though, but I know it exists and is part of the Blender package as well.
     
    Last edited: Nov 25, 2018
    BrandyStarbrite likes this.
  8. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,068
    Sapling and Ivy. Those are the names, of the add ons I forgot.:p
    Thanks for that info @kburkhart84.

    I think there is supposed to be, a third one though.

    I would have checked, for the names of the add ons, in my blender installation.
    But unfortunately, my laptop shut down a few months ago.
    So I have to buy a new one, or replace the motherboard. :p
     
    Last edited: Nov 25, 2018
  9. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,068
    Okay. They're called sapling and the other one is Ivy.
    Read kburkhart's post above, for more info.:)

    It's thanks to kburkhart84, that I remembered the names, of the add ons.
     
  10. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    Unfortunately Sapling creates trees and adds leaves to them, but gives me no way of adding leaves to an existing custom-modeled tree.

    Regarding the geometry of the leaves, it's not complicated nor it is extremely simple. It's nothing from the other world; two faces, so there's always a normal in the right direction and any side of the leaf is invisible; two or three loop cuts with which I round the leaf. Not too many faces nor vertices. But I assure you I have passed the last two weeks trying to add the leaves with the particle system, customizing all possible settings, and any result is fully cheap on polygons. Some are better than others, yes, but nothing stays between a safe zone of 1000-5000 faces.
     
  11. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    You may have to sacrifice somewhere if you can't get exactly what you want. Either you sacrifice time and do it by hand, or you sacrifice in performance by having too many leaves.

    That being said, I would wonder if you are over-optimizing. If the leaves are the same material, they should still draw pretty fast, even with lots of them. I've seen situations where drawing 5,000 triangles was the same speed as drawing 10,000 just because of how things get batched anyway. Your time is valuable, so if you can get acceptable results with the particle system, even though it is more geometry than you planned, try running it like that and see if it is fast enough. I may very well be.