Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
display artifacts
01-26-2009, 10:00 PM,
#2
 
When rendering objects VDrift has two modes: alpha testing and alpha blending. Alpha testing mode is always on unless the object is set as transparent in the list.txt file. Alpha testing will draw parts of objects that have transparency < 50% as fully transparent and > 50% as fully opaque. Alpha blending does partial transparency based on the exact alpha value. The problem with alpha blending is that now the visual results are dependent on draw order, and so when transparent objects overlap you get artifacts.

For objects like trees, fences, and grass, you should probably turn off the transparent mode so that alpha testing is used instead... just use the transparent setting for things that tint the underlying object somehow like glass or tire marks. Using alpha testing also makes shadowing work better, because you'll actually see the outline of the object in the shadow instead of just a big rectangle. I realize the edges of objects don't look as good when you turn off the transparency, but if you turn on 4X anti-aliasing they look good again. :-)

Alternatively I could try to figure out a way to fix the artifacts, but it will decrease performance quite a bit because all of the transparent polygons would have to be re-sorted by depth each frame.
Reply


Messages In This Thread
display artifacts - by alex25 - 01-25-2009, 03:28 PM
[No subject] - by joevenzon_phpbb2_import3 - 01-26-2009, 10:00 PM
[No subject] - by alex25 - 01-27-2009, 03:14 AM
[No subject] - by joevenzon_phpbb2_import3 - 01-28-2009, 12:25 AM
[No subject] - by joevenzon_phpbb2_import3 - 01-28-2009, 12:28 AM
[No subject] - by alex25 - 01-28-2009, 02:59 AM
[No subject] - by alex25 - 01-28-2009, 03:22 AM
[No subject] - by joevenzon_phpbb2_import3 - 01-28-2009, 04:45 PM
[No subject] - by joevenzon_phpbb2_import3 - 01-28-2009, 06:46 PM
[No subject] - by alex25 - 01-29-2009, 12:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)