Trinus Forum › Forums › Troubleshooting › Can't access FreeTrack data with the Gyre running
- This topic has 29 replies, 4 voices, and was last updated 7 years, 3 months ago by
ultradiscobob.
-
AuthorPosts
-
October 30, 2014 at 10:07 pm #1210
Jackii
ParticipantHere’s a ‘really’tiny video: http://youtu.be/1ybe3t7XSnU
Taken with a 2012 Nexus 7’s front camera..
October 30, 2014 at 10:45 pm #1211loxai
KeymasterGood stuff π
So, along with that freepie script, you wrote some piece of code running within Blender that reads the freepieIO, or… how does it work?
would be great to have this running directly, without freepie. Any luck with the freetrack connection (I gather from some other thread that doing a registry clean can sort out tracking issues).
otherwise, I might be able to add a a new protocol for integration with Blender… at some point.
I recently added cursor display for mode B, so combined with your work, this could be a good way of doing 3D modelling.October 31, 2014 at 7:31 am #1212Jackii
ParticipantThanks!
I’m using a freePIE script that writes data into IO plugin DLL slot, and then read the slot data from the plugin with Blender using a script.
I also preferred to do that without freePIE running but I had no luck as my experience with networking and sockets is horrible. How about including freepie_io.dll with the Gyre and then writing slot data to it from the Gyre’s side? then it wouldn’t need allot of setting up for the sensor ports and script running.-
This reply was modified 7 years, 8 months ago by
Jackii.
October 31, 2014 at 9:56 am #1214loxai
Keymasteroh I meant using the freetrack.dll as you were trying initially (but getting null values), so TG writes to it and your Blender script reads from it (without any added layer/networking stuff). Maybe you can get that working, otherwise I will add the freepieio protocol to my todo list.
October 31, 2014 at 1:27 pm #1215cercata
Participant“oh I meant using the freetrack.dll as you were trying initially (but getting null values), so TG writes to it and your Blender script reads from it (without any added layer/networking stuff).”
That’s a very good idea, so it will work also with Freetrack, and any other tool that uses the Freetrack protocol/dll
October 31, 2014 at 5:05 pm #1217Jackii
ParticipantJust tried FreeTrack, it uses almost the same functions and structs as FreePIE, but strangely it causes blender game engine to crash immediately on calling the read function while the Gyre is running. While it’s not, it returns null results.
October 31, 2014 at 8:51 pm #1218cercata
Participant“Just tried FreeTrack, it uses almost the same functions and structs as FreePIE, but strangely it causes blender game engine to crash immediately on calling the read function while the Gyre is running. While itβs not, it returns null results.”
With the Trinus DLL, FreePIE DLL, or both ?FreePIE’s FreetrackClient.dll must be using some kind of shared memory that Blender doesn’t like, but the IO pluging should do the same …
October 31, 2014 at 9:12 pm #1219Jackii
ParticipantBoth.. it’s really weird.
Btw here’s a longer video with a proper camera: https://www.youtube.com/watch?v=5-40FPzL9nc
The Gyre is getting some popularity on Blender communities!
November 1, 2014 at 8:15 am #1220cercata
ParticipantThe Struct yo have mapped from ctypes, has ALL this fields ?
It must have them, even if you don’t use them all, because FreePIE writes the entire struct, and if the struct you pointed to is too small, it will write outside the struct, somewhere unknown in the Blender memory space, so it can result in a crash, especially if the struct was in the stack instead of the heap.
When FreePIE is not running, the DLL see that the shared memory is not initialized, and it doesn’t write anything on your struct, so it doesn’t crash.
typedef struct __FTData { int DataID; int CamWidth; int CamHeight; /* virtual pose */ float Yaw; /* positive yaw to the left */ float Pitch; /* positive pitch up */ float Roll; /* positive roll to the left */ float X; float Y; float Z; /* raw pose with no smoothing, sensitivity, response curve etc. */ float RawYaw; float RawPitch; float RawRoll; float RawX; float RawY; float RawZ; /* raw points, sorted by Y, origin top left corner */ float X1; float Y1; float X2; float Y2; float X3; float Y3; float X4; float Y4; } FTData;
November 1, 2014 at 1:52 pm #1229Jackii
ParticipantStill crashes for somehow. I made a shortcut for FreePIE that launches it and runs the script automatically on startup as a temporary solution to prevent hassle, but I still have to re adjust the sensor port and data everytime I open the Gyre’s PC client. :/
November 6, 2014 at 3:16 pm #1351Jackii
ParticipantAlright I created a PC exe of my demo, it has FreePIE included with it.
Extract the folder in the zip file and run game.exe, it will automatically launch FreePIE and run a script. Then launch the Gyre, set it to FreePIE redirect, set the sensor ports on both PC client and app to 5554.
Download**Tested on my PC only.
November 7, 2014 at 7:09 pm #1366loxai
Keymasterearly release this week, with FreePieIO integration (so no need to use redirection anymore)
http://oddsheepgames.com/?topic=freepieio-support-for-game-developmentNovember 7, 2014 at 11:25 pm #1369November 8, 2014 at 7:14 pm #1378Jackii
ParticipantThere were some complaints about Google drive corrupting zip files, so here’s a mediafire download: http://www.mediafire.com/?6sam2vq088q14jo
This one is a bit different than the last release, as it doesn’t require FreePIE to be running, much thanks for the IO protocol!
OpenGL support in windowed mode A for low latency would make it perfect. πMarch 11, 2015 at 10:28 pm #2656ultradiscobob
ParticipantI tried the last release and while this one actually does something (it actually sees the phone’s sensor, before only freepie did), I still need freepie to be running, and more importantly the tracking is all over the place. It looks like if you were the Flash having a seizure (though it’s VERY useful for inducing projectile vomiting).
-
This reply was modified 7 years, 8 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.