Elvas Tower: Transparent textures not displaying - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Transparent textures not displaying Rate Topic: -----

#1 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 09 April 2020 - 06:55 AM

I have noticed that there is a difference between how transparent textures are displayed between the stable version, and the testing or MG version.

Here is an example. In the picture I have a control handle, this is made up of two objects, one has the main texture on it, and the other one has a texture that is mainly transparent except where I have added highlights, or shadow. The transparent object is placed just in front of the main object, so that the highlights are added to the object. In the first picture, this displays correctly in the stable version of OR, whereas in the second picture, taken when using unstable version (X1.3.1-124-g5037f814 ), the transparent texture does not display.


Attached Image: handle1_stable2.JPG

Attached Image: handle1_testing.jpg

Is this a bug?


Geoff

#2 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,458
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 09 April 2020 - 07:49 AM

Hi Geoff,
I don't think I'm able to solve your problem, but only for clarification:
You're writing "in the second picture, taken when using unstable version (X1.3.1-124-g5037f814 )". That version ID refers to the testing version, and not to the unstable version. Are you confirming that you get the problem also with such testing version?

#3 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 09 April 2020 - 07:53 AM

Hi Carlo,

Yes, the problem is the same with the testing version, and also the most recent MG version too.
Geoff

#4 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 09 April 2020 - 01:08 PM

Just some clarification of this problem. If the transparency has solid areas of colour, then it displays, but if it has semi-transparent colours, like a tinted window, for instance, then that will display as if it was clear. Could this be something to do with shaders? I'm guessing as I don't know how these things work.

Geoff

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,458
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 09 April 2020 - 10:39 PM

You can easily check whether this is a problem due to differences in .fx files (that is shader files).
Go into the Content folder of the stable and of the testing version of OR, and swap the .fx files. Don't do the same with the Unstable version, because the Monogame-based versions have .fx files that are incompatible with the preceding ones.
If you won't find differences, that does not fully exclude shader problems, because preparation for shader data is done within the main OR code.

#6 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 10 April 2020 - 12:50 AM

Hi Carlo,

I swapped the .fx files, but that did not make any difference.

I may try using re-shade to see what effect that has.

Geoff

#7 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 18 June 2020 - 09:56 AM

I am still experiencing this graphics problem. In my model, I have a window glass transparency that is shaded grey with some dirt marks around the edges. This is done with a TGA alpha texture.


In the Stable release it looks like this, which is what I intended:
Attached Image: window_v1.3.JPG


In the MG version Rev 65, and the Testing version X1.3.1-124-G5037F814, it looks like this:
Attached Image: window_testing.JPG

Should I report this as a bug?

Geoff

#8 User is offline   vince 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,316
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 18 June 2020 - 11:41 AM

I seem to remember the same problem with a texture edging, wanting a 'soft' edge on a transfer texture.
I traced the problem to the type of compression I used on the texture texture.ace file. And I'm sorry, no, I don't recall which compression method caused the problem.

regards,
vince

#9 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 19 June 2020 - 02:08 AM

I have also tried this texture as a .dds file. The results were the same. The stable version displays correctly, while the testing and MG versions do not. That leads me to believe that the texture is not the problem, but something in the way it is displayed.

Geoff

#10 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,061
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 19 June 2020 - 02:31 AM

Since v1.2, 8-bit alpha channels in the 3D cab are kind of difficult and erratic to manage. Any part with transparency needs to be a totally separate drawcall, i.e. a separate part from the top node. Attempting to merge all static parts into one mesh will cause 8-bit alpha channels to render as 1-bit. Curiously, you can use the same shape that renders improperly in the 3D cab as a passenger view and it will render fine.

If you have a freight shape that is tagged to display in the 3D cab view, with an 8-bit alpha channel applied, if any part of it renders within the boundaries of the 3D cab, then its alpha channels will render as 1-bit as well.

As we all know, shadows don't render in 3D cabs the way they do in passenger views. I really don't understand why the passenger view and 3D cab follow completely different sets of rules for how they render, but they do.

I hesitated to bring up anything involving alpha channels because I was worried that, if any modifications to the way that OR renders alpha channels were to be done, some well-meaning programmer might attempt to reintroduce the MSTS alpha sorting, which is a horrendously bad idea. I think that we should all make note of the fix for this problem, then delete this thread to minimize the risk of that happening.

#11 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 19 June 2020 - 03:36 AM

Hi ErickC
Thanks for your comments. I thought that in order to make this a separate drawcall, I could try adding an animation to the window. This had no effect.

Geoff

#12 User is offline   dennisat 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 21 June 2020 - 12:40 AM

Hi,

There appears to be similar transparency effects on your class 47 cab windscreens and they work. I'm probably missing something or seeing something that's not there!

Dennis

#13 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 21 June 2020 - 09:59 AM

Thanks Dennis, I will check.

#14 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 24 June 2020 - 03:23 AM

As Dennis observed, my type 47 cab has 8 bit transparencies and they display correctly in MG and Testing versions.

So I did some tests. I added the windscreen out of my Falcon model into my steam engine model in TSM and re-exported the model. The problem persisted, in that the screen was visible in the 1.3 stable version but did not show in the MG or Testing versions.

So I added the window from my steam engine model into the Falcon model, and re-exported it to OR, and it did display in all versions. As can be seen in this picture.

Attached Image: window_MGF.JPG


So that suggested that it is a problem with the steam engine model, but not at the component level. So I made a copy of the model and deleted everything in it except for the windows and MAIN component. The window still did not display in the MG version or Testing version.

So now I am totally confused and out of ideas.

#15 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 812
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 25 June 2020 - 06:25 AM

As I had no more ideas on the problem, I decided to get on with the modelling on my cab. One of the next things I want to add is the boiler level glasses. These will be transparent too and so I added a simple shape with a green tinted glass texture.

Not surprisingly, the boiler glasses did not display in the MG version, but imagine my surprise when I noticed that the window glass was now being shown!

So I deleted the boiler glasses again from the model and tried again. Sure enough, the window glass did not now display.

Then I added the window out of my Falcon model in addition to the boiler glasses. Surprise! Both boiler glasses and the window glass are displayed!

How wierd is that?

Attached Image: Capwip6.JPG


The Falcon windscreen I added is above the cab, but if I move my viewing position, up above this cab, the window is not showing. But, and here is a big BUT; if I move closer to the position where the window glass should be, eventually, it appears. If I move away, it disappears again.

Someone who knows about graphics may be able to explain this..

Geoff

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users