FransBouma / InjectableGenericCameraSystem

This is a generic camera system to be used as the base for cameras for taking screenshots within games. The main purpose of the system is to hijack the in-game 3D camera by overwriting values in its camera structure with our own values so we can control where the camera is located, it's pitch/yaw/roll values, its FoV and the camera's look vector.
BSD 2-Clause "Simplified" License
718 stars 249 forks source link

Homefront2: Mouse cursor stays on screen even when the UI is closed #36

Closed FransBouma closed 7 years ago

FransBouma commented 7 years ago

This is likely caused by the flag in ImGui which says to render the mouse cursor even when the window is closed.

elajits commented 7 years ago

After the update "Fixes #36" for Home Front The Revolution i cant get the camera to work it just crashes my game and i am on game version 1.078.1055 for now! So you if you have the version before Fixes #36 it would be nice if you want to share it! thx Elajitz

FransBouma commented 7 years ago

This fix hasn't been included in a binary release tho, just in code. You built the camera dll from source code? Btw, it works fine with my version (official steam build). Where did you get the version '1.078.1055' from btw?

FransBouma commented 7 years ago

Ooops, I misread the date. This code has been in the latest binary indeed, I confused it with a push I made earlier last week. But it works fine here, so I don't know what causes this if you are indeed using an official steam build. Still I think there's something off on your end as that version number is nowhere to be found in the game.

elajits commented 7 years ago

Hey again! sry double posting you here and there! :P Its weird i got the camera tools to work whit the game for a little more than a month ago And i used the same 1.078.1055 game version then and everything was working well! And you haven't maid any recent updates that might brake that for 1.078.1055 version? it might be v1.0.2 that worked for me! thx!

elajits commented 7 years ago

Windows Error Log

The error occurred in the program with the name: Homefront2_Release.exe, version 1.0.78.1055, time stamp 0x589deb06 , the error occurred in the module named: HomefrontTheRevolutionCameraTools.dll, version 0.0.0.0, time stamp 0x59836f1f Exception code: 0xc0000005 Error Shift: 0x0000000000036a98 Process ID: 0x34e0 Program start time: 0x01d324e62abadc08 Program Path: D: \ Games \ Other \ Homefront The Revolution \ Bin64 \ Homefront2_Release.exe Path to Module: D: \ Games \ Other \ Homefront The Revolution \ Bin64 \ HomefrontTheRevolutionCameraTools.dll Report ID: 9cde5659-4a1d-4c35-a3e0-5a8d5aab89cd Full name of incorrect package: Program ID Relative to Incorrect Package:

FransBouma commented 7 years ago

no, no update other than this one and the changes were very minimal and shouldn't create any different behavior other than that the cursor isn't shown now.

This is with the official steam release? Thing is, I have the latest build from Steam and the camera tools work OK, no crashes and my version is 1.0.0.1.

(from a crash I did myself: Faulting application name: Homefront2_Release.exe, version: 1.0.0.1, time stamp: 0x58e252dc)

so no idea where your version comes from... I also have steam set to update the game always, so if there's an update it should download it...

elajits commented 7 years ago

okay! weird i got it working a month ago! :) i will look into my game version! thx!

FransBouma commented 7 years ago

I did a verify of my local game files (so steam would d/l the latest stuff) and everything was up to date. Sorry I can't help you further. It's weird that the camera crashes now though, the changes in the latest build are really minimal and not something that should crash anything... Did you enable the steam overlay perhaps? Or add another overlay to the game through some other app? If so, disable that and try again?

elajits commented 7 years ago

okay! are there any chance for you to link the version before the minimal update? already tested that disabled steam overlay and AV, Rivaturner ect! :)

FransBouma commented 7 years ago

I've added the v1.0.3 build to the release as well: https://github.com/FransBouma/InjectableGenericCameraSystem/releases/tag/HTR_104

I don't think it will make much difference, but in any case, one way to find out :)

elajits commented 7 years ago

thx so much i will test it out right away! 👍 :)

Hey i got the same crash when i starting it! it must be even a earlier version! CameraTools_v102 or v101

FransBouma commented 7 years ago

That could be, v1.0.3 introduced an overlay instead of the separate console window. I don't know what's wrong tho, it should work OK. I think reshade works fine too?

elajits commented 7 years ago

okay! yea i think i was using 1.0.2 for sure! I can remember when i use it And when getting it to work I had som issues whit FOV that created some weird lines or some artifacts! so if you like plz upload the 1.0.2 if there are some :)

Thx for helping me whit this! :)

FransBouma commented 7 years ago

So you want the buggy camera with the weird fov? Well, suit yourself then :) I'll temporarily add it to the release, please post again when you have download it so I can remove it again ;)

elajits commented 7 years ago

Thx :D yea its better than noting hehe! i use CT table for fov :) this one Woork! yay thx so much for this 💃

FransBouma commented 7 years ago

Ok :) Well, I'm still puzzled by the version number issue and why the newer one doesn't work, but alas, no way to find that out, so as long as the old one works, who cares! :) Have fun :)

elajits commented 7 years ago

i just saw that the hooking working fine now it crashed before!.. but when i trying to enable free cam in game it crashes! if you don't mind do you want to upload version 1.0.1 just to see if that one will work :)

FransBouma commented 7 years ago

then I don't know and 101 won't help you, code is the same for the camera. Something's off on your side, either you're not running the game as administator or you have an incompatible version.

elajits commented 7 years ago

okay well i run as admin and whit 1.0.2 i was able to hook it whit the game! BTW i was talking whit my friend that own the game and he said that he had installed a pirate version of the game so that's the cause of all the crashes! so i went into steam and bought it 👍

elajits commented 7 years ago

Those kind of camera injectors it is possible to create one to Far cry 4? or are there some games that are harder than others? :)

thx Again! / E

FransBouma commented 7 years ago

BTW i was talking whit my friend that own the game and he said that he had installed a pirate version of the game so that's the cause of all the crashes! so i went into steam and bought it

Good job :) Yeah I suspected as much ;)

It's always possible to create one for a game, for fc4 I didn't create one as I didn't really like the game much, so I didn't bother. It's mostly that I create the tools for the games I want to take shots off. FC4 has a Cheat table tho (not made by me). See: https://pastebin.com/1Ugiund4

elajits commented 7 years ago

Yea! he told me that he fixed it for me but did not know it was a pirate thing hehe :D the camera is working great but in some scenarios the player model is showing up a front of me when using free camera and when i freezing time in cut scenes all textures glitching out!.. but that's is nothing comparing to the problems i had! the camera works and i am happy for that :)

if you like to do a FC4 camera injector i can donate you so you can buy the game :)

FransBouma commented 7 years ago

Everything's explained in the readme.txt in the zip

I own FC4, but I won't play it again and don't think I'll take shots from it so creating a camera isn't high on my list of things to do, sorry.

elajits commented 7 years ago

Okay Np! :) Yea the built in phone camera in FC4 is pretty god for basic shots! that's good enough! but it would be fun to test the CT out but how do i use the past bin text do i copy it and save in a txt file and open it in Cheat engine? Thx!

FransBouma commented 7 years ago

Yes save it as a .ct file and open it in cheat engine (attach cheat engine to the game at runtime, then open the table and the directions are in the screen (so Num0 enables the fly camera). NO idea if it still works.

elajits commented 7 years ago

Thx! :) okay i will test it out! damn i want to learn to do stuff like this game injectors scripts ect! its seems fun! :D

elajits commented 7 years ago

can i do a request on Dying Light The Following! if you are interested and like the game? :) Thx

FransBouma commented 7 years ago

I don't have the Dying Light game, but doesn't this cheat table work? http://www.deadendthrills.com/forum/discussion/392/guide-dying-light#

elajits commented 7 years ago

Okay! Ooh! thx i did not know that there was a table for it! Thx 👍 do you know if there is a table for Call of Duty Modern Warfare remastered?

Thx :)

FransBouma commented 7 years ago

Not that I'm aware of, no. Almost no-one makes camera tools / camera cheat tables for CoD games.

elajits commented 7 years ago

okay! yea most of those cod games have there own console commands i think! :) Btw about screen shooting whats best for image quality of Jpg Png Bmp?

FransBouma commented 7 years ago

png or bmp as they contain most info from a screenshot tool. but for uploading, use jpgs, see: http://www.neogaf.com/forum/showpost.php?p=58594073&postcount=123

uploading bmp's to flickr for instance will compress them a lot so for uploading use jpgs or if you must, pngs.

see also: http://www.neogaf.com/forum/showthread.php?t=546220 and http://www.neogaf.com/forum/showthread.php?t=1329720 (tools section)

elajits commented 7 years ago

Thx for good info sites 👍 So it's best or better to take screenshots in png or bmp and when re size them i save them as jpg? i use to capture screens at 4k/8k and resize them to 1080p / 2k or other matching aspect ratio (depends) i use fast stone image viewer and i use Lanczos2

FransBouma commented 7 years ago

yes, just keep an eye on the jpg compression ratio. I use 98% quality, no color subsampling, 0 smoothing and no progressive. Lanczos3 is better tho, 2 tends to overly sharpen things a bit at times (but it depends on the shot of course)

elajits commented 7 years ago

okay thx for that info! 👍 are you using FastStone? or Gimp? thx!

elajits commented 7 years ago

Hi again! do you have any plans to make a camera for Darksiders II ? Deathinitive Edition ? Thx

FransBouma commented 7 years ago

Don't have the game, only the original Darksiders II. I made a camera for that (my first!) in cheat engine, but that doesn't work on the Deathinitive edition

elajits commented 7 years ago

Okay! thx! :)