Blender Game Transparent Overlays

Hello,

is there a way to make my overlay scene semi transparent?
Im running blender game on GLSL.

Thanks in advance

Make the objects in the over-lay scene semi-transparent.

1 Like

random person,
that didnt work.
the game engine rendered the overlay scene and then overlayed the render so it looses all its alpha values.

One solution is to just place all overlay scene elements in front of the camera and it works pretty fine.
text doesn’t work like that though. it gets all pixelated and messy.

Huh. Not to say that your wrong or anything, but I was able to get transparency with a ordinary over-lay scene.

As for this –

– Run this script on the text object that is in-front of the camera. It’ll get rid of the pixel-effect.

import bge


def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner

    own.resolution = 12

main()

I’ve already included it in the demo blend file. Hope it helps.

Demo Blend File
Transparent_Hud.blend (100.3 KB)

1 Like

but is he trying to use upbge-eevee? i have no idea what kind of mess they made of the shaders in there.

we have overlay in collection actuator in upbge 0.3.0

and you can certainly use alpha transparency,

it render main -> renders overlay -> composites

also - " i have no idea what kind of mess they made of the shaders in there."

try not to be a dick*

2 Likes

Thanks random person.
I got it to work.
My material’s transparency was set to ‘add’

Daedalus_mdw,
I was using blender’s internal game engine in 2.79

1 Like

add mode = the more objects in line the brighter they get - cheap and pretty -
blend mode = the object in front obstructs the object in back by a % - move expensive but nice -

upbge 0.3.0 is blender’s game engine ported into blender 2.83

if you have a decent gpu it’s fun to play with until you get good at it,
then it becomes an obsession :stuck_out_tongue:

in this version you just mark your UI scene objects by having them in a special collection
and use a collection actuator to set it up as a UI to render with a second camera

keep in mind that in both versions each overlay is another scene to render and can add to the rasterizer and scenegraph too

one can render a UI scene to a buffer - and use GLSL to update it as well using uniforms
this is most likely the cheapest way to run a UI but requires you learn GLSL.