Alpha transparency and object viewer.
5 posters
Page 1 of 1
Alpha transparency and object viewer.
I'm producing a lot of objects using PNG textures with alpha transparency instead of the traditional "transparent (color value) R,G,B".
The results are good in Open v 1.4.3.0, superior to the set color method.
The problem is, when using the Object viewer, the weirdest effects occur. I don't know why, but imagine its perhaps due to Viewer's different handling of backface culling compared to the actual program itself??? Route Viewer is also unhappy with alpha transparencies.
Anyone else got the same problem, or found a getaround???
* The Object Viewer included with Richard Ward's rewritten v1.4.3.2 does the same, by the way.
The results are good in Open v 1.4.3.0, superior to the set color method.
The problem is, when using the Object viewer, the weirdest effects occur. I don't know why, but imagine its perhaps due to Viewer's different handling of backface culling compared to the actual program itself??? Route Viewer is also unhappy with alpha transparencies.
Anyone else got the same problem, or found a getaround???
* The Object Viewer included with Richard Ward's rewritten v1.4.3.2 does the same, by the way.
Re: Alpha transparency and object viewer.
Yeah, this was happening to me as well. I would say the Object Viewer struggles to display the alpha channel of the png correctly, it must be a code problem. Moreover, leaving an alpha channel in a png is way more demanding than sticking with the traditional TransparentColor method.
Re: Alpha transparency and object viewer.
Depends on the purpose. For simple transparencies (none and full) the colour-keying is better I think. But if you need demi-transparencies, alpha channels are the only way to go. And I don't think it's that much of an impact on modern GPUs, since they have to deal with alpha transparencies everywhere now.
Quork- Posts : 1437
Join date : 2012-05-05
Age : 32
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Alpha transparency and object viewer.
Moreover, leaving an alpha channel in a png is way more demanding than sticking with the traditional TransparentColor method.
I checked the fps and it seems not to be a problem using alpha transparencies. One test item was a pile of trees with alphatrans, produced with the "Forest Builder" utility. Lots of rotations and x/z offsets to 3 decimal places but no drop in fps.
Re: Alpha transparency and object viewer.
Only just got as far as replying to this
The phenomon you are seeing is a problem caused by incorrect Z-Sorting.
Z-Sorting is whereby the graphics driver/ OpenBVE engine renders each model and attempts to determine what should be shown actually on screen.
If this sorting is wrong, which is normally caused by looking at one alpha face through another, or one semi-transparent face through another, then you'll see a semi-transparent version of the face behind's texture painted on the solid face, or a gap if your viewing angle leads you to look through a completely transparent area in the second texture.
Color key transparencies aren't affected, as the transparency will be dealt with internally to the OpenBVE engine, as opposed to be being passed off to the graphics card drivers.
Not sure why it only affects Object Viewer/ Route Viewer, but I suspect the renderer is slightly different to allow for AA/AF in the main game. You might try forcing AA/ AF to maximum through your graphics card driver.
AFAIK, Richard Ward hasn't done much (If anything) to the base game renderer, which would probably require a complete rewrite of the OpenGL drawing.
Final note-
The potential performance issues are again going to be connected to the graphics card in use. In normal usage, OpenBVE is heavily CPU & disk read dependent.
However, if you're using large numbers of alpha transparencies, the graphics card will start having to do much more work, especially if you start pushing AA/AF as well. Try large numbers of alpha transparencies on an older integrated graphics card, and I think you should see a far bigger effect
Edit:
OpenGL article, look at the last part and the diagrams and it may explain a little (Or confuse you more ) - https://www.opengl.org/wiki/Transparency_Sorting
Cheers
Chris Lees
http://www.bvecornwall.co.uk
The phenomon you are seeing is a problem caused by incorrect Z-Sorting.
Z-Sorting is whereby the graphics driver/ OpenBVE engine renders each model and attempts to determine what should be shown actually on screen.
If this sorting is wrong, which is normally caused by looking at one alpha face through another, or one semi-transparent face through another, then you'll see a semi-transparent version of the face behind's texture painted on the solid face, or a gap if your viewing angle leads you to look through a completely transparent area in the second texture.
Color key transparencies aren't affected, as the transparency will be dealt with internally to the OpenBVE engine, as opposed to be being passed off to the graphics card drivers.
Not sure why it only affects Object Viewer/ Route Viewer, but I suspect the renderer is slightly different to allow for AA/AF in the main game. You might try forcing AA/ AF to maximum through your graphics card driver.
AFAIK, Richard Ward hasn't done much (If anything) to the base game renderer, which would probably require a complete rewrite of the OpenGL drawing.
Final note-
The potential performance issues are again going to be connected to the graphics card in use. In normal usage, OpenBVE is heavily CPU & disk read dependent.
However, if you're using large numbers of alpha transparencies, the graphics card will start having to do much more work, especially if you start pushing AA/AF as well. Try large numbers of alpha transparencies on an older integrated graphics card, and I think you should see a far bigger effect
Edit:
OpenGL article, look at the last part and the diagrams and it may explain a little (Or confuse you more ) - https://www.opengl.org/wiki/Transparency_Sorting
Cheers
Chris Lees
http://www.bvecornwall.co.uk
Re: Alpha transparency and object viewer.
Well, I didn't understand much of that link, though I'm sure its all very true.
What I did just now was to run the same test piece on a laptop I use with more basic graphics and that was fine.
Then I ran it on the old office knacker machine with no extra graphic card (using v.1.4.2.0) and it ran at around 45-55fps and displayed the problem objects correctly.
So its definitely only the dev tools that display wrongly, rather than the prog itself.
Also remember, the program offers interpolation options, which cause strange effects when not correctly set - I found the default settings weren't right*, so probably the tools aren't right either. But the tools have no options to adjust, it's "one size fits all" !!
* *These settings display all the CTS stuff correctly.
What I did just now was to run the same test piece on a laptop I use with more basic graphics and that was fine.
Then I ran it on the old office knacker machine with no extra graphic card (using v.1.4.2.0) and it ran at around 45-55fps and displayed the problem objects correctly.
So its definitely only the dev tools that display wrongly, rather than the prog itself.
Also remember, the program offers interpolation options, which cause strange effects when not correctly set - I found the default settings weren't right*, so probably the tools aren't right either. But the tools have no options to adjust, it's "one size fits all" !!
* *These settings display all the CTS stuff correctly.
Re: Alpha transparency and object viewer.
For some reason I make my work by running it in Open Bve.
I can't think of any better way to find out how something looks in the sim itself.
I can't think of any better way to find out how something looks in the sim itself.
Stevegr- Posts : 188
Join date : 2013-01-01
Similar topics
» All of a sudden - Route viewer and Object viewer not working
» should default option for object optimization mode in object viewer is low or high instead none ?
» Unable to load wavefront object in Object Viewer
» Object disappeared in object viewer
» object using new renderer in object viewer not blend texture correctly than using old renderer
» should default option for object optimization mode in object viewer is low or high instead none ?
» Unable to load wavefront object in Object Viewer
» Object disappeared in object viewer
» object using new renderer in object viewer not blend texture correctly than using old renderer
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum