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

Handle kicker holes in playfield

Open freezy opened this issue 5 years ago • 2 comments

Currently the playfield's material is cut-out, meaning that if there's no texture, it's opaque. This results in the kickers being virtually invisible. Here's a textureless playfield in Visual Pinball:

image

...which renders like that in Unity:

image

In most cases this shouldn't matter, since playfields are textured, and the kicker will be transparent.

A possible solution to implement the same behavior as Visual Pinball is to cut out the geometry of the playfield with a library like triangle.net.

freezy avatar Jan 22 '20 21:01 freezy

look into using triangle.net with unity :

https://github.com/garykac/triangle.net

here are two c# unity files I created myself while using this exact library to make playfields with holes in them.

triangle.net_unity_snippets.zip

shaderbytes avatar Jan 22 '20 21:01 shaderbytes

The Unity VectorGraphics package has triangulation support. It uses LibTess.net behind the scenes. https://docs.unity3d.com/Packages/[email protected]/manual/index.html

ecurtz avatar Sep 05 '20 16:09 ecurtz