Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: aldo_14 on July 19, 2003, 11:27:11 am

Title: Transparent textures?
Post by: aldo_14 on July 19, 2003, 11:27:11 am
Does SCP have any support for transparency of maps.  specifically, handling maps with transparent reigons, like griders?

I'm already using a girder texture with true green transparency, but it's playing hell with the z-buffering from ervery angle but side on, so this is my last hope of getting it working.
Title: Transparent textures?
Post by: NecroBob on July 21, 2003, 12:36:29 pm
what does it look like??  
I was considering something girder-like for a situation probably not unlike your own.

[EDIT]  If it doesn't render the other side of the texture, maybe have a ring of two-sided flats (if it's a support structure of sorts)?  or just a two-sided poly??  just thoughts from a relative n00b :)

also, would varied transparancies (alpha channel)  be difficult to implement???
Title: Transparent textures?
Post by: KARMA on July 21, 2003, 12:48:45 pm
i think that this  has to wait for support for textures with higher bitnumber, elseway...
would it be possible something like the glowmaps, an additional b/w map (like a layer mask) to tell the render the transparency level?
Title: Transparent textures?
Post by: Nico on July 21, 2003, 12:58:14 pm
Quote
Originally posted by NecroBob
[EDIT]  If it doesn't render the other side of the texture, maybe have a ring of two-sided flats (if it's a support structure of sorts)?  or just a two-sided poly??  just thoughts from a relative n00b :)


what I do is I copy the transparent poly and mirror it ( I tried transparent maps a couple times ).
The pb: transparency generates clipping ( again :rolleyes: ).
Title: Transparent textures?
Post by: Unknown Target on July 21, 2003, 02:29:38 pm
You mean just showing the lines of each poly, like in Homeworld?

Or do you mean transparancy? Because that's implemented as bright lime green.
Title: Transparent textures?
Post by: aldo_14 on July 21, 2003, 05:01:31 pm
Green transparency, not wireframe.
Title: Transparent textures?
Post by: Nico on July 22, 2003, 05:02:19 am
Quote
Originally posted by Unknown Target
Or do you mean transparancy? Because that's implemented as bright lime green.


yeah, that as well implemented as multitask in win95.
oh, and voodoo users are ****ed, coz that doesn't even work at all for them.
green sux anyway, an opacity map would be much better, can do gradients and stuff.
Title: Transparent textures?
Post by: NecroBob on July 22, 2003, 03:13:36 pm
I would agree that a transparency\alpha map would be the best idea...

are the mirrored polys right on top of the original?  that would lead to those streaks... might try separating them by hundredths or thousandths of a unit...though they might still be interpreted as too close and get rendered funny...

[EDIT]  does SCP do two-sided polys??
Title: Transparent textures?
Post by: Bobboau on July 22, 2003, 08:05:31 pm
if you place all the transperent pollies into a seperate subobject that is after the main hull object that may fix the clipping problem (not sure what clipping problem you're haveing, I'm assuming you arn't refering to the generaly poor z buffer)
Title: Transparent textures?
Post by: Nico on July 23, 2003, 10:26:48 am
Quote
Originally posted by NecroBob
are the mirrored polys right on top of the original?  that would lead to those streaks... might try separating them by hundredths or thousandths of a unit...though they might still be interpreted as too close and get rendered funny...
 

yes, they're on on top of the original. the pb is not the mirorred side, tho ( it's mirrored, seen from the other side it's invisible ), the pb is where the semi transparent poly joins, say, the hull. you can be sure that patr will half diasppear most of the time ingame.
Title: Transparent textures?
Post by: aldo_14 on July 23, 2003, 01:50:28 pm
Quote
Originally posted by Bobboau
if you place all the transperent pollies into a seperate subobject that is after the main hull object that may fix the clipping problem (not sure what clipping problem you're haveing, I'm assuming you arn't refering to the generaly poor z buffer)


They are.  Basically, it's treating the transparent textured object as if it was completely opaque, so it's occluding the main hull.  But it's projecting it as transparent, so the effect is to show the background as if the hull was not present. Obviously (and understandably) the engine doesn't consider any transparency in the maps when projecting / drawing / whatever temr you want to use.........

It's hard to explain, but here's a pic.

(http://www.3dap.com/hlp/hosted/reciprocity/wipshots/orc_bugger2.jpg)
Title: Transparent textures?
Post by: KARMA on July 23, 2003, 03:04:13 pm
stupid question: i thought that fs2 doesn't handle backfaces
Title: Transparent textures?
Post by: Nico on July 23, 2003, 11:05:05 pm
I explained how to do double sided polys above, rtft.
lol, Aldo, seems we're doing the same things :D
Title: Transparent textures?
Post by: KARMA on July 24, 2003, 04:57:45 am
doh'
:rolleyes:
Title: Transparent textures?
Post by: Nico on July 25, 2003, 10:35:19 am
my exemple:
(http://www.swooh.com/premium/venom/fs2pics/scaP10.jpg)

( to save people the pain, the pics goes from 00 to 11 for that ship, if you wanna mess around with my ftp :p )
Title: Transparent textures?
Post by: karajorma on July 25, 2003, 10:43:23 am
All these transparant textures look beautiful but what is going to happen when the player inevitably bumps into them?


BTW whoa! :cool: Cool ship Venom :)
Title: Transparent textures?
Post by: Nico on July 25, 2003, 10:52:44 am
ok, I've found something: the transparent maps make everything from the same ubobject that is behind disappear.

for exemple:

(http://www.swooh.com/premium/venom/fs2pics/scaP08.jpg)
there's an antenna transparent map just in front of the player. the result is that the large prong that makes the front of the ship disappears completly behind it ( you can see the edge of the antennas map indicated by the fact that the ship reappears next to it ). the rings that rotate around the prong shows, tho, as they're different subobjects. but the little panels on those rings, taht are transparent too, make the parts of their own ring that is behind them disappear too ( you can see quads of space around them, where you should see more metal ).

so.

the simpler way to fix that w/o any SCP help, is to make any transparent object a separate subobject.

In the acse of my ship, it's about impossible, would have way too many of them.
Title: Transparent textures?
Post by: KARMA on July 25, 2003, 11:13:25 am
venom this installation(?) is simply incredible:)
Title: Transparent textures?
Post by: Nico on July 25, 2003, 07:43:43 pm
it's a ship :p
ok, I'm gonna post everything in the modding forum.
Title: Transparent textures?
Post by: Fry_Day on July 25, 2003, 10:01:57 pm
Transparent stuff won't work right now since the drawing order is basically random. If it draws a ship with transparent polygons in the front of the screen, even transparent pixels get their depth written in the Z-buffer, meaning that objects behind transparent areas won't be drawn since they'll be rejected by the Z-buffer. That's why drawing transparent textures MUST be sorted, which is, of course, why textures with alpha channels cannot be currently implemented. BSPs generally lend themselves nicely to easily creating a back-to-front drawing order, but afaik the FS2 BSPs are non-subdividing BSPs, and I don't know how to deal with those, since my knowledge of BSPs is very limited... Perhaps Kazan could give some insights...