[Solved] Transparency in BSP models
Posted: Fri Dec 08, 2006 6:28 pm
Let's start with a little introduction:
I want to make a fog effect, based on several transparent sheets in a row.
The farther you look, the more sheets you see and the foggier the view gets.
But in openGL you can only see a transparent sheet through another transparent sheet, if the sheet behind is rendered BEFORE the sheet in the front. But because I have no influence on the rendering order when I build my map in GTK-radiant, I have no chance getting this fog effect working as I want.
I know, it's difficult to decide which sheet is nearer to the player (that's exactly why we use bsp models), but in my case it would be accurate enough if we just check the middle of the sheets (or maybe the nearest vertex) because I won't make difficult structures with transparent textures.
I hope this is possible
On the pictures below, you can see some problems caused by wrong rendering orders (the red texture is transparent too).
<=>
<=>
<=>
I want to make a fog effect, based on several transparent sheets in a row.
The farther you look, the more sheets you see and the foggier the view gets.
But in openGL you can only see a transparent sheet through another transparent sheet, if the sheet behind is rendered BEFORE the sheet in the front. But because I have no influence on the rendering order when I build my map in GTK-radiant, I have no chance getting this fog effect working as I want.
I know, it's difficult to decide which sheet is nearer to the player (that's exactly why we use bsp models), but in my case it would be accurate enough if we just check the middle of the sheets (or maybe the nearest vertex) because I won't make difficult structures with transparent textures.
I hope this is possible
On the pictures below, you can see some problems caused by wrong rendering orders (the red texture is transparent too).
<=>
<=>
<=>