Looking at model exports

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Looking at model exports

Post by wizard4 »

Good day everyone.

It's a good thing to want a finished game to show people. I've given myself a whole year to see where I am at when focusing on one game, one language, one engine - although last night was troubling. If I chose any engine available today, I would still run into trouble at some point. I vented in my diary last night and after some sleep browsed the forums for solutions.

It seems there are quite a few ways to get custom models into Irrlicht. I'm not the best planner/manager/most experienced in game development/seasoned dev with a dozen finished games, but I'd like to overcome this hurdle.

I've seen with my own eyes, all it takes is some perseverance. Maybe not instant answers, and completely doable.
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Re: Looking at model exports

Post by wizard4 »

I'm at home now. A good vent, a sleep on it, and looking at what's available.

I see in the SVN trunk has a B3DExport.py file. Also building the MeshConverter project could help.

It may seem "cool" for me to change/switch to another project, but I wouldn't get far if I bail out every time a "big" problem appears :(

I may also save myself hundreds of £££s by not needing Maya. My first attempt at solo game dev aimed towards Unity and Unreal. I thought Maya would fit nicely with them.
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Re: Looking at model exports

Post by wizard4 »

Downloaded Blender 2.59 and Python 2.6 and used the B3DExport.py script. It's sort of working.
In my program as well as MeshViewer the simple cube model doesn't animate.
I've tried both keyframes and also a bone. I haven't baked anything, just trying simple things that I remembered.
Once I loaded the cube (24 frames in Blender) I set these functions up:

Code: Select all

blitz_mesh_node->setPosition(irr::core::vector3df(0.f, 50.f, 0.f));
blitz_mesh_node->setScale(irr::core::vector3df(100.f, 100.f, 100.f));
blitz_mesh_node->setAnimationSpeed(5.f);
blitz_mesh_node->setFrameLoop(0, 24);
I'll keep searching the forums.

I see this dialog in the console:

Code: Select all

-read ChunkNODE: Cube
--read ChunkMESH
---ChunkVRTS
---ChunkTRIS
--read ChunkANIM
FPS: 60.000000
--read ChunkNODE: Bone
---read ChunkBONE
---read ChunkKEYS
Skinned Mesh - finalize
Loaded mesh: media/my_b3d_bone.b3d
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Re: Looking at model exports

Post by wizard4 »

And also the directx .x file export is the same in MeshViewer. Both files load the mesh but no animation is being played.
CuteAlien
Admin
Posts: 9810
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Looking at model exports

Post by CuteAlien »

Noiecity recently made a tutorial video about that, maybe it helps? viewtopic.php?p=307310
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
n00bc0de
Posts: 82
Joined: Tue Oct 04, 2022 1:21 am

Re: Looking at model exports

Post by n00bc0de »

I would also like to mention that you can use other software besides blender for animation.

Here is a list of software that easily exports animation to irrlicht:
  • Milkshape 3D
  • Misfit 3D
  • Maverick Model 3D
  • Truespace* - This is not worth the trouble but if you want to try it, do not download it from its own website. Look for another website that host it.
I also wrote a library that imports skeletal animation from anim8or as skinned meshes. I am planning on improving it but it works just fine if you just want to import your model with skeletal animation (which is currently all I use it for). viewtopic.php?t=52934

Blender does support the ability to export each frame of an animation as *.obj. You can easily create an animated mesh in irrlicht from this.

There is also a gltf importer I came across in a fork of irrlicht. I haven't tried this out myself but it may be worth looking into. https://github.com/jordan4ibanez/irrlic ... s-animated
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Re: Looking at model exports

Post by wizard4 »

Thank you. I have a little urge to pay for Milkshape. It'd be a little nostalgia from my younger days making models for Half-Life.

I also found Asset Importer (assimp) searching forums (may help)
viewtopic.php?t=50751

Blender plugin/SuperTuxCart (CuteAlien's link above helped) and I found version 2.59 worked okay for me

This for X files. I'm not sure if .x can animate in Irrlicht or not. The feature pages says .x is animated.
viewtopic.php?t=52229

p.s. I didn't join the vertices to the bone while parenting which stopped the animation playing properly.
CuteAlien
Admin
Posts: 9810
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Looking at model exports

Post by CuteAlien »

X can animate (there is an animated dwarf.x model in Irrlicht media), but there's hardly any support for that format out there anymore. I have unfortunately no examples for non-working animated .x models, so not sure what problem there was with the one there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
wizard4
Posts: 162
Joined: Thu Jan 25, 2024 6:54 pm
Location: UK

Re: Looking at model exports

Post by wizard4 »

Well I searched for a day and a bit. That's all I could manage. I did see my problem with switching ideas while working on this. As I looked for programs to export, lots of different Irrlicht forks and new names popped up. I was stuck trying to find one called Avalanche(?) that I saw a reference to.

Wine was okay. I think I needed a reboot to get my menu up on the desktop. It could load FragMotion and Anim8or, but Milkshape missed a DLL and I'm not downloading a random system file off a "site", and this made me think... If you have a way to create something, surely you use that way because it works? Why spend days of frustration getting something to work that you hardly know when you already have a preferred method? The Quake qbsp and Radient editor was my problem, so I said to use what works over a new thing.

Misfit has transformed into Maverick. The logo is the same and Maverick is an updated version. SuperTuxCart looked specialised for levels and carts, so as I said above, I dropped that fairly quickly. Assimp looked so confusing. I think it's a bigger library with more documentation, so again, needs special treatment so I didn't look far into it.

Blender 4.0 works on my laptop funnily enough. Although it can only export fbx and _maybe_ glft, but I was out of time. There's also a binary version glb which confused me. I did see the possibility of exporting EGG files that Panda3D uses through an add on.

Irrlicht surprisingly imports older model formats, like MD2 and X and I can see why people are creating their own exporters (n00bcode has worked on Anim8or, and I can appreciate he is a clever man!)

I think FragMotion might be able to animated imported meshes - ran out of time though.

I wanted to at least upload a video of a map with rotating meshes to show you, but that was the idea at the start, and little did I know ideas don't equal what you get.

And that's about it. About 1 day of searching. I'll most likely use Maverick for level models and figure out Anim8or. The B3D.py script was chucked around the net and patched and left alone, so I don't think it's stable.
CuteAlien
Admin
Posts: 9810
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Looking at model exports

Post by CuteAlien »

Sorry, animated pipeline is a mess as there's no developers right now which really care about it. I only work with static models in my current projects, so I only look at it when people report problems (and even that may take months if it catches me at a bad time as can be seen by an open animation interpolation bug which got reported quite a while ago).

If I had to get an animated model working right now, what I would do is likely try to get b3d 2.49 exporter working with newest Blender. It's written in pretty simple Python and then my hope would be that the export api in Blender hasn't changed too radical. And b3d is the simplest animation format to work with which I know about. Even some static formats are more complicated to handle than that one ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply