(SOLVED) OpenGL - Unexpected transparency

Everything related to 3D programming
User avatar
StarBootics
Enthusiast
Enthusiast
Posts: 703
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

(SOLVED) OpenGL - Unexpected transparency

Post by StarBootics »

Hello everyone,

I'm currently working on my 3D game project and something strange is happening on the picture below everything used to work as expected but I have lost few source files and I have to redo the job.
Image

Now this is what I have now, if you check carefully you will realize that I have some transparency.
Image

The main problem here is the fact that I use *.bmp textures (no alpha channel) I have conducted some tests in the fragment shader. Someone have an idea to explain this unexpected transparency.

Best regards
StarBootics
Last edited by StarBootics on Thu Nov 14, 2019 10:55 am, edited 1 time in total.
The Stone Age did not end due to a shortage of stones !
IdeasVacuum
Always Here
Always Here
Posts: 6380
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: OpenGL - Unexpected transparency

Post by IdeasVacuum »

Hi StarBootics

Are you sure that is transparency? It's difficult to see because the image is small.

Potentially, the issue is overlapping mesh faces.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: OpenGL - Unexpected transparency

Post by applePi »

just to remove the possibility that this phenomena is from the graphics card driver or not, i suggest to try the game in a software rendering mode instead of the hardware rendering by the graphics card.
download one of the mesa3d opengl32.dll from here:
https://fdossena.com/?p=mesa/index.frag
better to use 32bit versions
convert your game to EXE and put it in the same folder as OpenGl32.DLL (downloaded from the above link, its size is more than 16MB)
now run your exe, it will be slow since it is rendering via software, and look at the transparency .
the current Mesa3d is simulating opengl functions up to opengl version 3.1
Edit: sometimes opengl behavior is different in 32bit than x64. and in x32 it is better i think
User avatar
StarBootics
Enthusiast
Enthusiast
Posts: 703
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: OpenGL - Unexpected transparency

Post by StarBootics »

Hello everyone,

A better picture here :

Image

I forget to mention that I'm under Linux Operating system not Windows and I'm using the NVIDIA driver. And Yes I have an unexpected transparency we should not be able to see the missile pod throughout the solar panel.

I'm rendering the model using a Forward rendering method.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Enthusiast
Enthusiast
Posts: 703
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: OpenGL - Unexpected transparency

Post by StarBootics »

Hello everyone,

The problem was the NVIDIA video driver because with the "Nouveau" open source driver I don't have any unexpected transparency.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
IdeasVacuum
Always Here
Always Here
Posts: 6380
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: (SOLVED) OpenGL - Unexpected transparency

Post by IdeasVacuum »

Wow - that's surprising :shock:

Drop a line to nVidia and let them know about this issue:
https://devtalk.nvidia.com/default/topi ... ver-bugs-/
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
StarBootics
Enthusiast
Enthusiast
Posts: 703
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: (SOLVED) OpenGL - Unexpected transparency

Post by StarBootics »

IdeasVacuum wrote:Wow - that's surprising :shock:

Drop a line to nVidia and let them know about this issue:
https://devtalk.nvidia.com/default/topi ... ver-bugs-/
I have done that already.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Post Reply