-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Documentation #1
Comments
+1 please help give some hint about how to use the code. Thanks a lot. |
Hi sorry for the lack of documentation. I'm writing up something more in depth but the short story is: There are two components, the native and managed. The native component is probably the more useful one to you, since it deals with actually getting images and information from the game. The managed part mostly deals with uploading images to a NAS / S3 and the information to a postgres database (I can post a schema later today) For the native portion: builds of minhook and scripthookv are provided in the deps folder, these are for VS2017 although they should work with 2015 as well. Simply do the usual cmake build process and point cmake to Eigen (Eigen3_DIR I think) The output will be a .asi file. You should put this beside the GTAV.exe file after making sure scripthookv is installed and working. |
Thanks! I already managed to compile the native part of the plugin using cmake 3.8 and Visual Studio 2015. Note that for generating the visual studio solution using cmake, I had to use the following command: The |
Yeah 32bit is pointless since GTA itself is 64bit. The interface to the native library is in export.h and export.cpp. You can simply call them using the standard C FFI mechanism in whatever language you want to write in. We used C# and ScriptHookV.net but there's a lua binding as well. And ofc you can use C |
@barcharcraz Hi, thanks for your work. I hope to ask if I can debug the program using Visual Studio's "attach to process"? Since every time we have to copy the generated .asi to the GTA 5's folder, and start the game all over again. Is there any short cut for debugging? Thanks. |
Well you should post the crash dump somewhere. The idea is to mostaly not
touch the native plugin much for this reason. You can attach to process but
gta is quite grumpy under a debugger (I actually used windbg ).
Also there is a hot reload functionality documented in the scripthook docs.
…On Fri, May 5, 2017 at 12:13 AM Xiaoke Jia ***@***.***> wrote:
@barcharcraz <https://github.com/barcharcraz> Hi, thanks for your work. I
hope to ask if I can debug the program using Visual Studio's "attach to
process"? Since every time we have to copy the generated .asi to the GTA
5's folder, and start the game all over again. Is there any short cut for
debugging? Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPnvS-_ExGDEsYvX8oE5dHsUtgH-mbYks5r2qHJgaJpZM4NJWUm>
.
|
Great. Thanks. I think hot reload could be a good way to debug. |
Also I've noticed that when gta is suspended or in a debugger all input to the computer seems to be delayed by a second or two. This is really annoying and I ended up working around it by using remote stub debugging. |
Hello, first of all thank you for great project. So I am trying to build an asi file from native project. So first I tried to build Eigen, So then I tried to build native project as @dominikandreas suggested. Sorry I am really new to building projects, I would really appreciate if any of you please help me out here. Thank you. |
It seems you're using cygwin, which is not necessary (since we're compiling with visual studio and not gnu/linux toolchains). Get cmake for windows from here: https://cmake.org/download/, use that from a regular windows cmd and use native windows paths (not /cygdrive/c/..) for the parameters. |
Yes. Using Cygwin is probably not a great idea, that said Eigen doesn't
have a binary component so it may work. On windows I would use the visual
studio, ninja, or nmake makefile generator.
Also; I have seen instances where eigen was packaged without the file that
cmake uses to confirm it's found eigen and verify its version. This file is
signature_of_eigen_library (or something close to that)
…On Fri, Jun 9, 2017 at 11:18 AM dominikandreas ***@***.***> wrote:
It seems you're using cygwin, which is not necessary (since we're
compiling with visual studio and not gnu/linux toolchains). Get cmake for
windows from here: https://cmake.org/download/, use that from a regular
windows cmd and use native windows paths (not /cygdrive/c/..) for the
parameters.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPnveFQvdVIdGUXADiYP9HqYEtzLK4Gks5sCWIvgaJpZM4NJWUm>
.
|
Thank you for your quick response. So I used following:
|
You need to open the .sln with visual studio and build the solution. That should generate the .asi plugin |
GTAVisionExport (native) build stepsNote: there may be some unessesary steps that could be removed from this procedure at some point, but this is what I did. Also I have a tendency write Linux style paths. All paths (except URLs) should be Windows style. My set-up:GTX770, Windows 10 64bit, Visual Studio 2017 (community edition), cmake 3.9.0, GTAV version 1.0.231.0 Needed tools and librariesAsiLoader and ScriptHookV : http://www.dev-c.com/files/ScriptHookV_1.0.1103.2.zip Build steps
HTH |
Hello, thank you for sharing this work. I got the color.raw, depth.raw and stencil.raw files, but how should I decode the files to normal images or how to use them? |
@tyzaizl |
got it, and Is there any matlab or python script to extract the image from the raw data. |
You should be able to read the file in python and parse it as a numpy array using arr=np.fromstring(str, dtype=...). You'll have to adjust the dtype depending on the buffer. Once you have that, you can resize the array and display it using matplotlibs pyplot, i.e. plt.imshow(arr) |
@dominikandreas |
If I remember correctly, color was uint8, depth was float32, not sure about stencil. You can figure it out which dtype you need for which buffer by just trying it out and visualizing the result. |
stencil is also uint8, I think |
Hi, first of all thanks for sharing your work, I really appreciate it!
Would it be possible to add some documentation on how to compile the project and what the dependencies are?
The text was updated successfully, but these errors were encountered: