BVE5 Support
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Those Irritating Dithered edges to Transparent Areas

2 posters

Go down

Those Irritating Dithered edges to Transparent Areas Empty Those Irritating Dithered edges to Transparent Areas

Post  guillyman Sun May 27, 2012 8:31 am

Last night I decided to address the issues of the "dithered" edges to transparent areas on BVE5 objects. In particular I examined the overbridge at Richmond Station in the TWI-WAT route. As eezypeazy has already indicated, these edges between transparent and non-transparent areas show as a lighter line of pixels which give the impression of a gap in objects. Worse still they flicker as you approach them, which of course draws attention to them like a sore thumb.

This evening I shall try some experiments with defining several vertices common to each face in the object to see if that improves matters. If it does then I shall post back with the results and make some recommendations as to the future building of such objects. I believe that BVE5 is forgiving enough regarding having extra faces, so I am hoping this technique will not compromise the FPS performance too much.

Regards!

Alan. Smile
guillyman
guillyman
Admin
Admin

Posts : 120
Join date : 2012-03-13

Back to top Go down

Those Irritating Dithered edges to Transparent Areas Empty Re: Those Irritating Dithered edges to Transparent Areas

Post  guillyman Sun May 27, 2012 11:42 pm

Ok, yesterday evening I played around not with the Church Road Bridge across Richmond Station, but rather with the Torquay Bridge which had found its way into the Twick route mainly for illustration purposes. Besides, it was smaller!

This was how it displayed as the object had been written:

Those Irritating Dithered edges to Transparent Areas Bridge10

Note the line of light "dithered" pixels around the line of the arch. This object was built in the usual way, with the front face defined by four vertices A, B, C, D and a transparent area defined as black in the object file as follows:

Those Irritating Dithered edges to Transparent Areas Tunnel10

It appears that whatever settings you apply, BVE5 will dither the edge to the transparent area, although this seems to be the case only where another face meets that edge at near right-angles - this may need confirmation.

However, supposing we now limit the way we display our texture not by a transparency, but by defining the areas to be displayed by introducing more vertices as follows:

Those Irritating Dithered edges to Transparent Areas Tunnel11

This time more vertices (shown in red) have been added prescribing the areas we want to be displayed, and more faces have been defined. (shown by the red lines) Note that these individual triangular and other faces contain no reflex angles - this is important! We then arrange that all other faces to join up with this tunnel mouth texture then are defined by vertices exactly identical to those in red on the tunnel face. This will eliminate any gaps and since no transparencies are involved, rather only specifically defined faces to show, we also rid the display of those nasty dithered edges.

Q.E.D.

At this point of course, I would normally upload a screenshot to show the results, but whereas I had proved in the openBVE object viewer that the technique works, once I tried to obtain a screenshot from the BVE5 route the mistakes started to happen. scratch Well it was getting on for 04:30, so it was little wonder. I will try again this evening.

Alan. Smile
guillyman
guillyman
Admin
Admin

Posts : 120
Join date : 2012-03-13

Back to top Go down

Those Irritating Dithered edges to Transparent Areas Empty Re: Those Irritating Dithered edges to Transparent Areas

Post  eezypeazy Mon May 28, 2012 8:55 pm

Apologies for not having much time for BVE at the moment... but the sun's shining!

I think this is going to turn out to be something to do with how BVE 5 is handling transparencies generally, rather than just adding faces to resolve issues on specific objects - it's not just dithering on edges. Remember the cyclists on the Aln Valley route? Obviously, there needs to be transparency through the wheels! But in BVE 5, the transparency applies not just to the wheel, but to everything else behind - in other words, you can see through the wheel and right through to the background image. I've also noticed this on some tree objects - you can see past the ireregular transparency around a tree, but also through areas of nearby grass textures, all the way to the background image (on both machines here) - and it was also apparent on the bridge I was working on.

Hopefully I'll get round to uploading the route in the next few days so other people can have a look too.

eezypeazy

Posts : 32
Join date : 2012-03-20

Back to top Go down

Those Irritating Dithered edges to Transparent Areas Empty Re: Those Irritating Dithered edges to Transparent Areas

Post  guillyman Mon May 28, 2012 11:16 pm

Yes, I agree with you, eezypeazy, about the transparencies in general. It happened in openBVE too, although you could do something about it by altering the anti-aliasing (or something like that!) in the settings options. However, many users discovered that when they built an object it would display perfectly in the structure viewer, then differently again in the route viewer, and then in the game itself would appear with bloody great gaps around the edges. (Sorry about the profanity, but you can understand just how frustrating it is when you have spent many hours on your masterpiece...)

I'm not suggesting that we pick out individual bicycle spokes as separate faces, rather that if you have two or more larger faces coming together then use the technique I have described. It has many advantages:

1) It avoids those lighter dithered pixels

2) You don't see those irritating pixels appearing like a saw blade against other textures not at right-angles, so it particularly lends itself to multiple curved surfaces. Simply apply some custom normals and what would be otherwise seen as a ragged edge appears as smooth as a baby's bottom.

3) You don't have to spend all that time picking out all the individual black transparent pixels.

4) Re-skinning then becomes easier if your new texture simply has to be pinned to known crucial positions, rather than having to define your transparent bits.

I can only see a couple of minor disadvantages:

1) A small amount of time extra defining the extra points.

2) A few extra faces, although we now accept that the rendering engines are much more forgiving in this respect than in the days of BVE2.

Maybe we can raise the point on some Japanese forums, to see if this rendering problem can be addressed?

Alan. Very Happy
guillyman
guillyman
Admin
Admin

Posts : 120
Join date : 2012-03-13

Back to top Go down

Those Irritating Dithered edges to Transparent Areas Empty Re: Those Irritating Dithered edges to Transparent Areas

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum