VOGONS


First post, by ed_barber

User metadata
Rank Newbie
Rank
Newbie

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.

Attachments

  • 20190326123636_1.jpg
    Filename
    20190326123636_1.jpg
    File size
    313.8 KiB
    Views
    1555 views
    File comment
    Water fall effect is static on this angle.
    File license
    Fair use/fair dealing exception
  • 20190326123632_1.jpg
    Filename
    20190326123632_1.jpg
    File size
    349.54 KiB
    Views
    1555 views
    File comment
    Water fall effect is moving on this angle.
    File license
    Fair use/fair dealing exception
  • 20190326123041_1.jpg
    Filename
    20190326123041_1.jpg
    File size
    285.75 KiB
    Views
    1555 views
    File comment
    Rain effect missing in this scene.
    File license
    Fair use/fair dealing exception

Reply 1 of 12, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

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).

I'll give it a shot.

Reply 2 of 12, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

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.

http://dege.fw.hu/temp/HitmanContracts_d3d_ra … ndrop_patch.zip

Reply 3 of 12, by HMBM47

User metadata
Rank Newbie
Rank
Newbie

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?

Not sure if it matters, but I've provided the Steam .exe in case that's the reason those levels don't work with my version?
https://www.dropbox.com/s/ypn3nq3f9eoyaxs/HMC-Steam.rar?dl=0

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.

Reply 4 of 12, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 5 of 12, by ZT111

User metadata
Rank Newbie
Rank
Newbie

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.

Save: https://mega.nz/file/WpgiFCrJ#ok5-l84jarP0YlT … GKpDwYAOdHyUZ4g

Attachments

  • test2.png
    Filename
    test2.png
    File size
    1.96 MiB
    Views
    693 views
    File comment
    Deadly Cargo
    File license
    Fair use/fair dealing exception
  • test.png
    Filename
    test.png
    File size
    1.54 MiB
    Views
    693 views
    File comment
    Beldingford
    File license
    Fair use/fair dealing exception
Last edited by ZT111 on 2021-02-10, 20:27. Edited 1 time in total.

Reply 6 of 12, by daniel_u

User metadata
Rank Member
Rank
Member
Dege wrote 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.

http://dege.fw.hu/temp/HitmanContracts_d3d_ra … ndrop_patch.zip

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.

Reply 8 of 12, by hitbm47

User metadata
Rank Newbie
Rank
Newbie
HMBM47 wrote 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?

Not sure if it matters, but I've provided the Steam .exe in case that's the reason those levels don't work with my version?
https://www.dropbox.com/s/ypn3nq3f9eoyaxs/HMC-Steam.rar?dl=0

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.

Kind regards
Jacques

Reply 10 of 12, by ZT111

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2021-02-09, 17:58:

Hi,

could you plz provide me savegames for the problems in question?
I think I could have a look at them a bit later.

https://mega.nz/file/WpgiFCrJ#ok5-l84jarP0YlT … GKpDwYAOdHyUZ4g

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.

Attachments

Reply 11 of 12, by Mandalorian

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 12 of 12, by ZT111

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2021-02-09, 17:58:

Hi,

could you plz provide me savegames for the problems in question?
I think I could have a look at them a bit later.

I realized those weren't for the affected parts in the levels. This one is.
https://mega.nz/file/yw40SK5A#DmRIkwkEJLHMAtF … GxgFLaNubbD7wjs