Transparency problems (?)

View previous topic View next topic Go down

Transparency problems (?)

Post by theboywho on Wed May 29, 2013 4:31 pm

Greetings,

I am having a few issues with a route I am making for OpenBVE. The fence right alongside the track there seems to be fading away into oblivion. Does anybody have any pointers?

http://postimg.org/image/6t03bfwsh/


theboywho

Posts : 2
Join date : 2013-05-29

Back to top Go down

Re: Transparency problems (?)

Post by theboywho on Wed May 29, 2013 4:42 pm

May I just add that it appears to render perfectly in the OpenBVE game itself.......

theboywho

Posts : 2
Join date : 2013-05-29

Back to top Go down

Re: Transparency problems (?)

Post by LabRatAndy on Wed May 29, 2013 7:42 pm

I've noticed that in game as well, not sure of the cause.

Although perhaps as you appear to be on a slight curve, could it be that is only a single face showing outward, as its not a true 3d object. Thus when you see the fence further around the curve the face ceases to be visible and the fence appears to vanish, and perhaps when moving forward this effect isn't so noticeable.

LabRatAndy

Posts : 95
Join date : 2011-08-29

Back to top Go down

Re: Transparency problems (?)

Post by leezer3 on Thu May 30, 2013 12:40 am

Do you want the technical explanation? Razz
(Not that I really understand some of this!)
In essence, it's to do with the way the game engine renders textures onto a face. As you get further away from the camera, you have less effective pixels in which to place the same amount of detail- In other words, if you create a fence post 10 pixels wide, when this fence post is 100m away from the camera, there may only be 2 pixels of width shown on your screen. The game engine then performs a series of calculations to determine how to resize your 10 pixels into two at this point Smile
The most simple calculation is just to brute-force resize and dump any data which doesn't fit, but as you can see this isn't very good-looking.
To correct this, you need to apply Anisotropic filtering, which in essence performs a set of of complicated calculations to make the resized texture look much better.

RouteViewer doesn't apply any Anisotropic filtering, so textures like this will never look much good, but I tend to just ignore this fact. Aim to build something that looks acceptable with 1-step of Anisotropic filtering enabled in game and you can't go too far wrong Smile

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 938
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Transparency problems (?)

Post by LabRatAndy on Thu May 30, 2013 10:17 pm

That explains why I get the effect in game as well, the joys of a 10 year old pc Very Happy

LabRatAndy

Posts : 95
Join date : 2011-08-29

Back to top Go down

Re: Transparency problems (?)

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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