Planar reflections with dynamic objects/first person?

https://playcanvas.com/project/758896/overview/kingpin-lanes

I’ve currently faked reflections on the lanes in my bowling game with inverted geometry, but this clearly doesn’t work on dynamic objects like the ball or pins.

Thus, I’ve been tempted to use the planar reflections material and script-- which is working… weirdly. Run the level and look to the pins at the far right: the reflections appear on the floor-- but almost as a photo or screenshot. They are accurate ONLY IF you don’t move at all. The moment the view changes, the reflections follow the camera and do not update.

Walk to the end of the lane for a better view: you’ll see the reflections on the floor plane as they appeared at level start.

Am I just asking too much of this technique?

We now are able render to a cube map in a recent release of PlayCanvas which could work well here https://playcanvas.github.io/#graphics/render-to-cubemap.html

1 Like

Hopefully within ew weeks I’ll be extending the cubemap rendering a bit to allow for better reflections, but that’s not ready yet. There are some water reflection examples around that you could use as well for the floor reflections, that would work very well.

2 Likes

Here is a great example of water reflections by @LeXXik:

3 Likes

Excellent options here, guys. I know realtime reflections are bit of a big ask and a holy grail. I shall see what I can implement.

And just so you all know: Kingpin Lanes is just a sandbox for me to learn coding and Playcanvas. Once I really nail down what can be done-- and how to do it-- I intend to make an all new game (rather than a revamped old one I made for iOS.)

2 Likes

And here is the floor reflection, that @mvaligursky mentioned:
https://playcanvas.com/project/713058/overview/mirror-reflections

Edit:
It is available in User Manual, actually:
https://developer.playcanvas.com/en/tutorials/planar-mirror-reflection/

1 Like