January 22, 2019, 01:06:56 AM

Author Topic: Easiest way to get animated mesh from Blender to MiniB3D?  (Read 867 times)

Offline nokkusuu

  • Jr. Member
  • **
  • Posts: 5
Easiest way to get animated mesh from Blender to MiniB3D?
« on: July 28, 2018, 07:25:24 AM »
What I'm trying to accomplish is use Blender for basically all my modelling work; I'd rather not animate meshes in other software as I'm used to Blender. Is there any way to bring an animated mesh from Blender to MiniB3D at all?

I've tried numerous methods, from importing into Fragmotion (animation didn't even load properly, tried a ton of different ways) to finding 3rd-party addons for Blender to export to the b3d format. None of these worked.

Any help or input is appreciated.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 314
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #1 on: July 29, 2018, 10:36:47 PM »
I suppose you've tried the B3D Export plugins by Gandaldf, Minetest or Joric. Gandaldf is the original author, the other ones are almost the same fork that is supposed to be slightly improved, I've not tested any of them. Joric also has an importer but no animations yet. Links here.

Offline nokkusuu

  • Jr. Member
  • **
  • Posts: 5
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #2 on: July 30, 2018, 07:03:15 AM »
I did use some version of Gandaldf's exporter; now that I mention it, I was probably using a version of Blender too new for the exporter. Did some digging around with this information and ended up finding what seems to be Minetest's version, which worked perfectly!

Thanks! ;D

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 314
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #3 on: July 30, 2018, 04:13:21 PM »
Ah great, glad you got it working.

Yes, Gandaldf says his exporter works with an older Blender version, he never updated it. The credits for the later versions say MTLZ made it compatible with 2.63, and I think it continued to work with 2.7x.

Offline Kippykip

  • Jr. Member
  • **
  • Posts: 74
    • Kippykip Forums!
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #4 on: October 18, 2018, 04:52:08 PM »
Ah great, glad you got it working.

Yes, Gandaldf says his exporter works with an older Blender version, he never updated it. The credits for the later versions say MTLZ made it compatible with 2.63, and I think it continued to work with 2.7x.

Hmm I found that animated models exported with .B3D blender addons with OpenB3D causes either:
*Polygons appear in front where they shouldn't - EDIT: Turns out to just be me using the Alpha flag on everything, oops...
*Animations either don't work at all, or cause an EXCEPTION_ACCESS_VIOLATION, or just have polygons glitch across the whole screen.
*Will crash on UpdateWorld when a different model is free'd/replaced with another TEntity

Although the blender exported models work just fine in fragMOTION and original Blitz3D EDIT: Nevermind, it's just as crash prone on Blitz3D aswell, sometimes it works, other times it crashes with EXCEPTIONACCESSVIOLATION.

It's especially weird how animations are handled though. Here's a clock model I made today, it has 3 bones in fragMOTION (which is odd as there's only one bone in the whole thing in blender)
Opening this model in Blitz3D works, but claims "There's no animation" when trying to animate it.
Opening it in OpenB3D has the UpdateWorld issue.

Strange, well this kinda sucks as I was hoping to make the switch to blender for my game.
Hopefully a better .B3D exporter comes out at somepoint.

Offline RemiD

  • Hero Member
  • *****
  • Posts: 800
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #5 on: October 18, 2018, 04:55:02 PM »
Fragmotion is a great modeling, rigging skining, uvmapping tool to use with Blitz3d, so most likely with Minib3d/openb3d too!
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline Kippykip

  • Jr. Member
  • **
  • Posts: 74
    • Kippykip Forums!
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #6 on: October 18, 2018, 06:22:20 PM »
Fragmotion is a great modeling, rigging skining, uvmapping tool to use with Blitz3d, so most likely with Minib3d/openb3d too!
Really? I've just been using it for converting .MS3D files between .B3D

EDIT: I have an update on the ordering issues, it also happens when exporting to .OBJ files on other software such as MilkShape 3D.... Hmmm
EDIT 2: I had transparency in my .PNG texture, and on top of that I had TextureFilter set to add an Alpha flag on everything, which is why I was having so much Z-Ordering issues.

Offline RemiD

  • Hero Member
  • *****
  • Posts: 800
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #7 on: October 18, 2018, 08:30:40 PM »
@Kippykip>>if you want to do a test of animation with a rigged skinned mesh (.b3d) you can download one here (with code example) : https://www.syntaxbomb.com/index.php/topic,4353.0.html
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline Kippykip

  • Jr. Member
  • **
  • Posts: 74
    • Kippykip Forums!
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #8 on: October 19, 2018, 05:29:27 PM »
Ah, I figured out what was causing all the weird see through effect with my clock model.
It was because I had a:
TextureFilter("", 1 + 2)
Which basically makes everything load with alpha flags. I needed to do this because the scythe weapon in my game would lose it's alpha the moment you looked at an Entity with EntityAlpha used on it.

Not looking at any EntityAlpha meshes/Transparent materials


Looking at EntityAlpha meshes/Transparent materials


Probably a bug, but the TextureFilter workaround to fix the scythe only works if you do:
MeshLoader("c++")
before any of the meshes load, you can also use "cpp", "c++", "lib", "library".

Adding the meshloader line also makes .3DS models load correctly. I eventually settled on adding this instead of making everything have an alpha flag:
TextureFilter("M#", 1 + 4)
TextureFilter("m#", 1 + 4)
TextureFilter("A#", 1 + 2)
TextureFilter("a#", 1 + 2)


So only the textures that have a "A#" at the beginning of the filename will load with those flags, that fixed my scythe. Although I had to re-export my scythe model to use the texture with the different filename.
Although this workaround doesn't work at all with the default MeshLoader("bmx"), where no matter what you do with the alpha flags, it will always remove the alpha on whatever is in view of a entity edited with EntityAlpha (or looking at a model with a transparent material).
Works fine with masked textures on both MeshLoader's though.

I think this alpha flag mess when a EntityAlpha/Transparent Material is in view must be a somewhat new bug dating a few months back. Because before there was even a MeshLoader function in the first place, the scythe worked just fine without having to mess with TextureFilter.

Also if you're wondering what was wrong with the clock when everything has an alpha flag:



There was another bug with this change when using MeshLoader("c++") and loading .3DS models, where textures that had pitch black pixels were masked:

Not sure if this bug is still in the latest version, it was only there once the MeshLoader function was added.
I ended up doing a workaround where I replaced all #000000 pixels with #000001 instead.

@markcwm
Probably should have let you know about this a few months earlier :-X

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 314
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #9 on: October 20, 2018, 02:25:51 AM »
Hi Kippykip,

unfortunately I am not well at the moment, I have sciatica which will take some weeks to recover from so I can't code very well as I can't concentrate with the pain.

I do intend to keep working on Openb3d but I have to admit I am not familiar with most modellers having spent most of my time coding, so in the case of model issues I would appreciate it if you could email me your models so I can bug test with them, that would be awesome help.

At the moment I have been adding the 1.25 shader changes and I've to get that done before anything else.

Offline RemiD

  • Hero Member
  • *****
  • Posts: 800
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #10 on: October 20, 2018, 07:16:29 AM »
@markcwm>>if you don't know about it, take a look at "inversion table", my father got better thanks to that... (relieve the pressure between vertebraes)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 314
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #11 on: October 20, 2018, 06:34:43 PM »
Thanks RemiD, I'll have a look but I'm using something called Gravity Life which is pretty good at relieving pain.

Offline Kippykip

  • Jr. Member
  • **
  • Posts: 74
    • Kippykip Forums!
Re: Easiest way to get animated mesh from Blender to MiniB3D?
« Reply #12 on: October 23, 2018, 12:36:48 PM »
Hi Kippykip,

unfortunately I am not well at the moment, I have sciatica which will take some weeks to recover from so I can't code very well as I can't concentrate with the pain.

I do intend to keep working on Openb3d but I have to admit I am not familiar with most modellers having spent most of my time coding, so in the case of model issues I would appreciate it if you could email me your models so I can bug test with them, that would be awesome help.

At the moment I have been adding the 1.25 shader changes and I've to get that done before anything else.
Really sorry to hear that man, hope you feel better soon. :( In the meantime I'll write an example and hopefully save you headaches for the future.