Godot Smart Planar Reflector Plugin banner

Godot Smart Planar Reflector Plugin

1 devlog
1h 5m 55s

Updated Project: A simple-to-use and performant 3D planar reflector plugin for Godot that provides crystal-clear reflections in complex environments.

(Includes a video demo in the asset library. For an interactive demo, create an empty Godot pr…

Updated Project: A simple-to-use and performant 3D planar reflector plugin for Godot that provides crystal-clear reflections in complex environments.

(Includes a video demo in the asset library. For an interactive demo, create an empty Godot project, install the plugin from the asset library, then check the addons/smart_planar_reflector/DEMO folder!)

Demo Repository

Loading README...

Kip

Shipped this project!

Hours: 1.1
Cookies: 🍪 29
Multiplier: 26.6 cookies/hr

Update 1.1 is shipped and approved on Godot asset library!

Addresses issue #1, updated the dynamic near plane algorithm, frustum-rect fitting algorithm in 3D to work in more edge cases, specifically left-frustum-plane to left-reflection-surface-edge collisions, similiarily, top-top, top-bottom, bottom-top, bottom-bottom, left-left, left-right, right-left, right-right intersections. These situations may happen when the camera is oriented upwards (forward.y>0) while being very close to a thin mirror aligned with the horizon looking up. The mirror will be still in view, but all of its edges will be inside the frustum, leading to the algo selecting a further near plane distance, causing some objects to be clipped out.

This update fixes this, at a (very small) performance cost. :3

Kip

(for reviewers: This is an update to an addon I made. Time’s mostly algorithm design and debugging which really isn’t tracked, plus it’s an update so it doesn’t have too many devlogs.)

Finally got some time to address the issue on the repo. It was open all the way back from Nov 3 oh my god.

Anyways the change was relatively simple, but took me long enough to reunderstand what my algorithm does. There was a missed edge case of parallel frustum-reflection surface plane intersections, I orignally thought it was impossible so the test points for those cases were not included in the algorithm, but https://github.com/KipJM/smart_planar_reflector/issues/1 demonstrated it definitely could happen XD

So these test points are added. bottom-bottom, bottom-top, top-bottom, top-top, left-left, left-right, right-left, right-right.

It adds some more plane intersection math to the algorithm, but shouldn’t affect the performance too much. After all most of the cost comes from the gpu rendering a whole other camera.

After testing works well, so 1.1 is released to include this fix. Just gotta wait for godot asset library to approve it.

So not too much time spent for this project, :3

Attachment
Attachment
1

Comments

thecyberden
thecyberden 2 months ago

This is very cool im looking forward to seeing it finshed!