Home Technical Talk

UT2K4 Hair

Dio
Dio
polycounter lvl 18
Offline / Send Message
Dio polycounter lvl 18
Im having issues with the opacity for a hair map. Simple alpha texturing makes the negative space a window through the rest of the model and Masked creates too harsh a transition. Creating a shader out of it resolves the prior issues but inverts the normals when 2 sided is turned on. Is there some method that elludes me or is this a technical limitation of the engine?

Replies

  • Fordy
    Offline / Send Message
    Fordy polycounter lvl 18
    When you say that masked textures creates too harsh a transition, do you mean there's an obvious edge around the hair? If thats the case, you may need to save your texture in a different format. I think DXT 5 may do the trick.

    Take a look here : http://udn.epicgames.com/Two/TextureSpecifications#DXT5
  • lkraan
    Offline / Send Message
    lkraan polycounter lvl 18
    I had that same problem where the option masked really messes up the alpha texture. Even when you convert it to DXT5.

    I wold try to create a FinalBlend shader for this material and play around with the ZWrite option.
    http://udn.epicgames.com/Two/MaterialsFinalBlend
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Hmm I noticed this also. So far no luck with the finalblend options. :/
  • Dio
    Offline / Send Message
    Dio polycounter lvl 18
    When masked is applied the editor posterizes the alpha channel into a black and white image Resulting in the harsh hair boundries which are fine for certain styles but I'd like a more subtle effect.
    Using the FinalBlend I set the FrameBuffer to AlphaBlend, the options to all true, and tweaked the alphaRef # and pretty much achieved my goal. The void window effect might be feathered along the edges but if I tweak the original alpha with the alpha ref choke it should work seemless.




    Edited:
    I was mistaken, the void is exaserpated in-game and leaves me at square one.
  • KDR_11k
    Offline / Send Message
    KDR_11k polycounter lvl 18
    AlphaRef applies to the alpha test ("masked"). I'm not sure when the alpha ordering errors appear but sometimes it works, sometimes not. Separating the alpha polies into another material (or at least making sure they are written last) might help though I don't know if anything other than Milkshape has a fixed export order for the mesh. Generally, don't apply the alpha texture to more than necessary, the engine will draw solid surfaces first and prevent those "holes" from happening.
Sign In or Register to comment.