marinos.giannoukakis Posted May 19, 2016 Share Posted May 19, 2016 Can we please have a small code snippet of reading a particular bone position from kinect....? (lets say left hand....) i am bit confused with the body index......:( Thanks...... Link to comment
marinos.giannoukakis Posted May 19, 2016 Author Share Posted May 19, 2016 also would there be a particular way to attach lets say a particle system to the one bone.....? thanks....:D Link to comment
marinos.giannoukakis Posted May 21, 2016 Author Share Posted May 21, 2016 i m guessing this is one of those posts that never get answered......? Link to comment
silent Posted May 23, 2016 Share Posted May 23, 2016 Hi Marinos, Please, don't worry, we saw all your questions. Right now, I'm afraid, all the developers are quite busy - that's why there is no answer yet. I will try to raise the priority of this topic. Btw, have you checked the kinect_01 sample? Which exactly part of this code is causing difficulties on your side, could you please explain? Sorry for the inconvenience caused. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
marinos.giannoukakis Posted May 23, 2016 Author Share Posted May 23, 2016 Haha thank you Silent, I do understand that certain posts have priority over others, so don t worry I am not stressing.... Never the less my issue is that trying to read a particular bone (lets say a wrist on the left hand) i am getting 0's as returns and not the actual positions even though the actual skeleton is updated overall. So the sample does work but i think that I am doing something wrong with the body index from the engine.kinect.getBonePosition(int body, int bone) function..... So i thought like a short snippet of reading a particular bone position, or a short example of attaching something like a soft body or particle system on a particular bone, would be useful..... All the best.... m Link to comment
ded Posted May 27, 2016 Share Posted May 27, 2016 Hi Marinos,Unigine Kinect plugin is designed in such way that when engine.kinect.isBodyTracked(body) returns 0, engine.kinect.getBonePosition(body, bone) will return vec3_zero.Kinect has its own framerate and body tracking information is not available each engine frame.That's why Skeleton class in kinect_01.cpp sample remembers bone positions in array and uses them for a while, until body tracking information is updated.Sample for wrist tracking will look like this: vec3 wrist; int update() { if(engine.kinect.isBodyTracked(0)) { wrist = engine.kinect.getBonePosition(0,KINECT_BONE_WRIST_LEFT); } engine.visualizer.renderSphere(0.05f,translate(wrist),vec4_one); return 1; } 1 Link to comment
marinos.giannoukakis Posted May 27, 2016 Author Share Posted May 27, 2016 that's great thanks once more guys.....:D Link to comment
marinos.giannoukakis Posted June 13, 2016 Author Share Posted June 13, 2016 nope it can t be so simple like that, unless there is a bug the suggested code is not working... not updating and the sphere is not translated to the vec3 wrist position.... it just stays in the center.... is weird cause all this is based on kinect_01 sample where bone positions are being used for the skeletons and seem to work.... trying to access a single bone in the update function is NOT working though... my initial approach was same as the suggested code... i just gave it one more try ( and many more) but for some reason is not working at all..... Link to comment
marinos.giannoukakis Posted June 13, 2016 Author Share Posted June 13, 2016 would i have a better chance creating a class similar to the skeleton class in the sample for reading a wrist for example (a class that has it's own update function).....??? not sure please look into it a bit.... Link to comment
silent Posted June 15, 2016 Share Posted June 15, 2016 Hi Marinos, Please, check the modified kinect_01 sample in the attachment. It should work as expected. Thanks! kinect_01.cpp How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
marinos.giannoukakis Posted June 15, 2016 Author Share Posted June 15, 2016 Thank you Silent I will give it a try and let you know.....:D great work in fast responses......:D Link to comment
Recommended Posts