Occlusion/mask texture?(That is, a texture that "cuts though" to the background

Started by Darkflame, August 13, 2010, 04:15:15 PM

Previous topic - Next topic

Darkflame

When loading some of my 3ds models into the engine, I noticed occasionally I got an effect where the texture effectively cut right though to the background. That is, things were not just transparent, but made everything behind them invisible too.
This was due, as far as I could tell, due to mapping errors in my 3d file.

However, its a useful effect and Id like to reproduce it.
Specifically, as I'm working on an AR application it would be a good way to "mask out" real world objects so that other 3d objects could be seen to go behind them.

So I wondered what texture setting is needed to reproduce this effect intentionally?

Hope I explained myself well enough, if not I'll do a picture to illustrate.

EgonOlsen

An example screen shot would be cool. I'm not sure if i get what you mean.

Darkflame

Thought I might need visuals :)

Heres a screen from the app of my accident;


And a concept one quickly made in max;



I think I've identified that its caused by having pure black in a texture. That makes it transparent, and then some draw order issue makes it into a mask to the background? Either way I'd like a really reproduce this reliable in code. (and preferably understand why it happens)






[attachment deleted by admin]

EgonOlsen

I'm not sure...must have to do something with alpha. Black areas get full alpha be default, but i'm not sure what causes it to cut through to the back ground. Try to load the texture with the useAlpha-parameter set to true and the effect should go away (just to be sure that this really causes it).