No simple way of creating 3d animations for PB ogre?

Advanced game related topics
rambodash
User
User
Posts: 21
Joined: Thu Jun 13, 2013 1:00 am

No simple way of creating 3d animations for PB ogre?

Post by rambodash »

I have discovered that its really hard to get a working mesh with animations into purebasic.

Delgine was nice and easy to use, but it won't export animations. I have tried piping delgine -> milkshape -> pb ogre, assimp, everything you can imagine but its not possible to export a working mesh with animations.

Blender is very complicated and isn't straightforward, takes too much effort to do the simplest of things!

CharacterFX is a little outdated, and my virus scanner does not allow me to use the FiX tool (probably because it was compiled with 32bit PB). It probably is a false positive but I am very serious about my computer security and cannot take risks, so I have to rule out the use of CharacteFX

In conclusion it just seems very difficult to get animations into an ogre mesh and have it work in PB. in this state its just not feaseible to work with to make a proper 3d game with PB, I think I'm just going to have to use another language + 3d library. If only you could do bone animation programmaticly through PB!
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: No simple way of creating 3d animations for PB ogre?

Post by Samuel »

rambodash wrote: I have discovered that its really hard to get a working mesh with animations into purebasic.
I've heard this complaint several times and the problem is OGRE uses a custom format for their meshes and animations.
If it wasn't for that then we could use some of the more popular formats.

The only solution I can see is to create a convertor for whatever format you use to an OGRE xml file. Then use the xml convertor to create the required mesh and skeleton files.
This is something I've thought of creating for a while now, but I haven't found the time, yet.
rambodash wrote: Blender is very complicated and isn't straightforward, takes too much effort to do the simplest of things!
This is another compliant I've heard often. I've heard they're rebuilding their gui and ui systems to make it more beginner friendly, but it has been I while since I've checked up on it. So I'm not sure if they're following through with it.
rambodash wrote: In conclusion it just seems very difficult to get animations into an ogre mesh and have it work in PB. in this state its just not feaseible to work with to make a proper 3d game with PB, I think I'm just going to have to use another language + 3d library. If only you could do bone animation programmaticly through PB!
I've worked with Purebasic's OGRE implementation off and on for about three years. I can say it was a very nice way to get started in 3D programing, but there are a few areas that turned me away from developing with it. Sadly, I've found myself using it less and less over the last year.

There could be some big welcome changes if the new and improved OGRE (when it's at a stable release) gets implemented into Purebasic, but it's a gamble (that any serious developer wouldn't take) waiting for something that may or may not fix certain limitations.
marc_256
Enthusiast
Enthusiast
Posts: 743
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: No simple way of creating 3d animations for PB ogre?

Post by marc_256 »

Hi,

Same problems here with my CAD/CAM program.
Everything went well till I needed to create and animate .mesh meshes.

So I spended a lot of time to find a solution for this,

The best working solutions:

1) I use BLENDER 2.66 (spended a few weeks to learn the basics of it) to create models.
export them via OGRE exporter to mesh .XML files. (mesh and textures data)

2) Use my own written converter to convert .XML files to ogre PB mesh data,
and stored these data in data section .pbi files (one per mesh).
What do I use, vertices, edges, faces and normals data.

3) Use this data to create OGRE meshes data inside PB programs.

4) So, I have only one PB->EXE program, all inside of it, and the engine3D file.

Worked very well for small programs,
But PB allow you only a limit of +-500 MB of data section ...
so I stopped developing with PB for now.

All the controls and animations I did in PB, and OGRE was only used to show the results.

I must say, the results are very good, by my opinion ... :wink:
also, the animations (for what I need) are very spectacular.

See here http://www.purebasic.fr/english/viewtop ... 27&t=59692

marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
rambodash
User
User
Posts: 21
Joined: Thu Jun 13, 2013 1:00 am

Re: No simple way of creating 3d animations for PB ogre?

Post by rambodash »

Hi everyone

After a lot of trouble shooting I was able to get a working skeleton into PB and use EnableManualEntityBoneControl to control the bones but no animation. At least you can still move the bones programmatically and manually program an animation in PB

What I did was:
Delgine -> Export as MS3D(plugin required) -> Use assimp tool to convert to mesh, skeleton, material

But there are still many problems. I dont know if this is normal or not but the first joint will be attached to the entire model and if you try to rotate the joint it will rotate the entire model. So the solution is to create an extra root joint which should be assigned to a static part of the model if you want to avoid the problem.
The light mapping also seems to not get converted properly, so it must be disabled with DisableEntityLighting(#entity, 0)

In the end I guess the only clean solution as marc_256 mentioned is to learn to use blender.

Its a pity there are so many shortcomings, because pb is the easiest solution I have found for programming 3d games. If it could get these problems fixed and add some popular effects like hdr and ambient occulsion it can be a popular tool to make games with
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: No simple way of creating 3d animations for PB ogre?

Post by J. Baker »

rambodash wrote:...and my virus scanner does not allow me to use the FiX tool (probably because it was compiled with 32bit PB). It probably is a false positive but I am very serious about my computer security and cannot take risks, so I have to rule out the use of CharacteFX.
I assure you it's a false positive. I created and compiled CharacterFiX myself. I don't have the source with me at the moment but if I come across it, I'll post it. That way you can compile it yourself. ;)

On a side note or should I say tip... Instead of using weights for 3D animations. Create child bones for areas in your animated model that you know will deform. That way you have more control on how to reposition them, instead of letting the "weights" do the work. You're animations will look much better. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
rambodash
User
User
Posts: 21
Joined: Thu Jun 13, 2013 1:00 am

Re: No simple way of creating 3d animations for PB ogre?

Post by rambodash »

J. Baker wrote: I assure you it's a false positive. I created and compiled CharacterFiX myself. I don't have the source with me at the moment but if I come across it, I'll post it. That way you can compile it yourself. ;)
It would be nice to have the source code :) , it would make things a lot safer, you never know if your server got hacked and the file might of gotten infected, seems to be pretty common these days, at least there should be an MD5 somewhere so people can make sure. Speaking of false positives this is also another problem with PB.. really i would like to use PB for my projects if possible, but these flaws keep me from using it.
rambodash
User
User
Posts: 21
Joined: Thu Jun 13, 2013 1:00 am

Re: No simple way of creating 3d animations for PB ogre?

Post by rambodash »

So i went ahead and used CharacterFX + Fix, and everything works well, It was a lot of work but now I have got animated models working in my game.
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: No simple way of creating 3d animations for PB ogre?

Post by J. Baker »

rambodash wrote:So i went ahead and used CharacterFX + Fix, and everything works well, It was a lot of work but now I have got animated models working in my game.
Glad to hear. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: No simple way of creating 3d animations for PB ogre?

Post by djes »

I did some animations with ogre, several years ago. I've used lightwave 3d and a custom plugin to convert weightmap and some skeletons. Badly I've not tested anymore. The plugin is not developed anymore but it still works (afaik) and we have the source and lw is well documented. Of course lightwave is not free !
rambodash
User
User
Posts: 21
Joined: Thu Jun 13, 2013 1:00 am

Re: No simple way of creating 3d animations for PB ogre?

Post by rambodash »

I took some time and learned to use Blender, it's actually not as bad as I thought, now I prefer to use it actually it even has a video editor. But the problem is animations won't export correctly (the animations will play but the bones are all distorted and now I have no clue whats wrong). It was already tough to find a working ogre exporter for the latest blender version, it was nowhere to be found on the ogre website, had to search in the forums for a third party plugin. I mean if they were going to make an engine you'd at least expect them to provide tools to help create animations or have support for more common file formats.

EDIT: I've gotten animations to work now in PB Ogre exporting with Blender, however the process is quite complicated!
I'm just going to leave the link to the working exporter here incase is wondering where it is: http://www.ogre3d.org/forums/viewtopic.php?f=8&t=45922
Post Reply