Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal Maps are not working (edit: they work.. sometimes) #164

Open
vurt72 opened this issue Aug 16, 2024 · 11 comments
Open

Normal Maps are not working (edit: they work.. sometimes) #164

vurt72 opened this issue Aug 16, 2024 · 11 comments

Comments

@vurt72
Copy link

vurt72 commented Aug 16, 2024

i am running The Chronicles of Myrtana.

I have placed my normal maps (.dds files, no alpha) in

C:\Program Files (x86)\Steam\steamapps\common\TheChroniclesOfMyrtana\system\GD3D11\Textures\Replacements\Normalmaps_TheChroniclesOfMyrtana
i have also tried
C:\Program Files (x86)\Steam\steamapps\common\TheChroniclesOfMyrtana\system\GD3D11\Textures\Replacements\Normalmaps_ChroniclesOfMyrtana

I have no idea what it expects, where it finds this "mod name" which is required, and which of them is the correct one. It might even be the polish name.

If i turn on the normal maps in the renderer i can very vaguely see some black specks, if the lighting is allowing it. I can also see that characters gets a normal map. so its likely just a default normal map texture that applies to everything and not my normal map textures.

And yes i have my own texture pack for CoM that i created and now i created normals as well.

@vurt72
Copy link
Author

vurt72 commented Aug 17, 2024

I am guessing that these packs must somehow be "approved" by the engine?

Because I know for my old texture pack it had to be named replacements_vurt. i just found the file on the internet so i checked how it was made (named).

Would be great if things like this could be explained on the page.

@kirides
Copy link
Owner

kirides commented Aug 18, 2024

This should still hold true, maybe they broke with a recent version?

https://forum.worldofplayers.de/forum/threads/1546222-Yet-Another-D3D11-Renderer

Normalmaps gehören in ein Mod-Spezifisches Verzeichnis in dem Verzeichnis
"Gothic\system\GD3D11\textures\replacements"

Normalmaps für das normale Spiel, kommen in das Verzeichnis "Normalmaps_Original" (ggf. anlegen wenn nicht vorhanden)

Bei Modifikationen ist lautet der Name "Normalmaps_{MOD}".
Für Atariar findet man den Namen so heraus:

In den "Gothic\System"-Ordner gehen
nach einer Datei mit dem Namen "Atariar" ausschau halten.
Die Datei die wir suchen heißt "Gothic2_Atariar.ini"
Von der Datei entfernen wir nun das ".ini" und es bleibt "Gothic2_Atariar".
Unser Verzeichnis lautet damit "Normalmaps_Gothic2_Atariar"

Diese Art der Normalmaps-Ablage ermöglicht Mod-Spezifische Normalmaps. Z.B. L'Hiver Normalmaps wenn man L'Hiver spielt und keine wenn man normales Gothic spielt.

@vurt72
Copy link
Author

vurt72 commented Aug 22, 2024

This should still hold true, maybe they broke with a recent version?

yeah it's broken. I also let another person try it (he's a programmer + he's just better technically with G2/modding than i am). He says it just doesn't work.

@vurt72
Copy link
Author

vurt72 commented Aug 22, 2024

edit: ok, it seems to be down to the format, dds must use BC1.
it works for Chronicles of Myrtana if the folder is named normalmaps_thechroniclesofmyrtana

@vurt72 vurt72 changed the title Normal Maps not working(?) Normal Maps are not working Aug 22, 2024
@vurt72 vurt72 changed the title Normal Maps are not working Normal Maps are not working (edit: yes they are) Aug 22, 2024
@vurt72 vurt72 closed this as completed Aug 22, 2024
@kirides
Copy link
Owner

kirides commented Aug 23, 2024

i'm glad you could figure this out.

i'll add a note for that sometime in the future (or maybe someone wants to open a PR to mention Normalmaps and their limitations in the readme? :) )

@vurt72
Copy link
Author

vurt72 commented Aug 23, 2024

BC3/DXT5 also works (has Alpha).

I have seen many texture packs that uses the diffuse texture in the alpha channel. Very unsure if this really adds anything? I have mine without and it looks fine.

@vurt72 vurt72 changed the title Normal Maps are not working (edit: yes they are) Normal Maps are not working (edit: they work.. sometimes) Aug 23, 2024
@vurt72 vurt72 reopened this Aug 23, 2024
@vurt72
Copy link
Author

vurt72 commented Aug 23, 2024

Ok so they've stopped working, and i have no idea why. i did mess around with Union, trying to get that to work when it suddenly didn't work any longer, after that it seems like the normals just decided to not work.

So I made a reinstall of the game and the latest nightly build of the renderer. Didn't install Union or anything else, just the normal maps and my texture mod. But no, no change any longer with normals on or off.

My other friend who's also testing this is experiencing the same, it's super easy to break the normals from functioning at all, and impossible to know what even broke it or how to get it to work again.

Edit: yeah, second day of this, not working in Chronicles of Myrtana, tried a bunch of stuff. It's so strange, they worked perfectly once (i made sure to make the default normal maps dds blank to not get tricked by them). Not the slightest clue what made them kick-in.

@vurt72
Copy link
Author

vurt72 commented Aug 25, 2024

I have my texture pack with normal maps here if you want to test it out in Chronicles of Myrtana, or G2.

Can you get the normal maps to work in CoM?

https://www.nexusmods.com/gothic2/mods/91

The normal maps is a separate download, under Optional files. Also read the FAQ or there's a chance my textures won't show up due to how it works with mods and the date set for the mod.

@kirides
Copy link
Owner

kirides commented Aug 25, 2024

i'll try to find some time looking at it.

maybe/hopefully it's something simple to fix.

@kirides
Copy link
Owner

kirides commented Aug 25, 2024

@vurt72 can you tell me what is not working? i tried the normalmaps and atleast something is happening.

https://github.com/user-attachments/assets/6d99872f-0494-4b4a-b931-fb6c97e2ae41
https://github.com/user-attachments/assets/d6a43231-951b-4c34-8a10-3493520ce6d4

some normal maps were broken though, as they used RGBA32 textures instead of BC1 or BGRA

you can convert all normal maps using something like this

> mkdir converted
> texconv.exe -o converted -f B8G8R8A8_UNORM *.dds

for compression use BC1 (or appropriate)

> mkdir converted
> texconv.exe -o converted -f BC1_UNORM *.dds

EDIT: i also just updated the renderer so that it will output the name of the failing normal/fx map in the log

Error: [D:\git\github\GD3D11\D3D11Engine\D3D11Texture.cpp(59), enum XRESULT __thiscall D3D11Texture::Init(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)]: failed with code: -2147024846!
Warning: [D:\git\github\GD3D11\D3D11Engine\D3D7\MyDirectDrawSurface7.cpp(134), void __thiscall MyDirectDrawSurface7::LoadAdditionalResources(class zCTexture *)]: Failed to load normalmap: system\GD3D11\textures\replacements\Normalmaps_DIECHRONIKENVONMYRTANA\KM_CITY_BODENDIELEN_02_normal.dds

@vurt72
Copy link
Author

vurt72 commented Aug 25, 2024

Yeah i know, i forgot to resave some of the later ones i did in Photoshop. I have an AI that makes them + saves in .dds, but in the wrong format.

For some reason it works again now.. i don't know, i reinstalled the entire thing. Maybe it was just me all along that messed up something, they always worked in Gothic 2.

Great to have that in the log though! Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants