Home Technical Talk

UDK - Transparency problem Help

djoexe
polycounter lvl 7
Offline / Send Message
djoexe polycounter lvl 7
Hi, I'm currently doing test with materials to improve my knowledge. I've done a simple sand dune and I want to have a fading texture to blend the mesh into the terrain itself.

Here is the problem I got...


If I chose MASKED, i got this result
Untitled-2_zps2c624860.jpg

If I chose Translucent, I got the result I want but now I see through my dune.
Untitled-3_zps143c352c.jpg
Untitled-4_zps0be51e47.jpg

So as I do not have super knowledge in shader creation, where do I get wrong ?

Thanks

Replies

  • James Ordner
    Masked mode is either fully transparent or fully opaque, there is no blending. However, transparent mode should be able to achieve what you want. Double check to make sure your alpha map is at full value in the areas that should be 100% opaque.

    Edit: I'm wrong. I thought it was working on my end, but it's doing the same thing that yours is.
  • Santewi
    Edit: I'm wrong. I thought it was working on my end, but it's doing the same thing that yours is.

    Yep. Annoys the hell out of me. Been trying to fix this for a while now...
  • Adij
    Offline / Send Message
    Adij polycounter lvl 8
    random idea: check compression settings
  • James Ordner
    Adij wrote: »
    random idea: check compression settings

    Even if you apply a constant (1) to the opacity slot, the problem is still there.
  • seenooh
    The solution is go to the Translucency Category in the Material Editor properties section below and find the check box "Use Lit Translucency Depth Pass" and enable it.

    I also advise you of correcting your mask (I see you use a OneMinus node) to save one instruction as well as utilizing the alpha channel of the diffuse map to put that mask in instead of a dedicated texture. That would save some texture memory specially if you intend to use this method repeatedly with other meshes.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Change the Alpha in your image editing software, since One-Minus is direct math invert, so you will get alot of aliasing issues.

    Also, changing the compression and size of the texture will also affect quality.
  • djoexe
    Offline / Send Message
    djoexe polycounter lvl 7
    Seenooh : Thanks a lot my friend ! Thats the solution I was searching for, big thanks.

    Untitled-5_zpscb30cf02.jpg

    This thread is resolved, thanks again ;)
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 17
    what you could do that would be less expensive as far as materials. it would use 2 material IDs. the upper parts that are intended to be solid sand will be a basic sand shader without the use of any nodes for opacity.. then the ends will use a 2nd material and have the transparency nodes plugged in, making them fade out.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Remember that a Translucency material will be super expensive compared to everything else, especially if two of them are overlaying each other, you lose any kind of self-shadowing and a few other things/problems may occur, especially if you need finer edges with sorting.

    I also think Translucency based materials don't like certain kinds of shadows being cast on them.
  • seenooh
    djoexe wrote: »
    Seenooh : Thanks a lot my friend ! Thats the solution I was searching for, big thanks.

    No problem man, but may I ask what you are trying to achieve? If this is like a material excersice for you then fine, but otherwise this method isn't ideal due to the fact that translucent materials are not very good for performance.
  • djoexe
    Offline / Send Message
    djoexe polycounter lvl 7
    Seriously I didn't know that translucent materials wasn't good. I try to use this method to put dune where I wanted as a static mesh...like this.
    Highres_Screenshot_00000_zps10b624a9.jpg

    This setup is only made of one static mesh duplicated everywhere and they intersec with each other without any seams at all, thats what I was searching for. But as a lot of you guys telling me this is not optimal for performance, well I gues there is a better solution.

    I would go with a single big static mesh with tons of dunes everywhere and then I would convert this static mesh as a Heightmap to put it straight into UDK as a Landscape, so I could modify it as I wish.
  • seenooh
    Yes you can easily achieve that with Landscape.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    You can very well keep on doing this method, but as Seen mentioned, just use the landscape/terrain tools since that is their purpose.

    Something like this for a demo is perfectly fine in offtime, but this method would never fly in a studio or production setting since the cost is too high for what is essentially a 'piece of ground' you will be walking on.
Sign In or Register to comment.