Back when Hitman Contracts was still a new game, there was this impressive effect that projected next to agent 47 showing the rain coming down the window. In this thread https://www.hitmanforum.com/t/rain-effects-missing/16209, they say it worked on the GeForce 4 series card but on modern hardware it doesn't show up. It would be great if this would be restored as everything else using this wrapper works excellent.
Sounds interesting. Another GF4-only feature?
I guess the driver of that card had some really weird bugs.
Like the one causes 'shiny floor' in Splinter Cell 1 (I couldn't figure out how that gf-pipeline was interpreted exactly by the driver).
The raindrop effect is achieved by texture coord transformation.
The D3D renderer disables the transformation for the time the raindrops are being rendered. I don't know why.
The guy on the forum you linked wrote that it only worked for him on a GF MX440. My tip is that, similarly to the buggy impl of shadow buffers on a GF4, the old driver always performed texcoord transformation so maybe the developers of the game didn't even notice that their code had a bug.
I'm not sure though, so I don't want to include this feature into dgV GF4 profile.
Instead, I patched the game executable. Now the raindrops work in the main menu, that's the only and quick test I did.
Also, I don't know which version of the game I have so the executable may be not from the latest game patch.
Just wanted to report that the fix works for the most part.
From what I've tested the levels where it work are the Main menu, Asylum Aftermath, Deadly Cargo, Hunter and Hunted, and Traditions of the trade.
The effect still seems to be broken on The Wang Fou Incident (Fog below streetlamps pause at certain angles) and Beldingford Manor (Start of level drain water - Lake - Window rain pauses at certain angles).
Any chance you would be able to patch the .exe further so these levels work, or have you already done all that can be done?
Did you just do a simple hexedit or did you decompile the .exe? Perhaps you could provide the info of what was changed and how you did it? (If not too complicated)
Edit:
After some digging I found that the GOG version was used for the fix EXE.
I was then able to easily compare the files to find that the hex string (correct term?)
53 6A 18 53 50 FF 92 FC 00 00 00
was replaced with
90 90 90 90 90 90 90 90 90 90 90.
I was easily able to find and replace the same instance in the Steam EXE.
The issues I stated above are still present.
Edit 2:
After further testing it DOES partially work at Beldingford Manor. The sky and (partial) fog over the lake move.
Yes, that was the change I made. I cut out a call disabling texcoord projection in the code.
I think not all of the instances of that call matches that binary sequence so it'd be better to search for them by debugging.
Could you attach savegames for the problematic points plz? I could investigate them.
Thanks for making this fix. A friend of mine made it into an asi script so it doesn't replace the exe. As HMBM47 said, the effects still seem to be not functioning in other places, like the storm drain, the river's moving water in beldingford manor and the fog under lamps in deadly cargo.
Degewrote on 2019-06-22, 08:10:The raindrop effect is achieved by texture coord transformation.
The D3D renderer disables the transformation for the time the r […] Show full quote
The raindrop effect is achieved by texture coord transformation.
The D3D renderer disables the transformation for the time the raindrops are being rendered. I don't know why.
The guy on the forum you linked wrote that it only worked for him on a GF MX440. My tip is that, similarly to the buggy impl of shadow buffers on a GF4, the old driver always performed texcoord transformation so maybe the developers of the game didn't even notice that their code had a bug.
I'm not sure though, so I don't want to include this feature into dgV GF4 profile.
Instead, I patched the game executable. Now the raindrops work in the main menu, that's the only and quick test I did.
Also, I don't know which version of the game I have so the executable may be not from the latest game patch.
Hi Dege,
Can this impact Splinter cell 1 issues? If yes,can you at least create a special version of DgVoodoo for me to test.? I would very much like to try .
Thanks.
HMBM47wrote on 2019-08-03, 23:47:Just wanted to report that the fix works for the most part.
From what I've tested the levels where it work are the Main menu, As […] Show full quote
Just wanted to report that the fix works for the most part.
From what I've tested the levels where it work are the Main menu, Asylum Aftermath, Deadly Cargo, Hunter and Hunted, and Traditions of the trade.
The effect still seems to be broken on The Wang Fou Incident (Fog below streetlamps pause at certain angles) and Beldingford Manor (Start of level drain water - Lake - Window rain pauses at certain angles).
Any chance you would be able to patch the .exe further so these levels work, or have you already done all that can be done?
Did you just do a simple hexedit or did you decompile the .exe? Perhaps you could provide the info of what was changed and how you did it? (If not too complicated)
Edit:
After some digging I found that the GOG version was used for the fix EXE.
I was then able to easily compare the files to find that the hex string (correct term?)
53 6A 18 53 50 FF 92 FC 00 00 00
was replaced with
90 90 90 90 90 90 90 90 90 90 90.
I was easily able to find and replace the same instance in the Steam EXE.
The issues I stated above are still present.
Edit 2:
After further testing it DOES partially work at Beldingford Manor. The sky and (partial) fog over the lake move.
Hi, excuse me for joining so late in the discussion. But I have found new scenario or cases in which the textures doesn't work properly.
Furthermore, I have applied this hex-edit and it fixes most of the waterfall issues. The drain-pipe in Beldingford Manor only works when looking at it in first person or with a sniper scope, also before applying the hex-edit the sky-clouds also work when looking at them with a sniper or first person pistol. Then getting the Enforcer sniper at the Barn and looking upwards at the side path to the back-entry of the castle/manor causes the sniper scope texture to disappear; in addition, looking in first person with a pistol in the same area and direction causes 47's arms and pistol to become transparent.
There's one more effect I noticed but forgot to mention, which is in the level "meat king's party", there's supposed to be some moving rain reflections on the wall in the room with the dead girl hanging. They're working on opengl/consoles. The effect working: https://youtu.be/apNaX2wwzVY?t=853 Like hitbm47 said, this effect and the others only work when looking at it in first person from certain angles, but they're supposed to work all the time.
On another note, there's a similar issue with Hitman 2. On opengl only with Hitman 2, the ninjas in the levels "hidden valley", "at the gates" and "shogun showdown" all have an effect where their goggles glow red. On d3d, this effect is just missing. I haven't noticed any other things D3D may be missing with H2.
The shiny glasses thing seems to be more of a graphic bug than a detail that was included. I don't think the glasses looked that way. In Hitman 2 SA many effects are altered if one or the other render is used. In Hitman Contracts I have noticed the same problems. If you switch to OpenGL, the effects seem to work but something strange happens. If we look through the holes in the doors, the image is in focus, and it looks horrible. I guess IO never agreed on which of the two to use xD.
Hi guys, I really enjoy following the development of these fixes.
Hitman Contracts is one of my favorite games, and apparently there are lots of things that could potentially be fixed, if we better understand the differences between GL and D3D.
Apparently, the PS2 version is the only version where all graphical effects are correctly rendered?
Anyways, here's a video on youtube, showcasing some other bugs, most notably the broken (or "frozen") fog.
Degewrote on 2019-06-22, 08:10:The raindrop effect is achieved by texture coord transformation.
The D3D renderer disables the transformation for the time the r […] Show full quote
The raindrop effect is achieved by texture coord transformation.
The D3D renderer disables the transformation for the time the raindrops are being rendered. I don't know why.
The guy on the forum you linked wrote that it only worked for him on a GF MX440. My tip is that, similarly to the buggy impl of shadow buffers on a GF4, the old driver always performed texcoord transformation so maybe the developers of the game didn't even notice that their code had a bug.
I'm not sure though, so I don't want to include this feature into dgV GF4 profile.
Instead, I patched the game executable. Now the raindrops work in the main menu, that's the only and quick test I did.
Also, I don't know which version of the game I have so the executable may be not from the latest game patch.
Must be used with Dege's fix to work.
Replace:
53 6A 18 53 50 FF 92 FC 00 00 00
With:
90 90 90 90 90 90 90 90 90 90 90
This should completely fix the water in Beldingford Manor, rain effect, and the fog under street lamps in the other levels. The fog/smoke in various levels is still partially broken, easily noticeable in Meat King's party and Beldingford Manor.
Must be used with Dege's fix to work.
Replace:
53 6A 18 53 50 FF 92 FC 00 00 00
With:
90 90 90 90 90 90 90 90 90 90 90
This should completely fix the water in Beldingford Manor, rain effect, and the fog under street lamps in the other levels. The fog/smoke in various levels is still partially broken, easily noticeable in Meat King's party and Beldingford Manor.
hc2.jpg
hc1.jpg
In OpenGL, both of these textures move.
Hi @Dege,
So sorry for replying after years, this is really bad of me, I just got held op with other things at the time and did not bother with Hitman Contracts often, although it used to be one of my favourites.
I will try to get you the correct saves later if you are even still interested, but @BurntShrimp 's hex-edits fixes most of the issues, although this PC version is still plagued with graphical issues which is especially apparent on BeldingFord Manor, the lighting radiated from like lamp-poles causes your arms and guns to go transparent and the corsair textures of the sniper scope to disappear.
By the way, thanks for the incredible work of DGVoodoo2, it helps a lot with Splinter Cell 1's Shadows. Furthermore, do some of you guys have better tools to help investigate the machine-code of hitman's executable? From my understanding, the best one can do is to reverse engineer the code of the .exe , but then you'll not even see the original logic of the code, not even to mention comments in the code. I simply used the HxD hex-editor to apply your mentioned fixes to my .exe and I noticed a lot of the "FF 92 FC 00 00 00" hexadecimal characters in the .exe.
I would also like to note, I remember noticing some of these graphical bugs on the PS3 HD Trilogy version as well, as if they simply ported it to PS3 with a Widescreen patch. The version I had with the least issues was the PS2 version, although you were missing bullet-casing droppings due to memory constraints. From what I can tell when looking at, unfortunately bad recordings of PS2 gameplay, the mist in the gardens simply might be static, but it is really hard to tell.
As you can see in the following training screenshot, they are definitely rendering textures/shadows/lighting out of order and I remember this specifically happening on the PS3 as well: