The Godot Community Forums are back up and running! Please read the the announcement post for important information on what happened. Thanks!

Anyone want to test my Portals addon?

klaasklaas Posts: 13Member
edited August 20 in Resources

Hello there!
I've spend the last weeks writing a portals plugin. Dont mix it up with the game. This is a technique for culling occluded geometry.

If you dont know it you can read about it here:
https://en.wikipedia.org/wiki/Portal_rendering

There was a implementation in Godot 2.x but it was removed in 3.x

I've tried my very best to make it as handy as possible.
But i need feedback before i try to publish it in the assetLib.

You can get it here: https://github.com/D2klaas/dzPortals

I would like to here from you ... comments, suggestions and issues.

all the best!
Klaas

Comments

  • DschoonmakerDschoonmaker Posts: 216Member

    I downloaded the project & copied the addons folder to an empty project. Godot says there's a problem with the code:

    "Unable to load addon script from path: 'res://addons/dzPortals/dzPortalsPlugin.gd' There seems to be an error in the code, please check the syntax."

    I checked "dzPortalsPlugin.gd", the error is on line 18, with the preload function:

    "res://addons/dzPortals/dzPortalsPlugin.gd:18 - Parse Error: Couldn't fully preload the script, possible cyclic reference or compilation error. Use "load()" instead if a cyclic reference is intended"

  • klaasklaas Posts: 13Member

    Hi,
    thank you for your feedback.
    I've found the error, amd fixed it.
    But i stumbled into another bug. Currently godot crashes when a tree node is moved and autoconnect is on.

    In totaly confused about that. Must have another closer look into it.
    Its pretty useless by now.

    I updated the repro to the current state ... wil dive into it tomorrow.

    Thanks!

  • SIsilicon28SIsilicon28 Posts: 693Moderator

    Very Impressive work! I tip my hat to you good sir. 😏🎩
    In fact, I'd love to contribute to the growth of this plugin. I have quite a bit of experience with plugin interfaces.

  • klaasklaas Posts: 13Member

    Hi SIsilicon28,
    thank you. I would appreciate your help!

    Im currently facing that bug that crashes godot whenever i reorder the tree.
    I could track the error down to:
    addons\dzPortals\scripts\dzPortalsGate.gd

    in function:
    auto_find_magnetic_gate()

    in line 329, 330 there call set_magnetic_gate(gate)
    and this causes the crash when the node gets moved.

    Maybe its because the node leaves the tree for a short moment. All tries to deferre this call failed. Without any error description im totaly lost.

  • klaasklaas Posts: 13Member

    Hello,
    after spending a whole day its finaly fixed.
    It was ... whar a shame .. two simple cyclic assignments. The usual case in wich godot crashes.
    I wish godot would have a call stack limit in debug mode. This would have thrown an error a prevent the crash.

    ... and there is a new feature. Zones can now be flagged as "outside". Those zones will be activated when the camera is in no other zones. Its like a default zone. Those outside-zones can be linked to gates. So, if you look through a portal to the outside it gets visible.

    The repro is now updated.

Sign In or Register to comment.