Open arsipsik opened 2 years ago
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: https://github.com/jmquigs/ModelMod/compare/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.
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.
Quick update!
More of what is possible with this tool.
A kitbashed set from different pieces of Armor and Outfits with upscaled textures!
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?
@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
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.
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.
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.
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.
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.
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.
I'm happy report that with commits 5349fe6d6d2128615830b4da0aa518342b2d3faa and 524171892e2da8f43b2e99a318f5f546ae54a922 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.
This is great news! Great work! 🎉🎉
Thank you. Your work is greatly appreciated!
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.
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).
Can't seem to get it to run, it's crashing for me.
@arb1911 Can you attach the log file? ModelMod.Gw2-64.log
Here ya go.
@arb1911 It looks like the hook failed. Did the game hang, or crash, or just run without mods?
Crashing.
Its probably my hook method. I'll look at it...
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
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.
As a new build is on the way, I will just wait for that before testing.
@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.
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/
@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.
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.
@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.
It is still crashing for me.
@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
@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.
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.
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!
@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.
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.
@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.
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.
@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
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:
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!
@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
FWIW It's still possible to enable DX9 by putting -dx9
in the file path.
@RenegadeWraith Yeah it is, I've tried to make it work with ModelMod but I couldn't get it to work unfortunately.
@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.
Any news on snapshotting?
I really miss it, haha.
@arb1911 I do have it mostly working with a few limitations but need to finish it up. I will try to refocus on that
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.
@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.
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?
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: