Simple Transparency Question

Hi There!

I’m making a super simply low-poly / PSX style game, and I’m having trouble with transparency…

I’m trying to follow this guide, whereby the window texture has 3 levels of transparency (opaque, translucent, transparent). I have a PNG with alpha, but I can only seem to get my window to look like this (with a transparent shader, where EVERYTHING is somewhat transparent:

Or like this, with a ‘cutout’ shader, where the translucency of the window doesn’t show:

Does anyone know how I can very simply recreate the transparency of the window example in the below guide? I’m presuming it’s just a box that I have to tick or something, but I can’t find out how to do it through google…

Many thanks!

There’s nothing particularly special in that example image. It looks like they’re using a legacy or unlit transparent shader. You could try use the “Fade” option on the Standard shader to get close. Otherwise the Legacy > Transparent > Diffuse should perfectly replicate what you see on that page.

Can you post the PNG of the window texture (or a portion of it)?

Hi bgolus! Thanks for your reply!

Trying both the ‘fade’ and ‘trans>Diffuse’ shaders do indeed give the right transparency, but this brings up another problem. When viewed from different angles, different parts of the model randomly ‘clip’ in and out of existence:

(as you can see, half of the window disappears in the rightmost image!)

So I tried googling this problem, and threads like this one seem to imply that there’s a general problem with overlapping translucent textures? Although, I tried out the solution in that thread (to add +1 to “Queue”=“Transparent” in the shader) and it didn’t work at all…

For this model, I’ve actually got one 256 texture which covers windows and doors. Is it just that I’m not allowed to have models with overlapping translucent & opaque textures, handled by the same shader? But that would be annoying, as I’ve made these windows with ‘opening’ and ‘closing’ animations for both the (translucent) windows and the (opaque) shutters, as seen below.

So yeah, any pointers would be much appreciated! Thanks!

Objects that are opaque should use an opaque shader. Only objects that are transparent should use a transparent shader. If you have a single object that is a mix of opaque and transparent areas you should split the objects apart or use multiple material indices so that only the polygons that need to be transparent are using that material. In some cases you may even want to cut polygons along the opaque and transparent sections if you have large opaque areas.

note: If you’re going for PS1 era graphics, the original Playstation had some curious limitations when it came to alpha blending that modern GPUs aren’t good at replicating.

Ah, got it, thanks very much!

I made two versions of the material (opaque and transparent) and applied each corresponding one to the sub-models within the imported blender model. Now it works great! Thanks so much for taking the time to help, I really appreciate it!