#directx7
Explore tagged Tumblr posts
skyboxeye · 11 days ago
Text
Creating a runtime texture mod for Earthworm Jim 3D
In this post I'll share my struggles and successes with Special K and other wrapper tools in my attempts to prevent Jim's shadow from rendering. I'm running the GOG version of the game on Windows 10 with an Nvidia GeForce GTX 1070.
Tumblr media
Running EWJ 3D with Special K
Special K is the self-appointed "Swiss Army Knife" of PC gaming in that it does "a bit of everything". In our case, this means texture modding and windowing fixes for EWJ 3D. Special K also offers upconversion of EWJ's DirectX 7 rendering calls via a DgVoodoo plugin.
Local versus global installation
We'll be using version 25.1.3.1, since (at the time of writing) subsequent releases contain input bugs impacting EWJ 3D.
Although the docs promote purely "local" Special K installations as an alternative to "global" injection performed through the Special K frontend UI, I couldn't get this working for EWJ.
I did however manage it by "converting" (a misnomer since installations created this way are actually partially global, and partially local) a global install to a local one - achieveable by holding Ctrl and Shift while click the Play button inside Special K's frontend.
Tumblr media
This approach allows you to maintain per-game DLL and CONF files; you may prefer it if you're running other games with Special K. However I'll use a global installation throughout this guide, for simplicity.
Issues when customizing EWJ 3D's resolution via its menus
The game boots to an options menu which allows you to, among other things, change your display options: 1.) Color depth and 2.) Resolution. These settings will not persist unless we run the game in compatibility mode for Windows XP*, or thereabouts.
Oddly this menu wants to display at 640x480 no matter what resolution is selected. That is, EWJ only transitions to that resolution once it properly starts. This is typically harmless but seems to break Special K's injection of the game's process, resulting in the loss of Special K's on-screen display and possibly other things.
*This has the downside of requiring EWJ to be run as an administrator - which doesn't cooperate well with Special K, unless of course Special K frontend is also run as administrator (I don't recommend this). This is a possible motivation for running a "converted" local install, as that approach (along with purely local installs) does not require the Special K frontend.
Solution: Forcing EWJ 3D's resolution via DgVoodoo
To avoid this confounding resolution change, we can force EWJ to always run at our chosen resolution (example: 1920x1080) via DgVoodoo. First, set up DgVoodoo as a Special K plugin. Then, modify your CONF file in a text editor or via the control panel:
[DirectX] Resolution = h:1920, v:1080
This means we don't need to rely on Windows XP compability mode to both run the game in our desired resolution and reliably inject Special K. That's good news, as I (anecdotally) found EWJ crashes more often when in compability mode.
Other mandatory DgVoodoo configurations
Be sure to set the following options as well:
[GeneralExt] PresentationModel = flip_discard FullscreenAttributes = Fake
Dumping textures
Launch the game via Special K's frontend. Don't forget to insert an EWJ 3D disc before starting the game!
Thanks to our DgVoodoo setup, you should be able to edit the resolution and color depth in the options menu without losing Special K's injection. Once the game starts, open the overlay and click into Render Mod Tools.
You'll notice that for some reason, no assets are listed under Used Textures. This can apparently result from intrusive overlays, but I have a feeling that something else is going on. Highlight Selected Texture doesn't work either - presumably for the same reason.
Tumblr media
Anyway, you'll find that you're still able to switch over to All Textures, and click Refresh, to see what the game has loaded. Find the texture you're looking to modify, make note of its format details, and click Dump Texture to Disk.
Tumblr media
Editing textures
If you've been following this guide you'll find the DDS files inside a directory like <Special K path>\Profiles\Earthworm Jim 3D\SK_Res\dump\textures\EarthwormJim3D.exe. I tried two editing tools: Intel Texture Works (ITW) and Paint.NET. ITW doesn't Paint.NET offers support for a wide variety of formats but sadly doesn't seem to understand mipmaps.
Tumblr media Tumblr media
There is also Nvidia Texture Tools Exporter (NTTE) for saving/compressing, but not editing.
Tumblr media
If no single tool offers all of the features you need, you can combine them - for example we can edit a BC2 texture in ITW, export it to BC3, and then re-encode it as a BC2 using NTTE.
Injecting textures
Move your edited textures into <Special K path>\Profiles\Earthworm Jim 3D\SK_Res\inject\textures\EarthwormJim3D.exe and click Reload All Injected Textures. Or, restart the game.
Appendix 1: Other texture injectors?
See if we can use another texture modding tool, such as uMod or TexMod, alongside standalone DgVoodoo* upconversion of DirectX 7 -> DirectX 11 (I couldn't find any that did DirectX 7 -> DirectX 9). Other API wrappers, namely DXWrapper and WineD3D, did not perform well:
DXWrapper boots but there are severe graphical issues. I tried customizing every available option for D7->D9 in dxwrapper.ini. All did nothing or crashed the game.
WineD3D crashed unless I combined with DxWnd. After which it was very slow, and did not work besides.
Appendix 2: Modifying game data?
Instead of injecting altered textures at runtime, we can try to modify the textures.dat archive which EWJ loads from.
Appendix 3: Other Stuff
We might also need DxWnd to improve windowing - we'll see. Might be able to set hotkeys via uMod templates s.t. we don't need to visit its window at all.
There is a successor for uMod build for Guild Wars call gMod. Presumably it would have the same problem of requiring D9.
7 notes · View notes
mothsolar · 11 months ago
Text
I'm pretty sure there's graphics libraries and stuff that are designed around for that reason. OpenGL and DirectX being the ones that come to mind. If you've ever hard to play an old game on windows and it tells you to get DirectX7 or whatever, that's why. I'm pretty sure most game engines have that kind of support built in too so unless you make your game from the ground up and make your own graphics library with it, it sbouldn't be a problem.
Hey game devs. How the actual hell do you account for like the dozens of random graphics cards from different companies getting updates like every other month. Like how do you know your game isn’t just gonna stop working randomly some day for some guys graphics card driver version
216 notes · View notes
trottings · 8 years ago
Photo
Tumblr media
@directx7 thank you!! i colored them with eyeshadow haha
0 notes