Game Foliage Alpha Cards vs Geo

Hi guys,

I’m wondering how you usually approach creating game foliage. From what I’ve tested so far, I can’t really avoid using alpha cards for trees—meaning my trunk and major branches are modeled, but small branches, twigs, and leaves are all cards.

What about plants, though? Like flowers or grass? I tried using alpha cards at first, but ever since I read about the overdraw problem, I’ve tried to reduce black areas in the opacity mask to lower its performance impact. The problem is that as I do this, the vertex count adds up, and the card starts looking like actual geometry anyway. So why not just model them as real geometry (still a thin plane with no thickness) and ditch the opacity mask entirely in favor of an opaque material?

I’m feeling so lost right now because I’ve seen several different ways to tackle plants. Some people use alpha cards all the way, some use cards for petals and leaves while modeling the stems, and others model everything. For context, I’m working in Unreal Engine 5 (not planning on using Nanite) and targeting both desktop and mobile devices.

Also, I’m still not very good at accurately measuring performance, for plants, when I compared using all alpha cards (two cards crossed) versus cubic stem with pedal cards and leaf cards (410 vertices), there didn’t seem to be any noticeable difference in rendering load. So I highly doubt my conclusion so far. :joy:

Alright I haven’t tried the “model everything” route to even give leaves and pedals thickness. Gotta stop and look for advice :flushed_face:

bump it up

Because of the “bump” and to “fire up” some discussion :wink:.

I’m not using some game engine yet but i still did read some things about cost of alpha planes. So as far as i know:

For some LOD level far away the costs are not that big to have one bigger plane with alpha.
For some “inbetween” LOD on emight use very very simple geo and no alpha at all because one does not really see the shape but the “overlap” of dozen to them..
For some more at the player/camera LOD one might use some parts with alpha and for some very close one none at all.

This might be interesting:

Especially the part:

The alpha channel wasn’t used in any of the captures I took.

And this (even if for nanite?) might also give some usable “insights” ..maybe in their documentation ?

Or this (unity) for “increasing leaf coverage in the texture” so there are less “draw calls”..

thanks a ton! thats pretty deep. let me take a minute to process all of these. i think i have to come back to these articles over and over.

Here is also some very (very) complex article about not using “the whole range of transparency” to make rendereing “faster” :

This maybe is associated to the term “alpha treshhold” which sometimes is used in some gaming/mod forums ?

Edit:

Oh yes.. and there is always Polycount’s forum.. (even if this thread is a bit old.. ? :wink: ) → “Foliage alphas vs geometry”:

https://polycount.com/discussion/144594/foliage-alphas-vs-geometry

or their Polycount Wiki → “Transparency map → sorting problems”:

http://wiki.polycount.com/wiki/TransparencyMap#Sorting_Problems

Oh, I’ve read some of these before I started modeling. For some reason, PolyCount posts always pop up in my search results. They got a ton of solid points.

Somewhere in the back of my mind, I’m just constantly wondering what the industry’s real stance on vertex counts is nowadays. I say this because I had a thought: even with a 410-vert plant like the one above, I went with real geometry and an opaque material. That immediately skips overdraw from alpha testing. Plus, since it’s pure geometry, doing very aggressive LODs in-engine feels doable I think?

This is all coming from stuff I stumbled upon recently saying vert limits have been loosen up in the industry. Got me thinking that ditching alpha cards altogether might actually work. I tossed 1k instances of that 410-vert plant into the scene and my GPU didn’t even sweat. Well I didn’t confine any test parameters, so the conclusion doesn’t mean much, but I really wanna know how you guys normally handle this.

When I was tweaking alpha cards earlier, trimming the black area in the mask made the vertex count spike like crazy. At that point, I was thinking why even use alpha cards? Why not just cut out the leaf profile on a plane and call it a day with an opaque material? You know what I mean?

I’m gonna read through these articles first, they look promising. Thanks a heap!:heart:

I guess this also depends on the “overall” polycount.. or for example for some “horror game” you have by far more dark areas and also the distance of view is restricted..

As always.. it depends.

Of course very expesive graphic card can handle a lot. Bu then the questions also is: How is “the distrubution” among games for that category of game you are targeting for and so jow much do you have to sell..

Economics are a very very important precondition to “solve” some technological task and/or artistic wishes.. :winking_face_with_tongue:

true that. and i guess i called it a bit too early on ditching alpha cards. cause then i saw this plant—alpha card to the rescue lol

Almost funny thing: this is a very interesting topic.. even if i do not use a game engine (yet).. :sweat_smile: so i also hope that someone else would participate..

But it maybe that this is better answered on some game engine forum. So if you did ( or will ) post something elsewehere: please tell me. I’m always eager to learn things.. but i might be too interestes in to much things :sweat_smile:

yeah right now i’m still testing whether godot or unreal fits my design goals better. im gonna wrap up my thoughts and ping you when i make a post there :grinning_face_with_smiling_eyes:

Ohh… i just saw.. (even if this may qualify this topic to be moved to “Other Sofware” ? I can do this if you want to “attract” more users ?? )

Interestig the link about:

Comparison between alpha blending and alpha scissor transparency

..some “simpler” version of the range restriction above ? :thinking:

and also this:

that would be great. and actually moderator thorn helped me retagged it to Other Software. but i accidentally changed it back to “Model”:distorted_face:. by the time I found it out, i cant no longer edit the tags.

i think he’s saying alpha blending is more expensive than scissor/testing

Done.. back in “other software” :wink:

..and the “best result” may really depend on the amount of model one wants to bring onto some background and how effecient some LOD is and if this LOD does use some mix of geometry to single or whole imposter planes.

cant help to share this. idk if you played kcd1 before. i was no-lifing it when it came out. there was this quest that you need help a missionary doctor to get rid of weeds in his plant yard. this requires you to lean in and look really close at the plants to tell weeds and herbs apart. honestly, from my perspective today, these are all opacity masks cropping alpha cards, but to the naked eye it looked so rich. https://www.youtube.com/watch?v=hNQtvzHpQ3c&t=340s

There are even older games which was soooooo amazing.. i just remember the hhuuugge upscale from 640x480 to 800x600 in the Diablo II expansion Lord of Destrution !! ..and we are talking about 2D graphics :smiling_cat_with_heart_eyes: