.b3d file wont load
Blitz3D Forums/Blitz3D Beginners Area/.b3d file wont load
| ||
Hello, I am trying to imort a 3d model with animations, but I run into a problem. I have the model as 3 different formats; .ms3d, .b3d, .3ds. When I try to import it into my program, only the .3ds file works ninja = LoadMesh("ninja.3ds") PositionEntity ninja,+0,2,0 PositionEntity ninja,0,-1,0 RotateEntity ninja, 270,180,0 When I try ninja = LoadMesh("ninja.b3d") PositionEntity ninja,+0,2,0 PositionEntity ninja,0,-1,0 RotateEntity ninja, 270,180,0 It says that the entity doesnt exist. I have all the files saved in the same folder, so the problem isn't that the program and files aren't saved into the same folder. It would be very appreciated if someone would help. Thank you |
| ||
http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimMesh&ref=3d_a-z |
| ||
Thanks for the link, but there is a problem still, when i checked the fiiles, the 3ds file doesn't have an animation to the model. The b3d and ms3d files do have animations to them |
| ||
You have to use "LoadAnimMesh()". NOT: "LoadMesh()". |
| ||
I did, but it still says the entity doesn't exist. When I say I checked the 3ds file, I mean on the 3d model viewer "Open 3d Model Viewer" that shows the animations on the files, and the 3ds file has no animations. ninja = LoadAnimMesh("ninja.b3d") PositionEntity ninja,+0,2,0 PositionEntity ninja,0,-1,0 RotateEntity ninja, 270,180,0 Even using the "LoadAnimMesh()" command, it doesn't work |
| ||
Try exporting it in another animation program. |
| ||
The problem was still there. Here is a link to download the project https://www.mediafire.com/?4vclbn2a25zv7zd |
| ||
You keep trying to use "Animate()" INSIDE the loop function... You should ONLY do that if you HAVE to specify the frame range. Anyways, try this: Main.bb: Load World.bb: Good luck with your project! Hope that helps! P.S. you might want to "pivot" (I'm assuming this is YOUR head), pivot YOUR head onto the ninja's head so it follows the head's rotations, positions, and scales. |
| ||
Thank you for the time to help me. I apologize though that the same error comes up, it keeps saying the entity "ninja" does not exist. I replaced both of the codes to match yours, but as I said, the error still comes up |
| ||
Try this: Load World.bb: You forgot to "Global" Ninja. |
| ||
Does it work for you when you run it? For some reason it still doesn't work when I run it. Again, thank you for helping me with this |
| ||
I reckon you're using an out-of-date version of Blitz3D. Have you got the latest update from Account>>Product Updates? Earlier versions of Blitz3D did not support .B3D format. |
| ||
What GFK said. You need to update your version of Blitz3D. Cuz' when I compile it, it works just fine. |
| ||
Thank you, I was using an outdated version. But could I possibly get help on how you were saying i should "pivot" the head so it follows the rotations and transitions on the animation? Thanks again for the help |
| ||
Use the "FindChild" function. Look up its definition. |
| ||
I have looked up "FindChild" and I dom't understand what you mean. |
| ||
http://www.blitzbasic.com/b3ddocs/command.php?name=FindChild&ref=3d_a-z |
| ||
I've read that, but i still don't seem to fully understand, I know I need to parent the head to the ninja's "skeleton". But as I said, I don't understand how. |
| ||
Find the "Head bone" & EntityParent the head onto the ninja head. |
| ||
So do I do Print FindChild(ninja,"head_bone") EntityParent(mesh,head_bone) Or what? I'm really sorry, I'm not familier with the "FindChild" command |
| ||
I'm not doing it ALL for you. Grab the name of bone that is the ninja's head, use find child to grab it, and parent the head onto the bone. |
| ||
Main.bb Load World.bb |
| ||
Thank you, sorry for the long reply, I've been away from my laptop |