Home Technical Talk

[FOLIAGE] ~ Polycount VS alpha cutout, which one to favour in trees?

triangle
Offline / Send Message
Steamy_Steve triangle
My current task as a junior (read: newborn) member of a very small indie team is to make trees for our UE4 project. Heh!

I've read countless forum threads (including Polycount's wiki on foliage) and watched as many YouTube tutorials, and all claim to preach the ultimate method, be it cheap/quick, quite complicated, or a plain shortcut (via 3rd party softwares, that is).

I've been told again and again that a higher polycount is always preferable over the dreaded "quad overdraw" because of how well/awfully UE4 handles them.

Now, as a mere test I've modeled a tree of my own. The main body of the tree (the trunk + the main branches) is as low as ~570 triangles, while the leafs make this number skyrocket above 12k(!!).
Obviously too much, for a tree that is going to be instanced as mere foliage.

Lo and behold:


Please, ignore the absence of a normal map and the abysmal color picked for the very basic shader applied to this mesh.
Everything you see is made of pure polygons, no alpha cutouts at all, the shader itself is set to "Opaque".

The trunk, at the base of the first branches, is about 2.5m tall, and with this notion in your hands you can quickly guess where the main problem with this model lies: leafs are way too big, there should be more of them and they should be like 1/4 of that size.

Each leaf takes 7 triangles, they are clustered into groups of three, then applied 5 times onto a twig (13 triangles), which in turn is instanced 100 times (through Blender's particle system) all over the branches.
Add the trunk's triangles count and you get well over 12k. My first reaction has been "unacceptable!".
The shader complexity/quad overdraw view in UE4 showed some reassuring colors, though, which is nice.

The most obvious workaround (to me) would be using *cards* and alpha cutouts. But I cant go wild with that, I've been taught that too many *blank* areas would paint the quad overdraw view in full white....which is bad, very bad, worse than "crossing the streams".

So, how may I make my tree(s) look lush while keeping polycount and quad overdraw at acceptable levels, levels that would ideally allow me to instance this tree so many times that the amazon forest would bow its head....?
Ok, I'm overexaggerating, here, but you got my point, I believe.

What is the "best practice", which tutorial is the one that depicts the most acceptable industry standard, what guide should be my bible?

Please, no 3rd party softwares, especially *pay-wares*. Beside my utter lack of cash, I want to have full control over what I'm trying to achieve, which means "handmade" should be the buzzword of the day.

Help. =0

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    You avoid the overdraw by cutting the planes to the shape of their content
    As you lod you can be less precise as the cost  is per pixel

  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    As poopipe says you would cut into into the planes following the silhouette of the branch. Using only leaf geometry would be pretty crazy as you see with your small tree at 12k.

    I would suggest making some sort of branch with leaves baked down to a plane how, big a branch depends on how far away the trees will typically be. When you cutout the geometry around the branch you should deform it too so it doesn't appear planar, also if you bend the same branch texture in different ways you get variations and a bit more mileage for the same texture. You can have smaller branches and leaf clusters, even a few individual leaves so you can fill out the volume of the tree at closer distances, and those smaller meshes are simple to LOD out.
  • Mark Dygert
    Also don't forget about impostors they are great at preserving detail at a distance while freeing up resources. It basically renders your tree from several different views, puts that on a texture atlas and then shows the player a single plane (or a few crossing planes) the correct render(s) for their view angle. From a distance it is really hard to tell that it isn't geometry. 

    Unreal comes with a default impostor baking workflow, but it's kind of hard to setup and work with. Still, it does what you need it to, just with a bit more work.

     Ryan Brucks has created a new version that is available as a plug-in and it goes far beyond what the old impostor baker could do.
    https://shaderbits.com/blog/octahedral-impostors/
    https://docs.unrealengine.com/en-US/Engine/Content/Tools/RenderToTextureTools/3

    https://youtu.be/Sd1nXiI_ros

    If you're worried about perf, impostors are a good way to go.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    [....] If you're worried about perf, impostors are a good way to go.
    @Mark Dygert Well, the integrated LODs system seem to work quite well, in UE4, and I doubt I'll ever have to handle FN level of view distances, in this project.
    My real problem is just with close up models, I want them to look good AND be performance friendly.

    I got, from the other replies, that using cards is not just an option, so I'm looking for a good tutorial that will eventually teach me how to decide what level of fidelity I should aim to when cutting my cards around branch textures.
    How much blank space around a leaf is bad and how much is acceptable to avoid unbearable vertex counts?

    It's quite the matter, to me.
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    Check out a free trial of speed tree modeler for UE4. Automates most of the common performance practices, but still gives you plenty of control to tailor the assets to your needs. Really fast and easy to learn -- and easy to make tons of iterations of assets so you can just test in engine rather than speculate.

    I don't have any affiliation with speedtree. I just used it recently for a game project. Saved a ton of time and headache.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @poopipe @m4dcow How accurately may I cut around the texture before the number of vertices is comparable to the full mesh model, and how much *blank* may I overlook before the engine starts crying blood tears?

    Tutorials/guides? =0
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @BIGTIMEMASTER
    [....] Please, no 3rd party softwares, especially *pay-wares*. Beside my utter lack of cash, I want to have full control over what I'm trying to achieve, which means "handmade" should be the buzzword of the day. [....]
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    You can use the free trial to look at how the trees are made in there, still. So you can see the visual difference between using different types of cards, see what the tri-count difference is, and so on. Again, it allows rapid iteration -- so you can do your testing and figuring with the free trial to dial in what you want, that way you dont have to spend a lot of time building stuff from scratch jsut to learn that it won't work right many hours later.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    You can use the free trial to look at how the trees are made in there, still. So you can see the visual difference between using different types of cards, see what the tri-count difference is, and so on. Again, it allows rapid iteration -- so you can do your testing and figuring with the free trial to dial in what you want, that way you dont have to spend a lot of time building stuff from scratch jsut to learn that it won't work right many hours later.
     @BIGTIMEMASTER Which version should I go for? "Speedtree for Games v7" or "Speedtree for Unity and UE4"?

    EDIT: the "Speedtree for Games v7" requires me to actually fill and sign a contract....are you serious?!
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    You should be able to do a free trial of speedtree for ue4. In any case, the program is month by month payment, and it's $19, IIRC. Can't get much cheaper than that. But, only you know all the factors you got to juggle to get your work done. So this is just a suggestion for a tool I found helpful. Maybe it works for you, maybe not. In my case, it allowed me to make like 20 different, well-optimized vegetation models in a few days (and that was several iterations of each)-- without having any prior vegetation asset creation experience. So, definitely worth $20 IMO.

    I've been trying to find an article I found on here not too far back... it was a bunch of great tips for natural environments in game engines, focusing on photorealism but still meeting realtime performance needs.... I'll link it if I can find it again. IIRC, some tips included making your "cards" the basic shape of your fronds, making those larger and putting several branches/fronds inside each. This way you can use less cards overall and still get a dense look. So, to put it more clearly : stack several leaf/branch textures into a single "card", have the card follow the general outline of the textures, rather than a million tiny cards holding an individual branch.

    Other tips included using a very noisey normal map for distnace LOD's and billboards, and decreasing the alpha falloff to retain a more realistic look from a distance.


  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    @poopipe @m4dcow How accurately may I cut around the texture before the number of vertices is comparable to the full mesh model, and how much *blank* may I overlook before the engine starts crying blood tears?

    Tutorials/guides? =0
    There isn't any hard number, but here is an image of a tree I did last year, it is a bit too low poly TBH, but you can use a decent amount of polys once you LOD them before they get too small.
    This is an 80.LV article with the breakdown of that environment, might have other useful foliage info for you too.
    https://80.lv/articles/growing-a-jungle-environment-in-ue4/
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @BIGTIMEMASTER
    [....] my utter lack of cash [....]

  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    m4dcow said:
    [....] This is an 80.LV article with the breakdown of that environment, might have other useful foliage info for you too.
    https://80.lv/articles/growing-a-jungle-environment-in-ue4/
    @m4dcow
    Pity he doesnt show how he fixed the quad overdraw, what interested me the most is how much he raised the polycount to overcome that issue.
  • Mark Dygert
    @Mark Dygert Well, the integrated LODs system seem to work quite well, in UE4, and I doubt I'll ever have to handle FN level of view distances, in this project.
    The poly crunching LOD system in Unreal is better suited to solid meshes like rocks, or piles of rubble, it understands solid objects really well because they often have polys that contribute to detail but can be shaved out and not affect the silhouette.

    Cards are usually fairly optimized and don't crunch all that well. It also doesn't understand that the asset is made up of a bunch of sub-components and it won't combine them and render out a new batch of branches.

    Branches get shorter, leaf planes are left floating. Textures distort and skew horribly, it just makes a mess... You'll run into it as soon as you start working with anything card related... If you try to crunch your way there, it require more verts to hold the shape and volume than an impostor will. 
    My real problem is just with close up models, I want them to look good AND be performance friendly.
    You need to look at it in reverse? You are shaving polys out of the things that are 10-20+ feet away, so you can handle more up front. Your savings comes from the things that are farther away, not the thing right in front of you. Of course you want the thing right in front of you to be optimized but it can be fairly heavy and detailed, then it LODs out as soon as you step back. impostors are great at that.



    You want to limit the number of transparent pixels on the screen as possible. Especially if they draw over other transparent pixels, so trim them as close as you can without adding too much to the poly count. 
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Mark Dygert said:
    [....] Of course you want the thing right in front of you to be optimized but it can be fairly heavy and detailed, then it LODs out as soon as you step back. impostors are great at that. [....]

    [....] You want to limit the number of transparent pixels on the screen as possible. Especially if they draw over other transparent pixels, so trim them as close as you can without adding too much to the poly count. 
    I doubt you mean "20k triangles worth", when you say "fairly heavy and detailed"....right? =p

    The "trim as close as you can without adding too much to the polycount" is just my point. How much is too much, when it comes to polycount and overdraw? =p
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    m4dcow said:
    [....] This is an 80.LV article with the breakdown of that environment, might have other useful foliage info for you too.
    https://80.lv/articles/growing-a-jungle-environment-in-ue4/
    @m4dcow
    Pity he doesnt show how he fixed the quad overdraw, what interested me the most is how much he raised the polycount to overcome that issue.
    Well, he is me, and I didn't really set out to make a super optimized scene for this and didn't fix quad overdraw :) . Here is a comparison anyway.

    You can see that with the fan palms that there is a decent hit of overdraw on the areas in between the leaves, but the amount of polys you would have to add to the leaves to get rid of that might be too much.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Check this slide deck about the foliage in Horizon Zero Dawn, there is some relevant stuff at about 74
    https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/gilbert_sanders_between_tech_and.pdf
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @m4dcow Actually, that's a pretty acceptable amount of overdraw, to me. Little red, very little purple and nearly no white.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    m4dcow said:
    Check this slide deck about the foliage in Horizon Zero Dawn, there is some relevant stuff at about 74
    https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/gilbert_sanders_between_tech_and.pdf
    @m4dcow They used Speedtree....those polycounts are machine-generated, they just had to tweak numbers and colors, I see no techniques that I could learn from.
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    @m4dcow Actually, that's a pretty acceptable amount of overdraw, to me. Little red, very little purple and nearly no white.
    Don't rely on speculations... try to get a basic demo built quickly, run test in engine, and then you'll have real data you can act upon smartly. Work with your programmer to use tools like the profiler (maybe it's called something different in UE4). If you don't have somebody who knows how to do that, you'll need to learn. It's really the only way to figure out where specifically you are hitting performance bottlenecks. It's very important to differentiate between what you think you know, and what you know. Whatever you don't know is your enemy -- so you need to sniff the enemy out, and destroy them.

    As a place to start, just make the trees to the quality you want to see. Observe basic optimization guidelines, but don't let any worries hold you back from production. You'll learn the most from seeing. Once you get the basic demo up and running, then you won't have to guess at things anymore. 


  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    m4dcow said:
    Check this slide deck about the foliage in Horizon Zero Dawn, there is some relevant stuff at about 74
    https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/gilbert_sanders_between_tech_and.pdf
    @m4dcow They used Speedtree....those polycounts are machine-generated, they just had to tweak numbers and colors, I see no techniques that I could learn from.
    If you look closely, they build the clusters/clumps and their respective LOD levels and seem to use those in speedtree. In any case they have meshes at different LODs you can look at these to see how they put together their foliage.
  • Mark Dygert
    m4dcow said:
    Check this slide deck about the foliage in Horizon Zero Dawn, there is some relevant stuff at about 74
    https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/gilbert_sanders_between_tech_and.pdf
    @m4dcow They used Speedtree....those polycounts are machine-generated, they just had to tweak numbers and colors, I see no techniques that I could learn from.
    Sooo... speedtree is just automation you can totally do what it does by hand, you'll just be slower and less flexible. You can totally use what it outputs as a goal for your trees. How it builds and optimized can be your guide. If you bother to look at it...

     [spoiler]You seem pretty good at shooting down ideas and turning up your nose at examples or theories that will get you where you need to be.

    "I want something to do this really complex thing for me and I want it for free... where is the really simple thing that just makes stuff?"[/spoiler]
    If you want high quality at low cost it's going to cost you time.

    *switching this to spoiler because it is pertains to the OP's "posting style" and not really foliage
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @BIGTIMEMASTER
    You kind of nailed the main problem: I dont know what I dont know.
    I dont live in place where I can get proper courses for this kind of stuff, I have no contacts that can teach me, I have no sources of knowledge other than the Internet.
    And the Internet is full of information, yes, but mostly fragmented and, more often than not, contradictory.
    I type a question on Google and hope for an answer, but I have no means to know whether the acquired information is complete and still valid.

    I have to rely on forums, where people may or may not (almost always "not") have time to go in depth when explaining things, so I get even more fragmented information and plenty of concepts that I didnt even know existed and that most of the time I cant find a use for (because I lack the knowledge to see how they relate to the rest).

    I want to learn, but I have not a path to follow, nobody's pointing a finger and telling me to "first of all, go there", so I mostly spin around constantly changing direction while chasing this or that advice to achieve my next (arbitrary) goal.

    It's quite frustrating, but I wanna learn, that's what keeps pushing me forward.
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    Yes, it's not easy scouring the internet and relying on other peopels goodwill to learn... but you can do it. Many people -- in fact I'd wager most people here -- learned this way. 

    What you have to do is find all the info you can, and then start experimenting. Other peoples goodwill information can only get you started. You still have to do the work. It's hardest in the beginning, but you get the hang of things and after maybe 6 months to a year or so, you'll know enough that you can easily make sense of even vague information. You stick with this game project, and you will be taking a major shortcut in learning -- you'll learn a massive amount if you determine to finish your game no matter what issues you face.

    It seems like you already know enough to make these vegetation assets. You are just getting hung up with worries about performance. I'm saying, forget all that for a minute and just produce the trees that you want to see. Maybe they come out at 20k tri's, and you just know that is too much. So start looking for ways to reduce the tri count while still retainign that look as much as possible. Just try anything that comes to mind -- thats what everybody does. In my own game project, we found that trees weighing around 2k tri's at LOD0 were about right -- but that's almost an arbitrary number because there is a million and one other factors affecting game performance. We didn't learn this number until I had made like 5 iterations of trees and tested them in the game.

    Also, scour the web. Like I mentioned, there was a fantastic article I rfound here on the forum about this exact subject. Sadly, I didn't bookmark it. But it was something I found just google searching. When you are approaching a new subject, spend a solid day or several days just searching. Compile all the informatioin you can find. Skim through it, picking up whatever bits of info you can, then -- whether you fully understand your task or not (you never will) -- just get to work. Trust yourself to figure things out as you go. When you hit a problem, first, be patient, and decide if its worth solving completely, or worth some jimmy rig workaround. Everything is a question of, is it worth the time?


    One other thing... get some money. You don't need a lot, but find some way to get $30 from time to time. Basic tutorials, from pluralsight, lynda, 3dmotive, gumroad, etc, are invaluable time savers. If you have access to internet and enough free time to do this sort of thing, I'm sure you can scrounge together a little money to help aid your learning. Don't let poverty hold you back. That is something you can remedy with some ingenuity and hard work.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    m4dcow said:
    Check this slide deck about the foliage in Horizon Zero Dawn, there is some relevant stuff at about 74
    https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/gilbert_sanders_between_tech_and.pdf
    @m4dcow They used Speedtree....those polycounts are machine-generated, they just had to tweak numbers and colors, I see no techniques that I could learn from.
    Sooo... speedtree is just automation you can totally do what it does by hand, you'll just be slower and less flexible. You can totally use what it outputs as a goal for your trees. How it builds and optimized can be your guide. If you bother to look at it...

    You seem pretty good at shooting down ideas and turning up your nose at examples or theories that will get you where you need to be.

    "I want something to do this really complex thing for me and I want it for free... where is the really simple thing that just makes stuff?"
    Yea so, that almost never happens. If you want high quality at low cost it's going to cost you time.
    Where'd you get that?! Do you think I discovered SpeedTree makes you sign a contract even just to test their software by "shooting down ideas"?!
    Or maybe I actually went and started to try that approach?! Which one, to you?!

    I wanna learn, is it hard or easy I dont care. But I wanna learn, not get a piece of software and let it do all the work for me.
    I'll appreciate automation when I'll have my baggage of practical experience, having it easy from the start aint the best way to learn anything (to me).
    Also, I cannot afford any pay-ware, at the moment, so speedtree is still a no-go.

    I dont want it "for free", I simply wanna craft it with my own hands. It's gonna be hard and it's going to look like sh*t, at first, no doubt, but then I'll truly know what I'm looking at when working with automated solutions and I might even find manual solutions more suitable for the case; and I'll be able to handle it.

    So, you got valuable sources of information for me, or you're only good at shooting ME down?
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    You lack patience!

    Take what is useful, ignore the rest.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    I waste too much time trying to teach people how to learn. Been an hour of procrastination... and for what?!? 

    I think I'll just stick to purely technical talk from now on.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    [....] Also, scour the web. Like I mentioned, there was a fantastic article I rfound here on the forum about this exact subject. Sadly, I didn't bookmark it. But it was something I found just google searching. When you are approaching a new subject, spend a solid day or several days just searching. Compile all the informatioin you can find. Skim through it, picking up whatever bits of info you can, then get to work. 


    One other thing... get some money. You don't need a lot, but find some way to get $30 from time to time. Basic tutorials, from pluralsight, lynda, 3dmotive, gumroad, etc, are invaluable time savers. If you have access to internet and enough free time to do this sort of thing, I'm sure you can scrounge together a little money to help aid your learning. Don't let poverty hold you back. That is something you can remedy with some ingenuity and hard work.
    "Scouring the web" is exactly how I landed here, I got too much information, too little in depth, and I needed answers from experienced professionals (or even just skillful amateurs). Tutorials are, more often than not, only good for the specific case.
    Aaaaand I'm jobless, already spending money on a game design course that unfortunately doesnt cover much, in terms of technical knowledge.
    Actually, at this point I might know much more than my teacher, about certain topics.

    When you dont know what you dont know, solutions you cant think of by yourself just dont exist.
    Same goes for any other knowledge. -.-

    Anyway, I'll try to find a good balance between cards and overdraw, although I will probably never know whether I'm achieving a good result; having a powerful GPU is not always a good thing, apparently.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    You lack patience!

    Take what is useful, ignore the rest.
    Spending 6 to 10 hours a day in front of my PC studying and testing doesnt sound like "lack of patience", to me.
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    You lack the patience to listen, and observe. This is the problem you are really facing. All the information is out there, but you are being a picky eater. Whatever information you find, use it. Doesn't have to be a comprehensive, hand-holding guide to teach you something useful. If you aren't wealthy, you have to eat scraps. That's just life! 

    People are kindly helping you, but because it is not what you want to hear, you reject it, and show disrespect. You bite the hand which feeds!
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    You lack the patience to listen, and observe. This is the problem you are really facing. All the information is out there, but you are being a picky eater. Whatever information you find, use it. Doesn't have to be a comprehensive, hand-holding guide to teach you something useful. If you aren't wealthy, you have to eat scraps. That's just life! 

    People are kindly helping you, but because it is not what you want to hear, you reject it, and show disrespect. You bite the hand which feeds!
    I dont see any disrespect anywhere in my words, I asked for advice and information on a specific task, and specified that I have no intention (nor economical means) to use 3rd party softwares.

    I perfectly know people can make trees manually, it's been like that for ages and it's still a valid method used by a plethora of artists.
    What I'm asking is where the sweet spot between polycount and overdraw lies. How to know when you get *there*. Roughly, *ça va sans dire*. What to put more attention into and what to avoid altogether.

    I have received both valuable inputs and non-viable solutions. But not once I've shown disrespect toward anybody, I'm pretty sure about that.
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 12

    What I'm asking is where the sweet spot between polycount and overdraw lies. How to know when you get *there*. Roughly, *ça va sans dire*. What to put more attention into and what to avoid altogether.
    I don't think there is this universal "sweet spot." It's all dependent on the type of asset, how it's used, etc.

    Best case, do what you think is working so far, get it in your scene, and profile it. Both kinds of overdraw will be visible in the Base Pass and Pre-Pass, if you calculate the alpha in the Pre-Pass, but I believe the latter is more influenced by triangle count and not wasted transparency. 

    If you really want to see what is the best, make your asset with different methods and compare individual costs in RenderDoc, or overall times in Unreal.
  • Mark Dygert
    stuff...
    Hopefully you've taken a breather, it seemed like you were getting pretty stressed out and wasting  lot of energy on posts. If you put half the energy into figuring out your problem that you did into posting, you would have 1-2 test cases up and running and be well on your way to figuring out a workable solution. ;)

    1st off speedtree isn't a one button tree maker, it helps you make trees, there is still plenty of manual labor that goes into making exactly what you want. 

    2nd I'm suggesting that you use what it outputs as an example, a guide, to help teach yourself. When I was learning there where very few examples or tutorials around to help me learn, I would have sold my left nut to get a hold of an example. But if you're so freaked out about license agreements and downloading software that you need to find other examples by all means, there are a lot of them floating around, now. 

    How close do you trim your planes?
    This is the kind of a question that veers into "how many polys are in a piece of string" territory, because there isn't a set number of verts or a specific formula to follow that will guarantee prefect results. We aren't being dickheads and withholding the one key you need that is blocking you form greatness. The answer is, trim them as close as you can without adding a ton of polys. Try to limit the number of transparent pixels floating around in your scene as much as possible. There is a balance to achieve and that balance isn't the same for every project.

    The balance varies and it depends on a lot of factors, like your target hardware, the style of the game, how dense your foliage is, how important the models are to the overall game, how your engine handles opacity, how complex your shaders are, what else is in the environment, how many resources are being eaten up by other systems, bla bla bla hundreds of factors. That "magical sweet spot" has to be dialed in by you as you work and test it, that isn't for anyone else to dictate to you.

    As an artist in this industry you are actually a fireman, you put out fires.
    • If overdraw is an issue and you have verts to spare, add more verts to put out the overdraw fire.
    • If verts are an issue and overdraw isn't, trade verts for overdraw.
    • If both are a problem then start reducing the number of cards in the scene until something else starts smoldering.
    • If neither is an issue, good fuckin job, you're onto the next fire.
    • If nothing is on fire, just wait someone will start one.
    When you get hung up on "how close do I trim my planes, I can't move forward because no one will tell me", you have to understand its frustrating to read shit like that. I and many others read it as 
    "Can you just take my hand and write my name for me? I know how to write (see example above) but it's easier if you just do it for me..."
     That's what it looks like to most people around here. We would have killed for as big of a hint as what you've already gotten, that horizon zero dawn pdf is a fuckin goldmine, there are a few visual examples right in the doc that would be a great starting point.

    That close, shoot for any one of those rows, go tighter, get lose and sloppy, see how it affects things.


    Speedtree could be your north star, but you just looked at this stuff and said "meh, pfft! Bring me more peasants, this cake has displeased me" 

    Go!
     Figure it out. Make some horrible, gawd awful, pile of crap, run some test and figure out ways to make it better. That's how you're going to get to the best possible results for what you're working on.

    Hopefully now you understand why it is hard to give a specific answer to your question and why you aren't likely to get a hard and fast rule. Its an open ended question that depends on a lot of factors.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    leleuxart said:
    [....] Best case, do what you think is working so far, get it in your scene, and profile it. Both kinds of overdraw will be visible in the Base Pass and Pre-Pass, if you calculate the alpha in the Pre-Pass, but I believe the latter is more influenced by triangle count and not wasted transparency. 

    If you really want to see what is the best, make your asset with different methods and compare individual costs in RenderDoc, or overall times in Unreal.
    No idea how to "profile" something....whatever that means.
    No idea what "Base Pass" and "Pre-Pass" are.
    No idea what "RenderDoc" is and how to eventually interpret it.

    =(
  • Joopson
    Offline / Send Message
    Joopson quad damage
    To learn how closely to trim the leaf meshes, try to find some shots from in games, or find a game, like skyrim, where you can turn on and off wireframe, and look at how the lines of the polygons compare to the leaf/branch textures. There is also software out there to unpack all the models in Bethesda's games (Skyrim, oblivion, fallout), for the sake of modding, and it can be a fantastic resource to look at how they model and how they texture.

    These guys all seem to have it right; with any art, there's no ultimate perfect right or wrong way to do things. It's not at all an exact science, it's an interpretive act. And you can't interpret correctly until you experiment and observe more about how it's done, and try it yourself. Try not to get hung up on the ultraspecifics. I do that myself, but it's not productive, it only gets you bogged down.

    My old teacher used to call this obsession with making every vertex perfect "rainmanning", which is offensive now that I think about it, but his whole point was, you need to step back and look at how accurate and perfect you really need to be, because it'll never be as perfect as you'd like. And compulsively trying to get everything perfect isn't productive, beyond a point.

    I'd personally recommend stepping away from this thread, reading/watching some good foliage tutorials, and just experimenting for a while. You'll learn way faster that way, and it'll be more practical knowledge.
  • Mark Dygert
    Steamy_Steve said:
    No idea how to "profile" something....whatever that means.
    No idea what "Base Pass" and "Pre-Pass" are.
    No idea what "RenderDoc" is and how to eventually interpret it.

    =(
    Unreal has several visualizer modes that are available that will help you see problems
    https://unrealartoptimization.github.io/book/profiling/view-modes

    There are also several runtime commands that you can use to call up while playing the game and figure out what is eating up your frame rate.

    This is a fairly long talk but a good one for every artist to soak up. 
    https://www.youtube.com/watch?v=hcxetY8g_fs
    ~12min he covers the console commands.
    ~15min he covers the visualizers.


  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    leleuxart said:
    [....] Best case, do what you think is working so far, get it in your scene, and profile it. Both kinds of overdraw will be visible in the Base Pass and Pre-Pass, if you calculate the alpha in the Pre-Pass, but I believe the latter is more influenced by triangle count and not wasted transparency. 

    If you really want to see what is the best, make your asset with different methods and compare individual costs in RenderDoc, or overall times in Unreal.
    No idea how to "profile" something....whatever that means.
    No idea what "Base Pass" and "Pre-Pass" are.
    No idea what "RenderDoc" is and how to eventually interpret it.

    =(

    https://docs.unrealengine.com/en-us/Engine/Performance

    Alot of that stuff is over my head, but just understand your simple question about overdraw vs polycount is actually a complicated one, and profiling tools are how you figure it out for your particular case.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    stuff...
    Other stuff... (hey, a cheap method but quite faster! thank you!)
    [spoiler]Let me get this straight: you grew in a time when there werent many sources about this topic, so you had to figure this one out mostly on your own (I guess).
    Now you know a lot, you're basically eligible for teaching in pro classes, but I'm a crybaby because I asked around to give me directions based on you people's experience.
    In fact it took *you* 4 replies to give me an answer that fits my questions. Much appreciated, this is beyond dispute.

    All I asked for was a practical direction on how to do certain things, something that would sound like "when I do this kind of stuff I start from *here* (visual example) and tweak around depending on *these* factors".
    That would've given me a (the!) starting point, and would've spared us all my continuous quoting my own words about 3rd party softwares.

    Why am I the ranting kid, if I try to acquire a knowledge that's been built over decades instead of starting from the stone age and going through it all on my own?
    Why am I the lazy slacker when I ask for a manual method rather than an automated one, or when I spend many hours trying and then I come here asking for some knowledgeable advice to avoid wasting any more time on the wrong method?
    I always thought schools and forums are there just with this purpose in mind.[/spoiler]
    *Switching this to spoiler because its useless ranting and distracting from a fairly useful thread. -Mark Dygert
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    What a turnout. 

    All the info is out there, and it seems much of it is right here for easy pickings. Just go one step at a time. You'll get there. Some stuff, after you dive into it for a bit, may simply be too much too soon. For instance, I don't have any clue how to use a profiler, and yet I've helped to build a game. In my case, there was a programmer who used that stuff, interpreted it, talked to me about what issues he was facing, and I produced more stuff based on that feedback. Sometimes you don't have to understand all the techincal details -- you just have to have a basic understanding of how things work so that you can produce your art, however it's needed. 

    If you are working on a team where most people have more questions than answers, it may be worthwhile to kind of get the whole team into the same perspective and kind of use each other as leverage to learn from, rather than getting upset that you can't hit your target quality game. 

    In your own case, if you don't have the time or intention to get into the deep, technical side of things, but you don't have someone to do that (interpret profiler data), just make a really simple game that won't push technical boundaries. Focus on doing the most with the least, as a principle. That's part of "staying in scope."


  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    What a turnout. 

    All the info is out there, and it seems much of it is right here for easy pickings. Just go one step at a time. You'll get there. Some stuff, after you dive into it for a bit, may simply be too much too soon. For instance, I don't have any clue how to use a profiler, and yet I've helped to build a game. In my case, there was a programmer who used that stuff, interpreted it, talked to me about what issues he was facing, and I produced more stuff based on that feedback. Sometimes you don't have to understand all the techincal details -- you just have to have a basic understanding of how things work so that you can produce your art, however it's needed.

    In your own case, if you don't have the time or intention to get into the deep, technical side of things, but you don't have someone to do that, just make a really simple game that won't push any boundaries. That's part of "staying in scope."


    I have all the intentions to learn anything that can help me grow, alas our programmer is not familiar with UE4 (or C++, for that matter) and has very little experience of game developing, thus I'll probably have to learn profiling by myself.

    Everything I made 'til now (the terrain heightmap and weightmaps in World Machine, terrain textures in Substance Designer, grass cards with and without alpha cutout, manual and automatic LODs, shaders that also cause grass to displace around the player, rocks with perfectly invisible UV seams etc etc) is the result of my personal journey through games developing.

    And I mostly learned this all through tutorials and articles, but in a couple of situations I had to come here to ask for help.
    Crafting performant trees is just the umpteenth step in a seemingly never-ending stair, I cant really set the boundaries of my role in this project and I wanna give my all and learn whatever I stumble on. I'm HUNGRY!!
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Joopson said:
    [....] I'd personally recommend stepping away from this thread, reading/watching some good foliage tutorials, and just experimenting for a while. You'll learn way faster that way, and it'll be more practical knowledge.
    I ultimately landed here just because I couldnt find *good* trees tutorials.
    Most are very cheap, all but in depth, rushed, even showing obsolete or wrong methods. Or they're very in depth, well done....and targeted toward performance independent cases like still renderings or movies.
    Or they just use 3rd party softwares, which is a big no, for me. =p

    Anyway, since we're here, how do I turn wireframe on, in Skyrim (FO4 mostly has leafless trees, so....)? THAT could be a quick and cheap way to check some production ready examples!
    Although I can remember the birch forest around Riften being a damn kick in the loquats for any GPU. I shall investigate that too. =0
  • Eric Chadwick
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    https://www.artstation.com/artbyalireza

    Here's the badass realistic enviro guy. Check out his 80lvl articles. Lots of goodies.

    Here is the specific article which discusses tree cards:
    https://80.lv/articles/alireza-khajehali-boosting-natural-environments/
  • Mark Dygert
    Yeah, I've worked with Alireza, he knows his stuff, great artist, great guy, good at sharing knowledge.

    Here is another good collection of knowledge and examples. http://irfancg.blogspot.com/2017/02/foliage-breakdown-tips-and-tricks.html
    Anyway, since we're here, how do I turn wireframe on, in Skyrim (FO4 mostly has leafless trees, so....)? THAT could be a quick and cheap way to check some production ready examples!
    Although I can remember the birch forest around Riften being a damn kick in the loquats for any GPU. I shall investigate that too. =0
    http://lmgtfy.com/?q=skyrim+wireframe+mode
    TLDR: The console command is TWF it stands for Toggle WireFrame.


  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Yeah, I've worked with Alireza, he knows his stuff, great artist, great guy, good at sharing knowledge.

    Here is another good collection of knowledge and examples. http://irfancg.blogspot.com/2017/02/foliage-breakdown-tips-and-tricks.html
    Anyway, since we're here, how do I turn wireframe on, in Skyrim (FO4 mostly has leafless trees, so....)? THAT could be a quick and cheap way to check some production ready examples!
    Although I can remember the birch forest around Riften being a damn kick in the loquats for any GPU. I shall investigate that too. =0
    http://lmgtfy.com/?q=skyrim+wireframe+mode
    TLDR: The console command is TWF it stands for Toggle WireFrame.


    First link is pure gold, why did it take you so long to share it?! Thanks a lot!! =D

    Second link is not funny, that question wasnt even for you and it was just a *btw* request. -.-

    Thank you for the spoiler edit on one of my least useful replies, you should consider applying the same treatment to this one too: [ https://polycount.com/discussion/comment/2651998/#Comment_2651998 ]
    This thread is coming up more helpful than I hoped, it might even deserve some consideration. ^.^

  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Less talk, more art pls. [....]
    Please, be merciful, this is just a test.... >.<'




    I dont know how to interpret what I see here.
    The *pure overdraw* amount seems decent, no white and just a few red dots here and there....
    But I have no idea how to interpret that "PS", havent found any reference anywhere for the "Shader Complexity & Quads" view. =p
    I have no idea what it means... -.-'

  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    https://www.artstation.com/artbyalireza

    Here's the badass realistic enviro guy. Check out his 80lvl articles. Lots of goodies.

    Here is the specific article which discusses tree cards:
    https://80.lv/articles/alireza-khajehali-boosting-natural-environments/
    T H A N K   Y O U !!!! ^0^
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    I looked for that article all over but couldn't find it. I didn't remember the artist or the name of the game, nor where the article existed. Then, just by chance, I recognized some artwork on Artstation which led me back to it. I wasn't keeping it secret to torture you. :)

    Funny thing, I had actually bookmarked Alireza's artstation, but I didn't remember the name so it didn't register.


Sign In or Register to comment.