TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
582 stars 152 forks source link

Texture browser does not display directories of shaders, only directories of files #538

Open illwieckz opened 6 years ago

illwieckz commented 6 years ago

As stated on https://github.com/TTimo/GtkRadiant/pull/535#issuecomment-320480398 the texture browser seems to only list a directory if this directory exists for real and contains pictures, but does not displays virtual directories of shader paths. The “Show shaders” option seems unrelated.

To reproduce the bug, you can download this pak, rename it to .pk3 and put in baseq3 for example (having GtkRadiant configured for Quake 3 is fine).

See this screenshot:

gtkradiant

Do you see the three shared_ej01-clean_src, shared_ej01-common_src, shared_ej01-ice_src directories? Yes, having them displayed isn't very useful but you can live with it. Do you see the two shared_ej01-clean and shared_ej01-ice directories? No, and that's the bug. It means you can't apply shaders to your brushwork, since you can't select shaders, since shaders are not listed.

This is how the textures/shared_ej01-clean/ceiling01 path is defined:

textures/shared_ej01-clean/ceiling01
{
        qer_editorImage     textures/shared_ej01-clean_src/ceiling01_p

        diffuseMap          textures/shared_ej01-clean_src/ceiling01_d
        normalMap           textures/shared_ej01-common_src/ceiling01_n
        specularMap         textures/shared_ej01-clean_src/ceiling01_s
}

You can notice the directory name in shader path: _textures/shared_ej01-clean/ceiling01_, this directory exists as a shader path but does not exists in file system.

In file system, the path is _textures/shared_ej01-clean_src/ceiling01p.jpg for example. That's another path.

The same way we would be able to define a _textures/arachnid2/squarelightbeige shader path that relies on a _textures/evil8lights/e8tinylight.jpg, that's legit.

These are the files needed by the shader:

textures/shared_ej01-clean_src/ceiling01_p.jpg
textures/shared_ej01-clean_src/ceiling01_d.crn
textures/shared_ej01-common_src/ceiling01_n.crn
textures/shared_ej01-clean_src/ceiling01_s.crn

Only textures/shared_ej01-clean_src/ceiling01_p.jpg is needed by GtkRadiant, but now you know why GtkRadiant is displayed all these useless directories. Having a “Shader only” option like in NetRadiant would be useful, but that would be an improvement, not a bug. on GtkRadiant, setting the “Show shaders” option to “on” does nothing.

For reference, this is how looks the texture browser on NetRadiant:

netradiant texture browser

And when the “Shader only” option is activated (something not yet available in GtkRadiant):

netradiant texture browser

In fact, that last view is the only one needed from a mapper PoV, but the previous one (both shader paths and underlying diffuse path) would be fully usable as a fallback. GtkRadiant only displays the view that is useless (only displaying underlying useless diffuse path, and hiding the shader path to be applied to brushes), which makes GtkRadiant not usable to apply shaders on brushes.

illwieckz commented 6 years ago

not a bug, that seems to be the 1999's expected behavior (shaderlist.txt feature etc.)

illwieckz commented 6 years ago

@Mateos81 has wrote on irc:

Shouldn't this remain open as a feature?

We can also open another issue as a “feature request”.

There would be two features discussed:

TTimo commented 6 years ago

related to issue #573