VisualPinball.Engine icon indicating copy to clipboard operation
VisualPinball.Engine copied to clipboard

Mesh optimization

Open freezy opened this issue 5 years ago • 3 comments

Visual Pinball's standard playfield mesh comes with quite a few triangle fans, that can be problematic in terms of performance, specially for ray tracing. As far as I understood, in ray tracing, triangles of the geometry have some kind of broadphase where each triangle has an AABB, and the less the triangle fills out the AABB, the slower it gets (because of more misses). For triangle fans like here, this could be a problem:

mesh-example

They specifically talk about it in this video.

freezy avatar Oct 07 '20 18:10 freezy

Few libraries that might be useful:

  • http://vcg.sourceforge.net
  • http://remesh.sourceforge.net/
  • https://www.pmp-library.org/

freezy avatar Oct 07 '20 20:10 freezy

Is that mesh dynamic or saved as part of the .vpx?

ecurtz avatar Oct 07 '20 20:10 ecurtz

That one's part of the .vpx. It's the playfield_mesh of VP's default table.

freezy avatar Oct 07 '20 20:10 freezy