Home Technical Talk

Foliage Question (Backface Cutting Blender+Unity)

Fenyce
polycounter lvl 11
Offline / Send Message
Fenyce polycounter lvl 11
Hello everyone!
I'm still a noob when it comes to working with game engines sooooo I've got a question...

I'm having trouble with backface cutting atm.
(I'm using Blender and Unity)

I'm doing some alpha textures for foliage (leaves and flowers and stuff like that) but when importing my blend files to unity the backfaces are gone, so I can only see the the planes that will get the alphas applied from one side.

After some research I didn't come up with a good solution... Only thing I came across was duplicating the faces and flip one to the other direction... But that will increase the polycount...

Does anyone know a good (and simple) solution for alpha planes?

Thanks.

Replies

  • WhiskyDelta
    Options
    Offline / Send Message
    WhiskyDelta polycounter lvl 6
    In my experience that is exactly what you want to do. Polycount on things like that wont make that much of an impact as while you are doubling the polycount, you would only be doubling 100 to 200 tris for some grass or bush etc. I am sure there is a double sided shader in Unity (cant remember off the top of my head) but i cant say for certain it would do different shading for either side of the mesh. What i mean by that is, you would expect the underneath of the leaf to be shaded darker than the top but if you are rendering a single polygon, double sided it may duplicate the shading on both sides, so one side would look unnatural. I am sure a custom shader could calculate them different as if you have doubled up the polygons but all it will be is duplicating and flipping the normal's at run time so no real benefit than doing it manually.

    So in short, i duplicate the polys, use a simple single sided transparent material.

    Whisky
  • Fenyce
    Options
    Offline / Send Message
    Fenyce polycounter lvl 11
    Thanks for your reply WhiskyDelta!

    I'll guess I'll go and give dublicated geometry a go for the moment.
  • Fwap
    Options
    Offline / Send Message
    Fwap polycounter lvl 13
    Unity comes with a tree creator package, in that they have a shader for a double sided material. Nature/Tree Soft Occlusion Leaves.

    Probably not a permanent fix though.
Sign In or Register to comment.