Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / bvh file loader example

Author
Message
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 30th Jun 2013 04:21 Edited at: 2nd Jul 2013 19:57
With this example it loads a bvh file and then shows the motion. Press L to load a bvh file.

Well this was harder than what I thought it was, I used quantilian, but made my own quantilian class did not use agks because it is not right. I can only load one bvh file it fails if I load more than one. Oh well I try to put this in my sprite engine. But in my sprite engine I will have a mfc dialog that helps the user assign parts of the body.

apparently I tried my exe on another machine it don't work so I don't know why. Then I tried it on another machine and it worked lol. I guess if it don't work for you then you are probably on a secure machine because I tried the exe file at school and those computers won't let you load things.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 30th Jun 2013 04:25 Edited at: 1st Jul 2013 22:29
here is a picture



Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Jul 2013 22:28 Edited at: 2nd Jul 2013 03:38
well I guess I make a quick exporter with this project the following download in this post opens a bvh file and it saves it as bvhexport.file
so look for it I provided my export exe code so making a import won't be too hard. It takes like a minute too load 2000 frames, but it saves bvh files a lot faster.



To explain the export the first write line is the number of frames, then it loops through all the children or the list of children. It converts all the data to x y z points, and rotations. I also fixed a bug of loading files. It can load another file but it replaces the old bvh file. I guess this is not an app but it is a tool that will probably be used for two-d and three-d games. If you this project to load bvh files and load them in your project, I would hope that you put my name in your project.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Jul 2013 00:27 Edited at: 2nd Jul 2013 04:40
Well I forgot put scaling in the project so i put a mfc dialog that helps the user scale the object. Oh the default scale is .4 so don't enter in a big scale because it will just not look good.


Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
haliop
User Banned
Posted: 7th Jul 2013 15:46
sorry about the languge

but..


F YEAH!
awesome.

3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 14th Jul 2013 14:59 Edited at: 14th Jul 2013 18:32
Thank you haliop I think this would be very use-full because I know agk is coming out with animation as well but they are using .x files. I see alot of potential problems with this format so I decided to make a bvh file importer. Which does not have some problems that .x has, and it seems more simple. If agk makes a impostor for .x I think that loading 2000 frames like I did will not be fast. This program converts the points to simple xyz cords and rotation cords for easy and simple movements. I don't think you need .x format any way.

This works for non-human bvh files as well. Of course I have not tested it yet for that, but the way I programed it, I think it would work for non-human bvh files.

Oh and the angles are off I will fix this soon.
I don't know why this is happening angle should be respect from one point to another theta x and theta z, but the points are correct.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 16th Jul 2013 18:45 Edited at: 16th Jul 2013 18:48
Ok i am going to post the code to this because I have the joint angles wrong and I used the look at command in agk and it does not work.
Maybe someone can see the error I am making in the angles.

bvh.h





I almost have it just the angles between the joints and if I have someone else look at it then maybe they can help fix it. I am also posting this because the cords are correct, and I think that animation needs to be in agk.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Login to post a reply

Server time is: 2024-04-14 15:51:36
Your offset time is: 2024-04-14 15:51:36