3dobject opacity

Not favoritedFavorited Favorited 0 favourites
  • 11 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • around the edge of the green hexes I have 2 layers of hexes that are set at 1% opacity, the blue background comes from a textured skybox scaled up to 5000x5000x5000 and centered on the camera loc. I have tried a bunch of different things to get the skybox color to come through where the transparent hexes are, but I can not figure it out, i only ever get the background color for the layer.

  • Transparency in 3D is tricky. The main thing to do is make sure the transparent content is drawn after its background. One way to do that is to use layers - make sure the background (e.g. skybox) is on a separate lower layer and that should mean it is drawn first.

  • I also made this shader that discards semi-transparent pixels: construct.net/en/make-games/addons/1561/alpha-cutout

  • Yes, I have multiple 3d layers, layer 0 is the only one with a background color and also has the skybox in it. they are all set to camera distance mode... but that is just looking at the skybox object center, which is the camera location. I set the background to zorder and it works.

  • btw Ashley I think it should be considered to add something like that alpha cutout to the 3D material, with option for real transparency, cutout/scissor, and dithered opacity.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The engine already supports any draw order when using full transparency (alpha exactly equals 0). This works well with nearest sampling for retro style games. Semitransparency is trickier as it tends to still require the correct draw order. If you impose an arbitrary cutoff between 0% alpha and 100% alpha, then it doesn't really solve the problem - it just reduces the alpha range where semitransparency issues occur. I guess dithered opacity is an interesting idea, but it sounds like it might be tricky to achieve in a stable way as the view is changing, and it probably has a particular artistic look that not everyone would want to use.

    Semitransparency does work in 3D so long as the draw order is correct - so I think if we need improvements it might be to better/more easily adjust the draw order to work correctly with transparency. It's a difficult problem though - transparency is notoriously difficult in 3D.

  • if you have linear filtering it will always introduce some semi transparency at the edges even if the texture only has absolute transparency, this is what the cutout solves, this is a technique used in basically every 3D engine to allow (absolute) transparency in the (cheaper) opaque pass, for example for foliage.

    Dithered transparency is also still used in todays console generation, if you look at switch 2 games, for example Duskbloods. Common case for dithered opacity is also switching LODs, so models in the opaque pass can have a less harsh transition to their lower LOD.

  • Duskbloods upcoming Switch 2 game, the player transforms into a dinosaur, the model gets faded in using dithered opacity.

  • And here a close up of the foliage cards in Elden Ring Nightreign, you can clearly see both the alpha discard (smooth but hard pixel steps) and you can also see the dithered fading of the foliage close to the camera.

  • Duskbloods upcoming Switch 2 game, the player transforms into a dinosaur, the model gets faded in using dithered opacity.

    Yeah last time I checked a lot of modern games handle semi-transparency with dithering because dealing with transparency + shaders is such a nightmare they just kinda gave up.

  • For effects like this, I’d probably use alpha cutout instead of true transparency when you only need pixels to be either fully visible or fully invisible. It seems like a much better fit for things like foliage, fences, and similar materials.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)