Author Topic: opacity  (Read 3766 times)

0 Members and 1 Guest are viewing this topic.

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
it was asked by somebody sometimes ago, but i know you all have a lot to deal with (and are not paied to do so), but...
did somebody looked at how to change the opacity of textures?
(i mean.. to make glasses or even stealth fighters)

*it isn't urgent, i don't need it at all, i'm just curious


(maybe something like calling "glass" a subobject in hyerachy or giving a name like glass01,glass02.. to textures could make the game render them with an opacity of, mmm, like 30%... but maybe there are better ways)

 
Well, I know I can mess around with the alpha code for textures and make all the fighters and objects translucent. Looks pretty funky - like your fighting ghosts.

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
ops i've lost bobbau's other post about that sorry guys

 

Offline Fry_Day

  • 28
unknownplayer, that just simply won't cut it, since stuff will look wrong (Like the half-life training sequence, where there's that hologram, and there are sometimes double-layers because of the back-to-front drawing order and interpenetrating polies). To do a cool looking translucency effect (for whole ships, not single polies), you'd ideally draw every ship in a back-to-front order, and draw ships fading away at a front to back order, so there won't be overlapping transparent pixels (The Z-Buffer should take care of those). if you want only partial translucency, you need to stick to the current back-to-front drawing order, though, but draw all the translucent polies last.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
There's also the issue of what you would see through the "glass". Consider that reverse-wound (IE, backfacing) polys are, IIRC, culled prior to rasterization. That leaves you looking through the glass at the back side of nothing. Transparency on any front facing poly ends up being a window all the way through the ship.

To beat that, you'd have to model in a cockpit of some sort, even if its just a depression in the mesh. Its a whole lot of work for not a lot of return.

On the other hand, adding a model wide translucency handler for creating 'cloak' effects would be reasonable, but it would still be subject to to poly overdraw/overlap issues as Fry Day pointed out.
[I am not really here. This post is entirely a figment of your imagination.]

  

Offline Fry_Day

  • 28
Quote
Consider that reverse-wound (IE, backfacing) polys are, IIRC, culled prior to rasterization.

A simple state-change disables backface culling in the hardware(the culling of faces that aren't facing you), and you'd have to remove only a single "if" statement to disable that sort of culling if it's implemented in software (disable the check if the dot product of the normal vector of the poly and the POV vector is <0)

 

Offline RandomTiger

  • Senior Member
  • 211
Let not go there, that would half the speed of the graphics and there would still be a lot of sorting issues.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Quote
Originally posted by RandomTiger
Let not go there, that would half the speed of the graphics and there would still be a lot of sorting issues.


Agreed. Its too much effort for a minimal return.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Fry_Day

  • 28
RandomTiger, I never, EVER suggested doing so for all polygons. Only for ones marked as transparent (since they're the only double-sided polies), and, assuming noone goes wild with the transparency stuff, the preformance hit wouldn't be that great at all.

 
For the record I was joking...

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
i can't say a word about the tech part...but about the uses i wasn't thinking at cockpits as main goal (to make the inside of a cockpit would be pain the ass with too polys required) but at stealth fighters and architeture things like observatories, hydroponic areas and few others i was having in mind, but i agree it is really a minor thing (well stealth fighters would be cool)

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Quote
Originally posted by KARMA
...architeture things like observatories, hydroponic areas and few others i was having in mind...


Now THAT would be cool! Though I think a nice reflective finish on some surfaces would be used more. Like the shiny winscreens on the fighters, as seen in the spinning ship ANIs.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
You can make invisible but solid faces by asigning them to the texture "invisible." See the Orion's fighterbay. That won't look like glass though. You can also make a face or part of a face transparent by making it bright green, but only when using D3D mode, not Glide. Neither of those would IMHO quite do glass. (And the first at least you can shoot through.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
did you look at my thread about how I have this somewhat implemented
this one
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Fry_Day

  • 28
Bobbau, without sorting, alpha textures look wrong - if, say, the transparent texture is drawn before objects behind it, they won't be drawn at all (because of the Z-Buffer), and everything will look wrong (if you have a huge window set in space, you could theoretically see only space tinted to the color of the window through it, even though you have a ship which you know that is directly behind it.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I only did minimal testing but I think it's sorted,
textures with alpha or any transparency are handeled diferently, it uses the same code to render as the thrusters and weapon effects, only it gives lighting values to the verts before rendering (wich actualy causes a bit of a problem with only the well lit pollys being visable)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
Quote
Originally posted by Bobboau
did you look at my thread about how I have this somewhat implemented
this one


yes i did, i've seen it just after making posting and i was asking excuses for the unnecessary thread before all the tech discussion started:)