ramokz / phantom-camera

👻🎥 Control the movement and dynamically tween 2D & 3D cameras. Built for Godot 4. Inspired by Cinemachine.
https://phantom-camera.dev/
MIT License
1.97k stars 65 forks source link

Addon issue with Godot Compatibility Rendering Mode on Mac #177

Open grgp opened 6 months ago

grgp commented 6 months ago

Issue description

Note that this bug only happens on the Compatibility mode for some reason, Forward+ works absolutely fine.


You'd immediately see these errors after installing. Trying to enable the plugin would result in this error. Failed to load script ... with error "Parse error".

image image

I tried fixing plugin.gd by fixing these individual errors, by reimporting the svg, png, and ttf assets manually. This will fix the 2D examples, I think. But the 3D scenes will still not be openable.

image

If I try to open the 3D scenes I'll get stuck at this error, I can't seem to fix it even if I try reimporting the png. I even tried resaving the png but still no luck. CheckerPatternDark.png.

image

I'm using the v0.6.2.1 version of the package, Godot 4.2.1 Universal Build, in MacOS Sonoma 14.2.1, M1 Pro Macbook Pro 2021. While this is likely an engine issue at the end of the day, I think the addon could still try to find a workaround since usually Compatibility projects do not break in this way.

Thank you!

Steps to reproduce

  1. Create a blank Godot project.
  2. Import the phantom_camera addon.
  3. Change the rendering mode to Compatibility.

This also works the other way, if you start in Compatibility mode then change to Forward mode, then it'll work.

(Optional) Minimal reproduction project

No response

grgp commented 6 months ago

Apologies, I think this is probably an issue with Godot's compatibility renderer on macOS.

https://github.com/godotengine/godot/issues/75114

For users experiencing the same problem, a workaround is to temporarily switch to the Forward+ renderer, then manually clear the albedo texture for the Floor scene and the CSG boxes.

image image

I think converting the CheckerPatternDark.png into a jpg and updating all references to it would solve the issue. jpg seems less likely to cause issues.

ramokz commented 6 months ago

Thanks for the thorough report! Did a few tests for this.

It appears to indeed only be a Mac issue when running in Compatability mode, which is very odd.

It does seem odd that changing the image type to .jpg solves the issue. You mention that it “seems less likely to cause issues”, beyond the .svg import issues, do you still see errors following that?

grgp commented 5 months ago

Hi @ramokz! Thanks for looking into this. The .svg thing might be a red herring in retrospect, maybe the .png file failing to import was causing problems with the rest of the assets.

I didn't see any more major issues after fixing the CheckerPatternDark.png, besides a very strange annoyance where Godot keeps reimporting the file for some reason.

I hope your commit here would solve it, though!