JLV Fence issue

All about making tracks for MX Simulator
Post Reply
Red_Dot_Moto
Posts: 8
Joined: Sun Aug 29, 2021 12:57 pm
Team: Privateer

JLV Fence issue

Post by Red_Dot_Moto »

so the jlv fence is fine up close but when it's just a tiny but far away it almost turns invisible, is there anything i can do to fix this? maybe some graphic settings?
jlv
Site Admin
Posts: 14912
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: JLV Fence issue

Post by jlv »

Try turning on anisotropic filtering in your graphics driver. You can also help it with custom mipmaps but that's kind of tricky to do.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Red_Dot_Moto
Posts: 8
Joined: Sun Aug 29, 2021 12:57 pm
Team: Privateer

Re: JLV Fence issue

Post by Red_Dot_Moto »

Okay thanks i'll try later today
Red_Dot_Moto
Posts: 8
Joined: Sun Aug 29, 2021 12:57 pm
Team: Privateer

Re: JLV Fence issue

Post by Red_Dot_Moto »

jlv wrote: Wed Sep 01, 2021 12:58 am Try turning on anisotropic filtering in your graphics driver. You can also help it with custom mipmaps but that's kind of tricky to do.
It is already on but here is a image that shows the problem Image

it's because i could not figure out how to add new banners myself and i like the stock ones if they worked right
jlv
Site Admin
Posts: 14912
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: JLV Fence issue

Post by jlv »

Yeah, the game rejects pixels under 75% opaque, so the fence gets lost at less detailed mip levels. The fence is roughly 50-50 solid vs. clear, so as it gets averaged down for the mipmaps it winds up 50% opaque which is below the alpha test threshold.

You could make a custom mipmap where you use the alpha value for the most opaque pixel instead of the average opacity. In that case it'd go solid instead of clear at a distance.

Making it do the right thing (i.e. draw the fence as 50% opaque at a distance) is actually a really tough problem since for it to work correctly the polygons have to be drawn back to front, which is really difficult with modern GPUs since it's hard to do in a parallel way.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Red_Dot_Moto
Posts: 8
Joined: Sun Aug 29, 2021 12:57 pm
Team: Privateer

Re: JLV Fence issue

Post by Red_Dot_Moto »

jlv wrote: Thu Sep 02, 2021 1:03 am Yeah, the game rejects pixels under 75% opaque, so the fence gets lost at less detailed mip levels. The fence is roughly 50-50 solid vs. clear, so as it gets averaged down for the mipmaps it winds up 50% opaque which is below the alpha test threshold.

You could make a custom mipmap where you use the alpha value for the most opaque pixel instead of the average opacity. In that case it'd go solid instead of clear at a distance.

Making it do the right thing (i.e. draw the fence as 50% opaque at a distance) is actually a really tough problem since for it to work correctly the polygons have to be drawn back to front, which is really difficult with modern GPUs since it's hard to do in a parallel way.
Damn okay thanks anyway
jlv
Site Admin
Posts: 14912
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: JLV Fence issue

Post by jlv »

Just realized I already have a custom mipmap for that. If you edit this, make sure you keep the png comment "[mip_custom]". That tells the game the image has a custom mipmap.

https://mxsimulator.com/junk/snowfenceplastic.png

Image
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Post Reply