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

Question / Appreciation Post #28

Open
arsipsik opened this issue Nov 3, 2022 · 58 comments
Open

Question / Appreciation Post #28

arsipsik opened this issue Nov 3, 2022 · 58 comments

Comments

@arsipsik
Copy link

arsipsik commented Nov 3, 2022

Sorry for submitting this as an issue. Just didn't find any other way to post my thoughts.

Hey @jmquigs! I wanted to send my appreciation for this! I've always wanted to mod Guild Wars 2 like I have FFXIV. While modding this way is a bit more limited, i've been able to make a few mods that i'm happy with.

Any chance someone has fixed the binormals/tangents issue? That's the only thing that I think is keeping the mods from looking absolutely perfect.

And to share some of what i was able to make:

  • Added a weapon from Final Fantasy XIV
  • Kitbashed an outfit from Heavy and Medium armors
  • Resized and replaced a weapon model with another.

gw041
gw043
gw044

@jmquigs
Copy link
Owner

jmquigs commented Nov 3, 2022

Nice work! Its cool to see some skillful mods being made with this, as a programmer most of the stuff I make is pretty bad.

I haven't worked on the lighting issue since some experimental stuff I did here: master...fix-lighting-export . At that time I didn't see any real effect from those changes, but the system I was testing on was weak and ran very low detail. I now have access to better hardware, but have not retested that code.

I'm sort of torn on working on the lighting fix because even though it probably is the number 1 visual quality issue with MM, GW2 as we know moved away from DX9, and if they actually remove support for that, then the project is probably dead unless I can do the DX11 support. And from my preliminary investigations I'm not sure that is possible; DX11 moved a lot of stuff around in the API and broke some assumptions that MM relies on. In addition, its likely that the GW2 renderer itself has changed in DX11 which could further break MM assumptions. That could mean that either old mods don't load anymore (and would need to be ported) or aren't even possible, if the renderer makes aggressive use of certain kinds of instancing to improve performance.

Unfortunately MM was always kind of a hack and the possibility of a developer porting an existing game to a new renderer API was not really one I considered in the design space when I started the project long ago.

I've thought about putting up a patreon for this lighting issue (or DX11) as it would help justify some of the time spent working on it. Right now I just don't have a lot of incentive since my spare attention to be able to work on things like this is extremely limited. But I'd feel bad if I took donations for that and then the devs just killed MM by removing support for dx9 - and then I wasn't able to get dx11 to work.

Anyway I'll try to put a little time into getting that old branch working. There is a small chance (probably < 20%) that some relatively simple changes might fix the issue.

@arsipsik
Copy link
Author

arsipsik commented Nov 3, 2022

Appreciate the reply :)

I totally understand having very limited time. What you've already created with the time you've put in is fantastic. In my mind, there aren't any other tools that can do what this can for modding games like Guild Wars 2 so kudos to you!

I'm sure some people would balk at the idea of Patreon but if that gave you more incentive to put some work into it, I'd say do it. Your concerns totally make sense, that would suck if you weren't able to make dx11 work after getting donations.

I'd love any more work you can do on this and even if nothing more can be done, the tool as it is is amazing. So thank you for what you've done.

@arsipsik
Copy link
Author

arsipsik commented Nov 10, 2022

Quick update!

More of what is possible with this tool.

A kitbashed set from different pieces of Armor and Outfits with upscaled textures!

gw047

@arsipsik
Copy link
Author

Just going to leave another comment here instead of opening a new issue. We now have confirmation that Arenanet plans to complete their transition to DX11 in Q1 next year. Any way you or someone will be able to move ModelMod to support DX11?

@jmquigs
Copy link
Owner

jmquigs commented Dec 15, 2022

@arsipsik I will try to make an effort to move DX11 along come January. Even if I can't finish it perhaps I can get it to the point where someone can more easily pick it up and complete that work

@arb1911
Copy link

arb1911 commented Dec 23, 2022

I use MM every time I play GW so I definitely wouldn't mind donating to get the DX11 version possibly finished. It's a shame there is no other modding capabilities in this game, it deserves more.

@onoira
Copy link

onoira commented Dec 25, 2022

ModelMod is a necessity for me. I have people in my social circle with severe, traumatic phobias that require model replacements to be able to play some games and this is the tool I use to help them.

@arsipsik
Copy link
Author

You are probably already aware but the 3dmigoto program does something extremely similar to ModelMod but for DX11 games. Might be worth reaching out to the folks who work on that one?

I ended up trying to use it for Guild Wars 2 but it appears to currently be incompatible. It crashes the game on startup.

@RenegadeWraith
Copy link

There is also SpecialK and Resorep, which can be used to make mods. These mods rely on ID numbers to determine which textures to replace. But this does not work in many games including GW2 because the IDs are not constant. ModelMod is better because it uses a unique way to identify models and textures based on number of vertices.

On a side note, ArenaNet has confirmed the phasing out of Dx9 from Feb. to April.

@jmquigs
Copy link
Owner

jmquigs commented Jan 10, 2023

I should be able to get started this week. Hopefully I'll know before the end of Feb whether it will work.

I haven't heard of those other programs but its cool that people are exploring the space.

@jmquigs
Copy link
Owner

jmquigs commented Mar 2, 2023

Update on this, I did manage to get enough of dx11 going that I can see it is using the same primitive and vertex counts for at least some mods. So I'm hopeful that I can get rendering working for old mods at least. Snapshotting for new ones is another matter but I haven't seen anything so far that would prevent that. I know ANet plans to disable DX9 by April 22 and every update is like a potential bomb that could shut it off for me, but hopefully I can get something functional going before we all get DX9 disabled. Of course even if they do disable it I will continue working but it will be a little harder.

@jmquigs
Copy link
Owner

jmquigs commented Mar 8, 2023

I'm happy report that with commits 5349fe6 and 5241718 I'm able to see mods in DX11. Still no input or snapshotting. And the mods are flickering, I think because something is unhooking my stuff, which I'll need to look at next. Still once I do a build you should be able to at least see (and even edit) your existing mods. I'll probably throw together a build in the next week or two...the flickering issue is pretty distracting so I want to try to fix that first.

@arsipsik
Copy link
Author

arsipsik commented Mar 9, 2023

This is great news! Great work! 🎉🎉

@arb1911
Copy link

arb1911 commented Mar 11, 2023

Thank you. Your work is greatly appreciated!

@jmquigs
Copy link
Owner

jmquigs commented Mar 12, 2023

Ok here is a release for you guys to play with:
https://github.com/jmquigs/ModelMod/releases/download/1.2.0.38/ModelMod-1.2.0.38.zip

You'll still see a bit of mod flickering but its not too bad hopefully and I still want to improve that more. As I mention there is no snapshotting yet. That will come later.

To install, run the launcher, select the game profile you want, and press the Start button. If possible the updated files will be copied into your game directory. If not the launcher will tell you that.

To revert to a 1.1.X release after using this, run the MM launcher from that prior release. You may also need to manually copy the d3d9 dll from the prior release into your game dir.

You can report any bugs you find here or as new issues.

@jmquigs
Copy link
Owner

jmquigs commented Mar 13, 2023

One thing I should note is that it looks like in GW2 they changed the geometry of some assets, mostly lower poly stuff. For instance I have a mod that deletes the guardian aegis shield. That mod wasn't working, and it turns out the vertex (but not the primitive) counts had changed slightly. So if some old mod you have doesn't work that is probably why. After I finish snapshotting you'll be able to snap what the game is using now, and then port over the mod manually (which will be somewhat tedious but is doable).

@arb1911
Copy link

arb1911 commented Mar 13, 2023

Can't seem to get it to run, it's crashing for me.

@jmquigs
Copy link
Owner

jmquigs commented Mar 13, 2023

@arb1911 Can you attach the log file? ModelMod.Gw2-64.log

@arb1911
Copy link

arb1911 commented Mar 13, 2023

ModelMod.Gw2-64.log

Here ya go.

@jmquigs
Copy link
Owner

jmquigs commented Mar 13, 2023

@arb1911 It looks like the hook failed. Did the game hang, or crash, or just run without mods?

@arb1911
Copy link

arb1911 commented Mar 13, 2023

Crashing.
Gw2-64_2023-03-13_18-50-05

@jmquigs
Copy link
Owner

jmquigs commented Mar 13, 2023

Its probably my hook method. I'll look at it...

@arb1911
Copy link

arb1911 commented Mar 13, 2023

May want to confirm with others, it's entirely possible it's on my end haha.

I know there were others in the past as well who'd wanted to test new builds too. @DaelinDwin

@jmquigs
Copy link
Owner

jmquigs commented Mar 13, 2023

I got some early crashes like that when I first started on the hook code, so I doubt you are the only one affected. With DX11 in particular some other process is writing to the same memory I am (I think its windows 10 game integration actually).
Could also be that its locking up because I'm trying to init too early. I'll make another build which you can test with in a day or two. It probably won't fix the issue but will have more logging to help me figure out at what stage its crashing.

@DaelinDwin
Copy link

As a new build is on the way, I will just wait for that before testing.

@jmquigs
Copy link
Owner

jmquigs commented Mar 14, 2023

@DaelinDwin @arb1911, I have created a new DX11 ModelMod build for you to test if you have time. Thanks for offering to test this. The build is here: https://github.com/jmquigs/ModelMod/releases/tag/1.2.0.51

There is a new "Start(Debug)" button in the launcher. So please try using that. If it was crashing for you before, it will probably still crash, but it might happen later now and the log file should contain more info. On the other hand if it still crashes right away that also tells me something. So please attach your log file if this happens.

@RenegadeWraith
Copy link

Possibly related to this (all graphics hooks stopped working as of most recent patch): https://www.reddit.com/r/Guildwars2/comments/11raus7/reshade_stop_working_for_any_of_you_after_todays/

@jmquigs
Copy link
Owner

jmquigs commented Mar 15, 2023

@RenegadeWraith MM doesn't hook via dxgi so it shouldn't be affected by that, and is still working for me as of today. Though ironically I was thinking about making MM be able to be loaded under ReShade (which would allow use of both and maybe fix some of the issues people have with the method I use for hooking). It sounds like people got reshade working by renaming to d3d11.dll and that makes sense to me.

@DaelinDwin
Copy link

DaelinDwin commented Mar 15, 2023

I played for about an hour with the new build, there were no crashes, but the flickering issue was present.

The Chromium update did prevent ModelMod from hooking, but using the command line of -usecoherent (which reverts it back to using Coherent UI) fixed this. They disabled Chromium for everyone in a patch later that day though so it isn't in use currently. Just something to be aware of for when it returns.

Reverting back to the previous version did not seem to work. The previous version doesn't launch via the launcher, and placing the old d3d9.dll didn't work. Thankfully DX9 seems to work the same in the new version as old versions.

@jmquigs
Copy link
Owner

jmquigs commented Mar 15, 2023

@DaelinDwin thanks for the feedback! Its interesting that chromium would block modelmod. I definitely didn't expect that and it isn't doing that for me. If you can still reproduce that, I'd be interested in a log file when you run Start(Debug) with the 1.2.0.51 alpha release. Let it run for 60 seconds or so and that should give me a decent capture.

Its true that d3d9 should still work the same in the latest build, in fact I hope I didn't break anything in there, of course for GW2 it won't matter in a few weeks anyway but I want to keep it working.

FWIW I was able to revert to the old 1.1.0.4 MM release using the following procedure

  1. Start the game and make sure "DX9 Rendering" is checked
  2. Exit and copy d3d9.dll from ModelMod-1.1.0.4\Bin\modelmod_64 into the game's "bin64" directory
  3. Run the old MM launcher, and click Start on GW2-64. It won't start, but it will update the path to modelmod in the registry to the old version so that it can load
  4. Restart the game

The flickering issue is annoying. What's happening is something is unhooking my draw call for a few frames, constantly. Its not the game though, because it happens in my dx11 test app. I think its windows. If I switch to a different hook method such as the one reshade uses, I hope that goes away.

@arb1911
Copy link

arb1911 commented Mar 16, 2023

It is still crashing for me.

ModelMod.Gw2-64.log

@jmquigs
Copy link
Owner

jmquigs commented Mar 16, 2023

@arb1911 Thanks, that log file gives me some ideas, I'll have a new build for you to test tomorrow, whenever is convenient for you

@jmquigs
Copy link
Owner

jmquigs commented Mar 18, 2023

@arb1911 There is a new build here: https://github.com/jmquigs/ModelMod/releases/tag/1.2.0.53 . There is a small chance this fixes your crash but mostly it puts extra debug info in the log for me to look at. It also fixes the flicker issue.

@DaelinDwin
Copy link

I have played for maybe 40 minutes with the new build. No crashes, flickering or other errors seen.

In regards to Chromium, as I said, they disabled it for all users so I can't replicate the bug right now. As the issue seemed to be related to dxd9.dll I don't expect it to cause problems for ModelMod in the future.

@arb1911
Copy link

arb1911 commented Mar 19, 2023

ModelMod.Gw2-64.log

Yup, still the same. I'm noticing that I don't get the crash pop up anymore. It is now just going to a white screen after I launch and then just exiting. Hope it helps, thanks!

@jmquigs
Copy link
Owner

jmquigs commented Mar 21, 2023

@arb1911 Thanks for the report, I did find a bug in my code and fixed it. There is a new build, https://github.com/jmquigs/ModelMod/releases/tag/1.2.0.62 . That might fix it for you, if not it will generate some new logging to keep me up at night.

@arb1911
Copy link

arb1911 commented Mar 21, 2023

ModelMod.Gw2-64.log

More of the same. I don't mean to cause you such discomfort haha.

I'm not sure if it has anything to do with it, but I've noticed this in the properties of the d3d11.exe. Let me know if there's anything I should try on my end.

explorer_2023-03-21_19-00-14

@jmquigs
Copy link
Owner

jmquigs commented Mar 22, 2023

@arb1911 Thanks for the log. It looks like GW2 is trying to initialize with multiple threads on your computer and that is interfering with ModelMod. It doesn't do this for me, but perhaps it makes that change based on performance (my two test comps are several years old so they aren't particularly fast). Have you ever tried running ReShade? I'd be curious if that works for you. If it does (or doesn't) I'd be interested in the log file it produces. It will be called ReShade.log and it will drop it right in the game's root directory. If you delete MM's d3d11.dll and install the one from reshade it should attempt to init.

That explorer security warning is also something I don't see on my computer, but I don't think its a factor here. MM is definitely trying to initialize, if it was outright blocked, i wouldn't expect to get this far.

@arb1911
Copy link

arb1911 commented Mar 22, 2023

ReShade.log

Yes I do run ReShade, It's a dxgi file and not a d3d11 file. So it works with Arcdps and, funnily enough, dx9 modelmod. I did try to take it out to see if was interfering with the d3d11 modelmod, but that wasn't the case.

@jmquigs
Copy link
Owner

jmquigs commented Mar 24, 2023

@arb1911 Thanks, your reshade log was helpful. It does appear the game is taking a different initialization path on your comp, and my code probably wasn't dealing with that well. Anyway here is a new build for you to try: https://github.com/jmquigs/ModelMod/releases/tag/1.2.0.66

@arb1911
Copy link

arb1911 commented Mar 24, 2023

Good news it is now working on my end. Used it for about 40 mins, no crashes and didn't see any flickering. Here is the log if interested:

ModelMod.Gw2-64.log

Some notes:
-Doesn't work in conjunction with the ReShade dxgi file. Causes crash.
-No texture replacements, I'm assuming this will come with snapshotting?

Anyway, thanks for your work so far it is greatly appreciated!

@jmquigs
Copy link
Owner

jmquigs commented Mar 25, 2023

@arb1911 Glad that it sort of works for you now. Unfortunate that it crashes with reshade but that is probably something I can try to reproduce here. I would like it to continue to work with reshade (and I would like to use reshade myself as well).

Texture loading should work but I noticed that you have some errors related to texture formats in your log, which I will try to fix in the next build. The other thing you may need to do is set your shader detail to "high" in the game, I have noticed that on lower detail settings with DX11, the mod textures often don't show up properly (haven't looked in to why but my guess is the texture data is incompatible with the lower-detail shaders)

For now I'm going to move on to implementing snapshots since that is the last major missing piece

@RenegadeWraith
Copy link

FWIW It's still possible to enable DX9 by putting -dx9 in the file path.

@arb1911
Copy link

arb1911 commented May 13, 2023

@RenegadeWraith
Yeah it is, I've tried to make it work with ModelMod but I couldn't get it to work unfortunately.

@jmquigs
Copy link
Owner

jmquigs commented May 13, 2023

@RenegadeWraith @arb1911 Good to know though I wonder if that will work long term, I suspect they will remove the dx9 code at some point or it will just stop working for other reasons (if they aren't testing it, will probably rot).

I do have DX11 snapshotting working now though it isn't quite as smooth as DX9 (you have to start in a specific snapshot mode from the launcher because I have to precapture data in DX11). I hope to have a build of that ready in the next week or two.

@arb1911
Copy link

arb1911 commented Jul 13, 2023

Any news on snapshotting?

I really miss it, haha.

@jmquigs
Copy link
Owner

jmquigs commented Jul 14, 2023

@arb1911 I do have it mostly working with a few limitations but need to finish it up. I will try to refocus on that

@RenegadeWraith
Copy link

RenegadeWraith commented Aug 15, 2023

Apparently Arenanet recently disabled the -dx9 command line argument. So now we can't do snapshotting at all until Dx11 fix for ModelMod.

Another issue, I reinstalled Gw2 and now ModelMod texture replacing isn't working despite me copying everything exactly as before.
I see this in the logs:

ThreadId(1)/8625ms: failed to load d3dx: texture loading and snapping not available: LoadLibFailed("D3DX11 not found in system or ["C:\\Users\\Me\\Documents\\ModelMod\\TPLib\\x86_64\\d3dx11_43.dll", "C:\\Users\\Me\\Documents\\ModelMod\\TPLib\\x86_64\\d3dx11_42.dll", "C:\\Users\\Me\\Documents\\ModelMod\\TPLib\\d3dx11_43_x86_64.dll", "C:\\Users\\Me\\Documents\\ModelMod\\TPLib\\d3dx11_42_x86_64.dll"]")

Inside the TPLib folder there's only D3DX9_43_x86_64.dll and D3DX9_43_x86_64.dll

Edit: Fixed this by installing DirectX legacy components from Microsoft.

@jmquigs
Copy link
Owner

jmquigs commented Aug 15, 2023

@RenegadeWraith yes I saw they were removing the -dx9 option. My guess is they want to delete all their dx9 code which is probably cluttering up the engine.

The issue with the texture failing to load is because I forgot to put that dll into the release package. The next build should have it. As you noted installing the Dx legacy components is another way to get it.

I do have DX11 snapshotting working with some limitations but requires a couple changes to the launch process that I haven't completed yet. I hope to get to those soon-ish, dealing with a few pressing IRL issues ATM.

@Frosferes2
Copy link

Hi again, hope you're doing well. I've just reinstalled Windows 10 and am trying to get MM to work as it did before the reset. But I'm getting the same failed to load d3dx error mentioned by RenegadeWraith. I installed Directplay under Windows legacy features and the error still persists. Any idea why this may be happening?

@jmquigs
Copy link
Owner

jmquigs commented Nov 3, 2023

@Frosferes2 maybe try the DX legacy end user runtime:
https://www.microsoft.com/en-us/download/details.aspx?id=35

Games that use libs like d3dx are supposed to bundle that with their own installer, but MM does not use an installer so if they are missing they need to be installed separately.

@Frosferes2
Copy link

@jmquigs Thanks, that worked, my mods are now loading again. I now have Visual Studio running on my machine, so I just have to learn how to use it properly and I can have a go at the vertex normal issue.

Whilst I'm here, can I just ask why the weight blend indices are encoded in a format that MM can't interpret? Is this part of the code unfinished? I ask because I will want to use mod weight mode in future, as several of my mods are somewhat extensive remodels that proximity weights don't work very well for. I want to know if this is a fix I would be capable of implementing or not.

@jmquigs
Copy link
Owner

jmquigs commented Nov 3, 2023

@Frosferes2 I'm not sure what you mean about the weight blend indices. Can you explain more?

I can say that personally, I never use anything other than ref weighting. Mod weighting requires skill with blender that I don't have. Unfortunately this is an area where MM's approach to weights (weighting without a full skeleton) is not ideal, because there can be dozens of weights (corresponding to bones) used by the game for each mesh and they vary depending on what mesh is being rendered.

@Frosferes2
Copy link

@jmquigs I'm referring to this comment I made the other day: #36 (comment) This error seems to occur any time mod weight mode is used. Notice the blend index format is different from any other data format here. I'm not familiar enough with the ModDBInterop script yet to tell you more than that though.

GW2's playable race character models are very low poly and have low res textures. They've been unchanged since the game was first released after all. I've been using Blender to remesh and smoothen out a couple of character models so they don't look as blocky, and using AI upscaling to improve the detail of the extracted textures. The higher poly models don't play well with automatic weights, as you might expect.

The index groups thing isn't too big of a deal in all honesty. It wouldn't be too difficult to make a Blender script to symmetrise the names, and later reset them for exporting. I could also produce a replica skeleton for more accurate weight painting if I really wanted. But for the time being I'm focused on getting the stuff I export into the game looking like how they're supposed to.

@jmquigs
Copy link
Owner

jmquigs commented Nov 4, 2023

Oh, that is probably coming from here.

| _ -> failwithf "Unsupported type for mod blend index: %A" el.Type

What it means is that the code doesn't know how to write the blend indices to the d3d vertex stream in the format the game expects (in this case R8G8B8A8_UInt). There are lot of possible formats and when I first made this code I only tested the formats I had on hand (rather than putting code in there for formats I had no way to test). Its quite possible that the existing function writeBI() might work for this case, since the name of the format suggests its just 8 bits each for 4 blend weights, represented as unsigned ints, which the same as what those other formats are. The ordering of the indices may matter however (it could be reversed, although the name of the format follows standard RGBA conventions so this isn't likely)

@RenegadeWraith
Copy link

Any update on dx11 snapshotting?

@arb1911
Copy link

arb1911 commented Apr 7, 2024

Any update on dx11 snapshotting?

Yeah, I miss this feature greatly.

I hope it will come back.

@Vergilldc
Copy link

dx11 snapshotting would be fantastic indeed. Support for latest Blender versions would be the cherry on top but that's not that important now. :)

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

8 participants