Home Technical Talk

Alphas vs Geo for foliage

Twotents
polycounter lvl 4
Offline / Send Message
Twotents polycounter lvl 4
So I am a bit stuck between an approach to my scene I am working on, I am planning on dropping my assets into UDK but I can't seem to figure out which would be better for the engine, real plant geo or alphas. I know alphas have been game standard for quite some time but I have been told that sometimes alphas take up more rendering time than the actual geo would.

I would assume in the case of a still frame render actual geo would be the way to go but for a large game scene using alpha cards would be better?

Would be great to get some feedback

Thanks for reading!

Commence interesting topic conversation in

3

2

1

NOW!

Replies

  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    alpha blend (ie, glass-style partial opacity) is very expensive, but it also typically isn't used for foliage, alpha test is (1bit alpha, also called "on/off" alpha) which is more expensive than not using it but is relatively cheap.

    The big issue with tree construction and modeling is that in order to hit the same number of leaves/branches that an alpha card-modeled tree uses, you would probably be hitting hundreds of thousands if not millions of triangles per large tree.

    Even in a case where you managed to cut the rendering cost down to the same with either solution, you then run into the issue of animation. Most foliage in games nowadays has some sort of animation, whether it's wind blowing or simple physics interactions or something more complex. In those scenarios, you're moving verts, and a tree with 100k verts is going to be 10x as expensive to animate as a tree with 10k verts.

    typically people caution against using alphas when the alpha is saving only 100-200 triangles, and is sparsely used on a texture map. With the case of a tree, alpha cards are almost always going to be the best way to get the best silhouettes with the best performance.
  • Twotents
    Options
    Offline / Send Message
    Twotents polycounter lvl 4
    Thanks Ghost that's given me a great answer to my question! Now being better armed I will be able to create the foliage for my scene as I wanted to using alpha cards, the 3D motive tutorial was extremely handy but he doesn't explain why alpha cards where best for game engines.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    If you are doing grass, polygons can be a possible option, 10 tris for a blade of grass and 120 for a clump isn't too expensive, it depends on how well the engine instances it though.
  • Twotents
    Options
    Offline / Send Message
    Twotents polycounter lvl 4
    I'd assume Cryengine would handle that method much better than UDK ZacD?
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    You'd need to test it to get any accurate information on what gives the best look and the performance.
  • Twotents
    Options
    Offline / Send Message
    Twotents polycounter lvl 4
    Awesome thanks Zac I will give that method a try in UDK when I have finished building my assets for the scene :)
  • joebount
    Options
    Offline / Send Message
    joebount polycounter lvl 12
    Geo can be very bad because of aliasing, 1 bit alpha.
  • JonathanLambert
    Options
    Offline / Send Message
    JonathanLambert polycounter lvl 6
    Also, reduce overdraw at the cost of more geo if necessary.
  • Mark Dygert
    Options
    Offline / Send Message
    http://www.polycount.com/forum/showthread.php?p=1520610#post1520610
    Like JonathanLambert pointed out a few more polys to get rid of a lot of transparent pixels is often worth it. Every semi-transparent pixel is a lag bomb waiting to happen especially if the player moves into a position where a bunch of them are stacked up. The less you transparent pixels you have the faster things will go and this is especially important for alpha sort/blend. You want to use it under very controlled circumstances.

    Also if you want opacity correct shadows that gets expensive too, so sometimes people use an invisible stand in model that doesn't use any opacity maps just geometry, that casts nothing but a shadow. Or if you trim your planes pretty close sometimes the geometry can cast a realistic enough shadow.


    http://www.polycount.com/forum/showthread.php?p=1412194#post1412194
    Alpha sort/blend explained in a bit more detail and why sort/blend makes engines and rendering crap their pants.
Sign In or Register to comment.