how to make a transparent cube so that my character walks inside a building or house and you can see the interior partially, where my character is walking ?

in the reference image i make a blender render with transparency

  1. the house is complete no have cuts
  2. the character is inside the house
  3. the cube is transparent

NOTE: Now ... I have a basic idea to start from, but I do not know if BGE accepts the same form that I use to render, since I use a Boolean Difference modifier, and I do not know completely if these modifiers can be applied to blender game engine

I have seen it in some YouTube videos but I do not know if it is in BGE, and I would like to know if I can do it, it would be great, in logic bricks please, preferably, I'm still a python brute, I have a hard time not thinking about c / c ++ Reference Image reference Link reading Little animation

  • $\begingroup$ i found this, is correct ??? Boolean modifier in game engine $\endgroup$
    – user55877
    May 8, 2018 at 19:23
  • 1
    $\begingroup$ No you can't use boolean modifier in bge nor do any other engines do realtime boolean operations for the effect. The transparency is shader code that clips rendering of the surface by a given formula such as if the point is inside a given axis aligned box or close enough to given 3d position. $\endgroup$
    – kheetor
    May 8, 2018 at 23:39
  • $\begingroup$ @kheetor so how can I achieve this effect in BGE? any idea or suggestion ?!, About 3 months ago I saw a video on YouTube referring to this and today I can not find it to show here to see if someone has an idea of how they did it, on the other hand, in the link that I put in the 1st comment I understand that yes but that only has effect between the two meshes related to Boolean $\endgroup$
    – user55877
    May 9, 2018 at 0:01
  • $\begingroup$ If it was on blender it was probably used in an animation and not bge. I'm not up to date on what's possible on bge these days but I believe you can write your own shaders. $\endgroup$
    – kheetor
    May 9, 2018 at 0:10
  • $\begingroup$ yes, but is very hard :P, i programmer but i rookie in game development area $\endgroup$
    – user55877
    May 9, 2018 at 3:43

1 Answer 1


You can accomplish this effect using material nodes, a mesh, a spot lamp, and a camera.

Blend-File (made in UPBGE 0.2x)



When the spot lamp's shadow, which is casted by the mesh, hits the surface of the building, the casted shadow will act as an alpha (transparency) mask for the building.

Screenshot (nodes setup)

enter image description here



  • $\begingroup$ Hi, thanks for the post. External links are good as supplemental information, but the answer should stand on its own as a source for the full implementation of the process. $\endgroup$ May 15, 2021 at 0:06
  • $\begingroup$ Thanks for pointing that out. How do you suggest I edit my answer to better fit the question? By include a screenshot of the node setup perhaps? $\endgroup$
    – RPaladin
    May 15, 2021 at 0:42
  • $\begingroup$ A screenshot and accompanying description would work great $\endgroup$ May 15, 2021 at 1:36
  • $\begingroup$ Thank you, I've updated my post with additional information. $\endgroup$
    – RPaladin
    May 16, 2021 at 3:56

You must log in to answer this question.