Transparent texture, that show SkyBox, but not details behind?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
SeregaZ
Gnoblar
Posts: 2
Joined: Sun Oct 20, 2024 12:11 pm

Transparent texture, that show SkyBox, but not details behind?

Post by SeregaZ »

Hello. I am actually PureBasic user, but no have answer for my question on it. Even worse - i have no idea how to correct ask my question :)

I have a Cube. It should have some animation texture with transparent. I mean whole texture on a side of Cube is transparent and only some small area - some circle - is not transparent and it moved. Problem starts when behind of that Cube lays other Cube or other details. That transparent part will work like glass and you will see some object behind that Cube. But original game work with a little another logic - it work like some kind of display, not a glass. and when you look into it - you will see SkyBox texture, but not objects, that lay behind Cube. Can you understand my explanation? :) It some kind cut of other part of scene, that lay behind of Cube and show only SkyBox.

Image

Is that passible to make ? PB, probably, have not a some last version of Ogre... but maybe it can be done by some small blood ? Yes, this is not a game, that i make - it just map editor with 3d preview, but will be nice to make it close to game.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2108
Joined: Sun Mar 30, 2014 2:51 pm
x 1134

Re: Transparent texture, that show SkyBox, but not details behind?

Post by paroj »

use "colour_write off" https://ogrecave.github.io/ogre/api/lat ... otoc_md147
and make sure that this part is rendered first. This way you can punch through using the depth buffer.

SeregaZ
Gnoblar
Posts: 2
Joined: Sun Oct 20, 2024 12:11 pm

Re: Transparent texture, that show SkyBox, but not details behind?

Post by SeregaZ »

i have some advice about Material Scripts. and it support by PB (didnt find where in PB "colour_write off" can be used yet). so it can be done with this scripts ? it have some examples, but no comments for it. so it is not clear, but will be nice to know - can i recreate that effect from game with this scripts or not.