Author Topic: What's up with transparency?  (Read 3796 times)

0 Members and 1 Guest are viewing this topic.

Offline Alcom Isst

  • 23
  • Chief Gameplay Engineer
    • Skype
    • Steam
    • Twitter
    • Rock Raiders United
What's up with transparency?
LEGO Swarm Interceptor
UEF Uriel
SD Demon

Whenever I view these models in the F3 view with the transparent effect, they all appear like this:

As opposed to a normal ship:

Why? I'm asking because I've been trying to add transparency to some LEGO models in FSO (because some bricks are transparent), but the transparent effect turns out exactly like the effect on the top models, where some polygons are opaque and others are not visible, seemingly at random.
Instructions Unclear: Dragon shoved up Lucifer docking bay.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: What's up with transparency?
Backface culling...
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Nyctaeus

  • The Slavic Engineer
  • 212
  • Shipsmith Emeritus
    • Exile
Re: What's up with transparency?
At the top of the screen in F3 Viewer you have Render Options. You have to deselect some option. I don't remember what was it's name.
Exile | Shadow Genesis | Inferno | Series Resurrecta  | DA Profile | P3D Profile

Proud owner of NyctiShipyards. Remember - Nyx will fix it!

All of my assets including models, textures, skyboxes, effects may be used under standard CC BY-NC 4.0 license.

 
Re: What's up with transparency?
I like how if you reverse the order of the previous two posts they make much better sense.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: What's up with transparency?
Transparency in FSO is tricky. It's tied to object hierarchy and... something else, as well. With simple stuff, it's easy to do, but if you want things like entirely transparent ships, it becomes a bit more difficult.
At the top of the screen in F3 Viewer you have Render Options. You have to deselect some option. I don't remember what was it's name.
He's not asking about F3 view, he's asking about getting transparency right. He likely enabled this view on purpose, it makes the whole ship transparent (I don't know what it's good for).

 

Offline Alcom Isst

  • 23
  • Chief Gameplay Engineer
    • Skype
    • Steam
    • Twitter
    • Rock Raiders United
Re: What's up with transparency?
I like how if you reverse the order of the previous two posts they make much better sense.
At the top of the screen in F3 Viewer you have Render Options. You have to deselect some option. I don't remember what was it's name.
Backface culling...

SD Demon and UEF Uriel
Transparency: on
No Z-Buffer:  off
No Culling:   off = Broken transparency

Transparency: on
No Z-Buffer:  off
No Culling:   on = Broken transparency again

Transparency: off
No Z-Buffer:  on
No Culling:   on = Same effect as broken transparency

GTF Ulysses
Transparency: on
No Z-Buffer:  off
No Culling:   off = Working transparency

Transparency: on
No Z-Buffer:  off
No Culling:   on = Working transparency

Transparency: off
No Z-Buffer:  on
No Culling:   on = Same effect as broken transparency
Instructions Unclear: Dragon shoved up Lucifer docking bay.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: What's up with transparency?
Transparency in FSO is tricky. It's tied to object hierarchy and... something else, as well. With simple stuff, it's easy to do, but if you want things like entirely transparent ships, it becomes a bit more difficult.
At the top of the screen in F3 Viewer you have Render Options. You have to deselect some option. I don't remember what was it's name.
He's not asking about F3 view, he's asking about getting transparency right. He likely enabled this view on purpose, it makes the whole ship transparent (I don't know what it's good for).

Not anymore, it's not. Well, it is but you don't have to think about that anymore. If you have a texture with transparency, name it 'SOMENAME-trans'. (You'll then have 'SOMENAME-trans-glow' or whatever. Then make sure your diffuse -trans texture has an alpha channel. That should do it.

Though, you'll need to make sure to model whatever is being the transparent texture is it allows viewing into the ship. Clear Lego bricks should probably have modeled bricks or Lego people behind them.

NOTE: Last I did this, it did not look right in PCS2, but FSO was fine.

EDIT: The transparency option in the F3 Lab is unrelated to creating transparent glass (or bricks) on ships. Just FYI.
« Last Edit: September 07, 2014, 12:13:29 pm by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Alcom Isst

  • 23
  • Chief Gameplay Engineer
    • Skype
    • Steam
    • Twitter
    • Rock Raiders United
Re: What's up with transparency?
Not anymore, it's not. Well, it is but you don't have to think about that anymore. If you have a texture with transparency, name it 'SOMENAME-trans'. (You'll then have 'SOMENAME-trans-glow' or whatever. Then make sure your diffuse -trans texture has an alpha channel. That should do it.

Though, you'll need to make sure to model whatever is being the transparent texture is it allows viewing into the ship. Clear Lego bricks should probably have modeled bricks or Lego people behind them.

NOTE: Last I did this, it did not look right in PCS2, but FSO was fine.

EDIT: The transparency option in the F3 Lab is unrelated to creating transparent glass (or bricks) on ships. Just FYI.

I renamed the diffuse texture to "SInterceptor-Trans", changed the pof to refer to "SInterceptor-Trans", checked that the texture had an alpha channel, and the model (viewed with default settings) broke, same No-Z-buffer-no-culling effect.

I got experimental and removed the alpha channel. This time, the whole model appeared to be transparent by default, but without the alpha channel this means I can't control which bricks are transparent unless I isolate them and assign them a different diffuse texture.
Instructions Unclear: Dragon shoved up Lucifer docking bay.

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: What's up with transparency?
-trans means the engine uses the amount of black as transparency = the darker the texture the more transparent it is
for normal texture, all you need to do for transparency is to have an alpha channel
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: What's up with transparency?
I like how if you reverse the order of the previous two posts they make much better sense.

Stupid brain of mine is time traveling again.  :rolleyes:
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

  

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: What's up with transparency?
-trans means the engine uses the amount of black as transparency = the darker the texture the more transparent it is
for normal texture, all you need to do for transparency is to have an alpha channel

No, that is not correct. -Trans forces the polygons mapped with that texture to the end of the rendering list so that transparency works correctly without having to make sure they are the last polygons listed on the model's data structure.


Not anymore, it's not. Well, it is but you don't have to think about that anymore. If you have a texture with transparency, name it 'SOMENAME-trans'. (You'll then have 'SOMENAME-trans-glow' or whatever. Then make sure your diffuse -trans texture has an alpha channel. That should do it.

Though, you'll need to make sure to model whatever is being the transparent texture is it allows viewing into the ship. Clear Lego bricks should probably have modeled bricks or Lego people behind them.

NOTE: Last I did this, it did not look right in PCS2, but FSO was fine.

EDIT: The transparency option in the F3 Lab is unrelated to creating transparent glass (or bricks) on ships. Just FYI.

I renamed the diffuse texture to "SInterceptor-Trans", changed the pof to refer to "SInterceptor-Trans", checked that the texture had an alpha channel, and the model (viewed with default settings) broke, same No-Z-buffer-no-culling effect.

I got experimental and removed the alpha channel. This time, the whole model appeared to be transparent by default, but without the alpha channel this means I can't control which bricks are transparent unless I isolate them and assign them a different diffuse texture.

Can you PM me the files and I'll take a look to see where things are going wrong? Or at least show me images of what you are trying to do.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.