gongpha / gdQmapbsp

A simple plugin that loads Quake's MAP/BSP files into Godot 4 interactively
MIT License
42 stars 5 forks source link

Question about trenchbroom example and lightmaps #36

Closed deathseer closed 2 weeks ago

deathseer commented 2 weeks ago

Hello, I'm trying to import .MAP files in Godot, but I have some errors

Firstly, after setting up the game-configs and when I click on reimport i get the error "CANNOT_OPEN_BSP_FILE". I checked the path to qbsp in usercfg and it was correct. Secondly, if I compile the map manually and put .bsp in the ".godot\qmapbsp\artifact" folder, after reimport it finally works correctly, but I get a scene with a standard material without lightmaps.

So, what should I do to get a full map scene with a quake shader included in it as in the quake1_template example? I want to use your addon because it can import lightmaps from BSP format, this is a very important function!

gongpha commented 2 weeks ago

Have you set the "Game Config Path" property in the import inspector yet? (Or set them in "Import Defaults" in the project settings) If it doesn't fix the issue, Please send me an MRP (a Godot project that reproduces the problem, with no unnecessary files included). I will try to troubleshoot this.

And, the lightmap support in this addon is currently only supported in the Quake1 example part and works for BSP textures only (embed texture data in BSP files). But it can be ported to the Trenchbroom part easily.

Note that the lightmap support covers rendering animated lightmaps, and requires specific shader code. You may not use other materials arbitrarily.

deathseer commented 2 weeks ago

Hi again and thanks for your answer. I checked all the config paths several times and I think that the problem is only at the compile stage when clicking the reimport button (qbsp does not create the .bsp file). Might be something wrong with the output argument. I tried it on two versions: 4.3 beta1 and 4.1 I looked at the Quake1 example and started to understand how it works, the only thing I need is importing map in godot scene format as in the Trenchbroom example (not during runtime). Or I'll try to port lightmap support to Trenchbroom part, as you said.

Btw I think the issue is resolved because the problem is only in my reimport stage (and this can be solved by bsp compiling outside of godot). Maybe the problem is with my OS.

deathseer commented 2 weeks ago

Today I tried to port q1 lightmap-shader to the trenchbroom part, it was easy to do. Now I can create maps for godot with BSP lightmaps support (built-in LightmapGI is very bad and takes up space for each scenes). btw Qodot does not provide this feature, so gdQmapbsp > Qodot.