Alpha Based Texture Issue On Mesh

Discussion in 'Buildbox General Discussion' started by Satendra Saraswat, Mar 20, 2020.

  1. Satendra Saraswat

    Satendra Saraswat Boxer

    Joined:
    Dec 24, 2019
    Messages:
    14
    Likes Received:
    17
    i am using png texture file on this flower asset.. it look fine in 3dWorld.. but when i play, it looks weird.. any solutions??
    2.jpg
     
  2. Hue Buildbox

    Hue Buildbox Administrator Staff Member

    Joined:
    May 11, 2017
    Messages:
    457
    Likes Received:
    210
     
  3. Satendra Saraswat

    Satendra Saraswat Boxer

    Joined:
    Dec 24, 2019
    Messages:
    14
    Likes Received:
    17
    2.jpg

    In the 3dWorld, i have checked from all views, including camera view.. it's fine. But when i click play, it shows weired...
     
  4. Hue Buildbox

    Hue Buildbox Administrator Staff Member

    Joined:
    May 11, 2017
    Messages:
    457
    Likes Received:
    210
    Yeah, I see what you mean. That is weird. Try turning it around.
     
  5. mohamed awad

    mohamed awad Avid Boxer

    Joined:
    Mar 10, 2019
    Messages:
    315
    Likes Received:
    158
    i think it's turned around,
    if not, maybe it's affected by anther object ?
    maybe gravity
    try to make it kinematic
     
  6. Ivan Perfetti

    Ivan Perfetti Avid Boxer

    Joined:
    Sep 9, 2018
    Messages:
    203
    Likes Received:
    181
    transparency_bug.png @Satendra Saraswat @Sean Buildbox
    Hi Satendra, thanks for your post, I've experienced something like that too, I don't know if this is exactly the same issue but it looks very similar and I want to take the occasion to talk a little more extensively about that so that maybe the guys at Buildbox can fix it soon.
    In my experience it looks like Buildbox has some problems when multiple transparent objects are overlapping and are transparent, even when transparency is minimal; in your case it might be that petals, sepals and other parts of the flower all have somewhat transparent textures or maybe, and this is what happens more frequently to me, there is something else transparent behind or in front of that, like the road, floor or sky maybe. Just look at this picture I've attached: on the right side of the road there is a large crystal, behind that you can see a mountain and part of a lake at the bottom of it.

    Left and center
    Transparency is enabled on the big crystal and the water behind it.

    Right

    Transparency is only enabled on the water.

    The texture on the crystal on the left and center pictures is only slightly transparent, you can see that from the sky and the mountain behind it that are hidden; yet, in the area where the crystal overlaps the water something bad happens, as if the crystal were behind the water!
    If transparency is enabled this happens no matter what the blending mode is.

    My conclusion
    It looks like something related to the depth sorting of transparent objects during rendering, which in short words means that transparent objects are rendered in the wrong order so something that should be in front of another object ends up being behind it, if that's the case this is something that could only be fixed in Buildbox.

    Solution
    There really isn't one in my experience, you might find useful to make sure that if an object has no need to be transparent you disable transparency on it and, if possible, never have multiple transparent objects overlapping.
     
    Satendra Saraswat likes this.
  7. Satendra Saraswat

    Satendra Saraswat Boxer

    Joined:
    Dec 24, 2019
    Messages:
    14
    Likes Received:
    17
    @Ivan Perfetti
    What you have mentioned is exactly the issue.. the flower (RED big chunk) itself has alpha.. then exact behind it, is the green petal which also has transparency.. and so the leaves at the bottom.. now in this case the buildbox engine clips the primary alpha image and shows the one behind it... but the thing that bugs me is that it shows everything fine in 3DWorld mode.. it starts getting weird whey i preview/play it..
    Well.. for now i am modifying the texture and mesh to deal with it.
     
    Ivan Perfetti and Sean Buildbox like this.
  8. Sean Buildbox

    Sean Buildbox Serious Boxer

    Joined:
    Sep 24, 2015
    Messages:
    902
    Likes Received:
    1,076
    @Ivan Perfetti Yes, we are aware of this. Unfortunately this is a limitation we can't yet bypass.

    Best advice is to optimize/work around it for best results as you had said
     
    Ivan Perfetti likes this.

Share This Page