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
    953 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
    953 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
    953 views
    File comment
    Rain effect missing in this scene.
    File license
    Fair use/fair dealing exception

Reply 1 of 7, 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 7, 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 7, 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 7, 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 7, 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. There also seems to be a lighting effect at the main menu that's not functioning on d3d. The light seems like it's supposed to be yellow.

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

Attachments

  • unknown.png
    Filename
    unknown.png
    File size
    1.83 MiB
    Views
    91 views
    File comment
    D3D
    File license
    Fair use/fair dealing exception
  • 06658daa40.png
    Filename
    06658daa40.png
    File size
    1.4 MiB
    Views
    91 views
    File comment
    OpenGL
    File license
    Fair use/fair dealing exception
  • test2.png
    Filename
    test2.png
    File size
    1.96 MiB
    Views
    91 views
    File comment
    Deadly Cargo
    File license
    Fair use/fair dealing exception
  • test.png
    Filename
    test.png
    File size
    1.54 MiB
    Views
    91 views
    File comment
    Beldingford
    File license
    Fair use/fair dealing exception

Reply 6 of 7, 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.