X-Ray Objects?

I have always wondered how to make an object visible behind a wall and other objects… But, I’ve never tested it out because I wouldn’t know where to begin. I’d like to have a visible silhouette being displayed only when the character (or part of the character) is behind an object.

Does anyone know, or have any ideas on how, to accomplish this?

My first thought would be to use a separate Render Layer for the object that shows through, and use the Compositor to pipe that into an AlphaOver with the rest of the Scene. Maybe there are other ways of doing it - but this way is pretty simple and flexible.

-rking

you won’t be able to use the compositor in the game engine!
in the object buttons, you can set the xray option for the object, but this is also not working in the game engine (at least in glsl mode).
maybe there is a way to accomplish this using python. or use a custom shader, which renders the object even if it is out of the occlusion culling range.

Crud! Every so often I forget to look at the section a post is in and get it way wrong. Thanks for the pick-up, fellas.

-rking

Thanks for that sevi, but not quite. The more I think of this, the more I wish I named the Thread ‘Dynamic Silhouette’…
Instead of an alpha, there should be a solid color silhouette-like representation of the character that’s behind the wall. And, since the character is animated, there wouldn’t be a predetermined shape. I think just creating a silhouette is part of the challenge. The real challenge may be detecting when PART of the character is behind a wall and only showing some of the silhouette for that hidden body part…

I wish I was a mad programmer who knew the know-how to everything lol.

mhhh, like i said, it is something in the direction… you could probably post a sketch, of how exactly it should look …
Maybe then we could better imagine, what you request…
I remember a file, where the silouettes of an obect are drawn, using filters, but i dont remember where – ;-(

The main cube (assume that’s a character) is behind a few walls, but is being exposed in the middle. However, you can see a silhouette of the character through the walls. This is precisely what I’m looking for…

ok, thatshows exactly, what you mean.
That is very interesting, but cant imagine any solution .

  • probably a shader could do that
  • a projection of light might be way
  • an overly scene showing only the rendered cube(how to render obly the cube that is behind some object)

ah¨!! an idea:
if the cube is on a another scene than the rest of th scene:

render an image of the cube in realtime(look for realtime mirror)
on an overlay scene, add a plane wich shows this image using videotextures.
place this plane on the right place in front of the object…
make it haf transparent -

this might work…

That sounds interesting, but the problem is the silhouette shouldn’t be visible where the player is at all. It’ll pretty much go against my design plans.

I just had a thought… If I can find a way to use that idea to create a PNG texture on every environment object that has alpha, enable reflection mapping, and a second object copying everything the character is doing in the next scene. If that’s possible, I’d use that. But, now speed is my next concern lol.

What do you think?