Page 1 of 1

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

Posted: Sun Oct 20, 2024 12:31 pm
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.


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

Posted: Wed Oct 23, 2024 12:05 am
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.


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

Posted: Tue Oct 29, 2024 6:10 pm
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.