Animated .b3d with collisions demo
BlitzMax Forums/MiniB3D Module/Animated .b3d with collisions demo
| ||
Hi, here is a small demo i made to test out minib3d version 0.4. I have included minib3d 0.4 in the zip file. feel free to use the included media files (the .b3d, ogg and textures were all created by me) without restriction. use WASD to move the robot around and arrow keys to adjust the camera. http://www.bmaxbook.com/RobotAnimtest.zip ![]() edit: fixed Octree command per simonh's comment |
| ||
Love the graffiti :) Your octree settings are a little excessive for the size of the mesh used. Use values of 0,3 for a big speed increase. |
| ||
very nice :) this demo had shown me a bug with my extended Version which could now be fixed. I have forgotten to change the the b3d loader to load the brushes in a different way to support the shader brush. |
| ||
thanks. fixed the Octree and uploaded new zip (huge speed boost on my PC!). also made flip = 0 so FPS can be measured. some notes: while i was making this demo I came across a few things. I won't call them bugs because I realize that you have not finalized the anim commands so please ignore this if it sounds redundant. 1. animate(mesh) speed is taking an int (needs to be a float) 2. animtime is not wrapping on the negative side. if you un-rem the text commands and 'walk' backwards you will see this in action. 3. I was trying to play an ogg when the animtime=floorstrike but i haven't been able to get my head around the sound commands (channel?/sound?/blah) but a made a AAA .ogg sound effect in audacity :) (that is me banging on my PC desk with a stapler) 4. The Robot is 1738 polys (876 verts) with 30 frames of animation. It is textured with a single 256x256 .jpg (i kept all of the images at 256x256 to make sure this works on older vidcards) 5. the level is just a single mesh with 2 surfaces(brick & floor) + a light map ( i drew the graffiti on the lightmap). overall, minib3D has been rock-solid during all of this. no crashes and no problems. very impressive! you guys are doing a fantastic job on this and I am very grateful. |
| ||
Great demo! For the sound insert Local mySound:TSound = LoadSound ("media/clank.ogg") Local channel:TChannel =PlaySound (mySound) but I wouldn't know how to determine when the foot touches the ground? |
| ||
Thanks Dirk. It was easy to figure out when the foot touches the ground (if you unrem the 'text' lines at the bottom of the code and watch the frames you can see the foot strikes) my problem was playing the sound once per strike and 'not playing' if the foot rests on that frame. i did not want to mess with that too much because I am working on transitioning to an idle pose when the figure stops. anyway. good info! |
| ||
oh, I see. Then it's something like this: before the mainloop: Local mySound:TSound = LoadSound ("media/clank.ogg") Local oldclongstate:Int = 0 Local clongstate:Int = 0 before the Flip: clongstate = Int(AnimTime(robot)/14) If oldclongstate <> clongstate Local channel:TChannel =PlaySound (mySound) oldclongstate = clongstate EndIf |
| ||
very nice! I will play with this and update the demo (after dinner & a movie :) ) |
| ||
btw - what application did you use to create this great scenery? I esp. saw that the grafitti is drawn into the lightmap, cool idea! |
| ||
funny thing is that it took WAY longer to create the Robot (bones, animations, etc) but the scenery took about 20 mins. I used Maplet, 3ds, Ultimate Unwrap and pshop, although I probably could have done the whole thing in Maplet and just have been done with it. I have updated the demo with a smooth 3rd person camera (requested in another thread) but here is the code so you don't have to download the whole zip file if you already have it. |
| ||
. |