Jump to content

Resolve road markings aliasing


photo

Recommended Posts

Hello,

in our driving simulation we have the case that the road markings are not visible good enough from the viewpoint of the driver seat.

We also tried supersampling but there are still not enough pixels to see it clearly.

Resolution is 1920 x 1080 pixels.

What would be the best way to inflate the mesh without changing its vertex data?

We are using decal meshes for the road markings.

We need the markings to be visible up to 250 units away from a viewpoint height of 1.5 units.

Thank you.

Edited by sebastian.vesenmayer
Link to comment

Thanks for the input Werner.

Well  I think mipmaps cannot help when rasterization delivers not enough pixels for a continious line.

This is especially the case for horizontal marks, vertical marks are not the problem.

Link to comment

Ah, okay. Understand.

I know this issue. We had a project with a lot of fine detail.

In the end (I think it was a very early 2.x version of unigine), we decided to inflate these objects in the modelling software to make them appear.

But nowadays, this should be possible in a shader?

I have no experience with decal meshes.

...But interesting topic, I agree.

best.werner.

Link to comment

This is 'classical' (hard) issue for simulations as the aliasing/shimmering of distant thin objects is quite distracting. I am quite sure that the issue cannot be solved by standard decals.

If you are using tesselated road polygons with superimposed unicolor decal markings then one possible approach might be vector textures as they can provide sharp edges under magnification and filtering (=anti-aliasing) in case of minification. Have a look into the following presentation (especially page 16, shader source code and more detailed papers available on the internet)

https://developer.amd.com/wordpress/media/2012/10/Green-Improved_Alpha-Tested_Magnification_for_Vector_Textures_and_Special_Effects(Siggraph07).pdf

If you don't use tesselated road polygons, but also decal-based roads on ObjectTerrain, then of course this wouldn't be an option to evaluate.

In that case it might be an idea to use a modified decal fragment shader that dynamically modifies pixel alpha values in screenspace based on the actual projected fragment z-buffer distance. This could give a smooth fade-in for distant pixels. Aliasing will still occur as before, but due to the smoother transition might not be as distracting to the user as it is now. 

Link to comment
  • 2 weeks later...

Hi Ulf,

thanks for the idea,  our problem is not the distracting of the aliased road markings. It is more the case that road markings vanish in the subpixel area and cannot be seen at all.

We tried super sampling but the effect is too low.

We are also thinking about extruding decals/geometry to make them using more pixels but it may conflict with overlapping lines and decals (concrete/lines/dirt).

It may also be possible to add a bump geometry where decals will be projected, but this needs of course additional geometry by artists.

Are there any ideas from the Unigine support Team?

Link to comment

I am thinking a bit.

So the issue is in the missing resolution. Even with a supersampling, the elements drop into a subpixel area and will not be shown because the elements are too small.

Generating larger objects, more pixel would make sense.

Some programmer might tell me if that make sense; I am thinking of the streched road markings/signs. 

They are designed to be read better from the drivers perspective and in an abstract way, it does the same thing. The markings are much bigger in dimensions on the road then been observed from the flat view.

Would that work, that, the flatter the perspektive = the further the distance from the camera, the road markings are scaled in the direction of the view (I dont know the formulars), so in the end, that there are more pixels to render. The bigger they are scaled, the more pixels there are.

Does that make sense?

image.png.098aa88bc7594e4b46ad85035784521c.png

image.thumb.png.add6fdfbbb2db276d19098830ca19354.png

 

image.thumb.png.469067e95b0de091459ac5c8cde7256f.png

Edited by werner.poetzelberger
Link to comment
3 minutes ago, werner.poetzelberger said:

So the issue is in the missing resolution. Even with a supersampling, the elements drop into a subpixel area and will not be shown because the elements are too small.

Yes.

5 minutes ago, werner.poetzelberger said:

They are designed to be read better from the drivers perspective and in an abstract way, it does the same thing. The markings are much bigger in dimensions on the road then been observed from the flat view.

Yes we do have this transformation on our roads, like in the real world.

The problem is more the horizontal line, which you use for parking slots.

image.png.585d40cfab89427d68efa730d64ff9b8.png

4 minutes ago, werner.poetzelberger said:

Would that work, that, the flatter the perspektive = the further the distance from the camera, the road markings are scaled in the direction of the view (I dont know the formulars), so in the end, that there are more pixels to render. The bigger they are scaled, the more pixels there are

Yes, this needs vertex displacement in a geometry or vertex shader or any way, since the fragment stage is too late.

Link to comment

If you design these roads markings differently, like objects which you can work with.

Splines, Decals e.g., that might be easier to work with?

Or are you using straight textures with fullphotographic information?

Link to comment
×
×
  • Create New...