firebelley / godot-export

Automatically exports your Godot games.
MIT License
460 stars 53 forks source link

godot 4 rendering issues with 3d #106

Closed cgsdev0 closed 1 year ago

cgsdev0 commented 1 year ago

having a weird issue with my game when I export godot 4 in the forward+ rendering mode using this github action vs. locally

local build: image CI: image

I really have no clue what's causing this; it's not super urgent, since I can just build locally instead, but figured I'd open an issue to see if anyone else has a clue!

Here's the game source: https://github.com/cgsdev0/ldg-jam-2023

and the workflow file: https://github.com/cgsdev0/ldg-jam-2023/blob/main/.github/workflows/deploy.yml

firebelley commented 1 year ago

Hello! I am inclined to say that this is an issue specific to your project. One thing that causes problems like this is inconsistency of casing in directory and file paths. Your game is being built, but it appears it is failing to load some materials. For the build that is output by CI, try running the game from a terminal like `./MyGame.exe' and observe what errors are output. I would also recommend trying to export with debug mode enabled (see the docs for how to do that in the action) to see more detailed error logging.

I'm going to close this for now, but please feel free to respond in the thread! I'll try to help you out as best I can.

cgsdev0 commented 1 year ago

@firebelley thanks for the help! I'll check it out and let you know if I figure it out. This came up during a game jam, so I didn't have much time to go log spelunking 😅

cgsdev0 commented 1 year ago

so I actually don't see any errors when running it with a debug build 🤔

I tried running with the --verbose flag as well

I'm going to try to write a script to search for file name casing inconsistencies, since I did develop the game on Windows so it's still a good guess

cgsdev0 commented 1 year ago

I tried searching the project for inconsistencies on a case sensitive machine:

rg '(res://.*\.(glb|tres|gdshader|gd|tscn))' -o \
  | cut -d':' -f2- \
  | cut -d'/' -f3- \
  | grep -v '^\.godot' \
  | xargs -I {} bash -c 'test -f "{}" || echo {} BAD'

which didn't find any results 😢

I'll try to see if I can create a minimal repro when I get some free time

Another data point: image

The PCK built on CI is approximately ~2MB smaller, so it definitely does seem like something has gone missing. I tried extracting the PCK files with various different tools, but none of them seem to be quite working for 4.x PCK archives yet :(

cgsdev0 commented 1 year ago

Update: I narrowed it down to shader params missing in the export. Looks like it's a problem with the --headless export mode of the editor: https://github.com/godotengine/godot/issues/66842

firebelley commented 1 year ago

Thanks for the thorough investigation! I'm glad you got to the bottom of it and posted your findings here. This will be really useful to reference if/when others encounter this same issue 👍

bryanmylee commented 8 months ago

@firebelley It would be great if we could sticky or pin this somewhere on the project's frontpage. I've been running into this issue on games deployed through this action, and only recently discovered this thread which is a lifesaver.

While it is an upstream bug, a disclaimer would give potential new developers an indication of what to look out for when their exports are broken, or workarounds to get over the issue for now.

isiko commented 2 months ago

Is this fixed? I'm currently experiencing Issues where a shader draws black in the CI-Builds, but works fine in the local ones.