How to prepare free 3D assets to importing?

I tried to search 3D assets. I load .blend file in Blender, export it with babylonjs plugin, but I can’t open it correctly in BabylonJS Editor. Usually it appears without textures and animations or completely invisible.

Typical example: HK416 with animation Free 3D Model - .blend - Free3D

Unfortunately, I completely new in 3D tools like Blender. So, most likely I just miss some important steps. Can anyone provide step-by-step instructions how to prepare external textured and animated 3D objects to import.

This topic could be worth a read Struggling with importing animations from Blender into BJS

A search of this forum for any of blender, blender textures, blender animations might also bear more fruit.

I would recommend to start with simple examples. Here are some good assets:

This folder contains several scenes, where each of them a glTF 2.0 feature is introduced.
Because of their simplicity, they are also a reference on how to implement a glTF 2.0 material in Blender.

Hi everyone,

Unfortunately, provided advices didn’t help much. Some glTF-Blender-Exporter examples even failed to export. And it doesn’t explain all I need. With such simple examples without animation I hadn’t problems even on my own. I even mentioned about it here: How to attach physics to imported mesh?

What I really want to know is how to integrate blender models downloaded from free sites into Babylon projects. Especially interested in weapons for FPS games for now. Particularly texturing, firing and reloading animations are expected in those models. But Blender allows everything of it in different ways. Meshes might be animated in Object Mode or Posing Mode, might be integrated into .blender file or exist as separate files. Also there is a lot of options for textures. All of downloaded models didn’t work correctly right from the box. I tried to export it as .babylon, .gltf and .obj. Everything had different problems. Which format is preferable by the way?

I will be very grateful if someone will share a video with creating, texturing and animating of weapon and following exporting and importing of it into Babylon. Or at least a process of adaptation of 3rd party weapon model for Babylon. Or at very least if someone will share animated and textured weapon models for .blender that will work with Babylon (with 100% confidence). Blender 2.80 is preferable.

I understand that probably I am asking too much. I am not very familiar with Blender. Of course I’ve watched basic tutorial, but it doesn’t cover the whole process. It’s only about Blender itself. And I need particular practical examples specially for Babylon. I am a programmer, not an artist. I just need some working assets to train Babylon coding skills.

Thank you in advance.


@splash27 : I took a look in Blender 2.76 at the file in the link you posted above. Loads into Blender fine. Then I exported it to .babylon and tried to open it in the sandbox. I got this error message 6X :

BJS - [14:50:40]: Invalid magic number in DDS header.

I have no idea what that means - maybe @Deltakosh or one of the other Microsoft folks can tell us.

It turns out that there are 20 DDS textures exported and 2 of them are 10+MB in size and 2 are 5+MB in size. That is quite a load, but I have no idea which are the six that produce that produce those 6 errors.

The geometry looks OK but 75 bones is a lot of bones.

Given the issues with the textures, I just opened the exported the file from Blender with the Babylon Exporter and then opened the . babylon file in the sandbox - just by itself - no textures. See image below.

It loads with lots of checker textures substituted for the missing textures. With the panels open, I then went Select Skeletons->Metarig (A), then in the right panel select Animation Ranges->Click on an animation (B).

The animations play fine. So the issue seems to be with those DDS textures.

From the download site, I see some comments that it was ripped from a game - probably explains all those DDS textures. You could export them all from the Blender file as .png files. Then delete all the DDS files from the Blender file and replace them with those png files and try again. A lot of work I know.

There is also a TGA file. No idea if BJS can use those.

I’m not around a lot at the moment due to family medical problems

cheers, gryff :slight_smile:

1 Like

By my experience about 50% of free 3D models lack something or have some flaws in them (that is why they are free, sometimes). So, if you are unfamiliar to Blender, sometimes it is wiser to spend a bit and buy 100% working model than spend several days trying to repair a broken one.

Thanks a lot I will try to play around it also. But please share your progress if you’ll try to continue to dig into it later. Wishing well to your family.

It is acceptable in general, but how can I be sure that bought model will work fine in Babylon?
First I need to understand the whole process and repairing of broken model might be very good for training purposes. But for now I don’t know how to do this, that’s why I started this topic. :slightly_smiling_face:

1 Like

Hello there, I have run into the same problem. Actually I have not yet found even ONE free animated 3D model that would work out of the box. Only modelst that are used in BJS examples does work offcourse. This fact prvents me from buying paid models because I am afraid that they won´t work either :frowning: Usually no textures appears and animations do not work. As I am developer and not 3D modeller, this is sadly show stopper for me :-/ I could somehow edit these models in Blender, but I dont know where to start - it is everything as you said - many ways to have things done while some way work and other does not.

If someone can find simple tutorial how to implement texture and simple animation in blender that WILL work once imported into BJS - that would be massive :))

nod. i guess around 10% of our Q&A posts… involve SOME problem with a model-import… in a myriad of different ways. Sometimes I think we need a stand-alone “Model Massager” … it attempts to make ANY model… BJS-ready, and if it can’t, it explains why.

Model-massaging should be one of our highest priorities, but it’s not. The model-massager should probably be part of the BJS Sandbox.

It’s easy for me to TALK ABOUT model-converting and model-massaging, but to actually build it/them… is probably a miserable task. Still, bad model-importing REALLY hurts BJS reputation… so the quicker/better we can make that happen, the quicker/better BJS reputation… skyrockets.

Thanks for the topic, Splash. Even though it hurts, it’s still the truth. It isn’t really anyone’s “fault”… it’s just that there’s lots of model formats happening, and we haven’t found/built great tools to deal with that, yet.

I suppose that 90% model-import questions are about Blender, other DCC tools have much less problems. Also, most of the solutions of these questions should be implemented in Blender before exporting to Babylon… so they are more Blender-side questions…
Anyway I suppose we need a kind of separate tutorial for Blender users with a lot of screenshots and 2 main topics (at least):

  1. How to correctly export static 3D model with all textures.
  2. How to correctly export animated/rigged 3D model with all textures and animations.
  3. How to understand that model which you’ve downloaded is bad or broken and don’t waste time trying to work with it :slight_smile:
1 Like

Plenty of SketchUp and SketchFab questions, as well. Unity, Maya, 3dsMax, others, too.

(Some-) People want plug’n’play models to populate their scenes. They want to drive “this” and fly “that” and throw “the other”. These people are not modellers, they are scene-layout and game-logic folk. They want physics and collisions possible on everything they import, and they often want to change the colors and textures… in-scene (without even SEEING the inside of a modeller program).

They HATE root nodes. :smiley: They don’t want to drill-into the hierachy of the model or its subMesh… in the inspector. They JUST want it to work, and be properly lit/shadow-casting, and have ONE gizmo/parent to position/rotate/scale. They want it easy, and it’s easy to understand why.

Math/BJS-built models are cool, too - no import needed… just a code paste. All too rare.

Plug’n’play game/sim-making… I want it myself. Learning a modeller package… WHILE learning BabylonJS and geometry and all their terms… makes the game-making task just “too much”. Advanced modelling comes later… after the mock-up and proof-of-concept is tested. If the user’s dream/vision… is too big for mock-up performance, then there’s no reason to spend a half-year learning to drive a modeller and making dream-specific models. That’s my take. :slight_smile:

I suppose the best solution would be to create DCC modeller on the basis of Babylon engine. Since Babylon goes Native soon there could be online and offline versions. I hope we shall see Babylon modeller in not very distant future…

Why not a “convert ANYTHING to BJS-plug’n’play” stand-alone program? Making a modeller is a massive task… me suspects.

Back in the old days, we had a “make a .babylon file from other formats” thing… if I rem right. Long ago… probably outdated and recycled by now. :slight_smile:

Does anyone want to venture a guess… of how many stand-alone 3D model formats… exist across the planet, at this time? Let’s hear it. :slight_smile: Don’t forget JSON, Collada, Renderman, Lightwave, and X3d. (vacuum tube model formats) heh

If we speak about exchange formats - their number is very small.
Below is the list of supported 3D File Formats from Sketchfab
Only FOUR formats (marked bold) are recommended…

  • 3DC point cloud (.3dc, .asc)
  • 3DS (.3ds)
  • ac3d (.ac)
  • Alembic (.abc)
  • Alias Wavefront (.obj)
  • Biovision Hierarchy (.bvh)
  • Blender (.blend)
  • Carbon Graphics Inc (.geo)
  • Collada (.dae, .zae)
  • Design Web Format (.dwf)*
  • Designer Workbench (.dw)
  • DirectX (.x)
  • Drawing eXchange Format (.dxf)*
  • Autodesk Filmbox, FBX (.fbx)
  • GDAL vector format (.ogr)
  • Generic Tagged Arrays (.gta)
  • GL Transmission Format (.gltf, .glb)
  • Initial Graphics Exchange Specification, IGES (.igs, .iges)
  • Kerbal Space Program (.mu, .craft)
  • Google Earth, Keyhole Markup Language (.kmz)
  • LIDAR point clouds (.las)
  • Lightwave (.lwo, .lws)
  • MagicaVoxel (.vox)
  • Mimesys Q3D (.q3d)
  • Minecraft (.mc2obj, .dat)
  • Open Flight (.flt)
  • Open Inventor (.iv)
  • OpenSceneGraph (.osg, .osgt, .osgb, .osgterrain, .osgtgz, .osgx, .ive)
  • Polygon File Format (.ply)
  • Quake (.bsp)
  • Quake / Valve source engine (.md2, .mdl)
  • Shape (.shp)
  • Stereolithography, Standard Tessellation Language (.stl, .sta)*
  • Terrapage format database (.txp)
  • Valve source engine (.vpk)
  • Virtual Reality Modeling Language, VRML (.wrl, .wrz)
1 Like

Nice list, L! THANKS! Well done.

“Kerbal” hahaha… I’d love their models… being easy-BJS-able.

Mizewell bring-in the Kerbal body models/armatures/anims themselves, too. FUN! I suppose that copyright thing would get in the way, somehow.

1 Like

@splash27 : Well, I had a couple of hours yesterday to poke around with your file. I created all the texture files as .png (both the .dds and .tga) files. Then replaced them all as textures in the Blender file. (I removed those textures that were assigned as normal textures - just left them blank.) Image 1 shows the result.

I also tested out the animations - the “add silencer” is weird. From the starting camera position the silencer is invisible - you see just an empty hand. If you move the camera to a side view - then it works fine :thinking: No idea what is going on but see Image2 below

Anyway here is a zip file contains the exported .babylon file and all the new textures (no normal textures). Try it yourself in the sandbox - select the metarig skeleton and play the anims as I said above.

There is also a .log file included from the .babylon export. It shows 20 + warnings most of which are the lack of normal textures. A couple refer to the geometry - vertices with no faces and bone influence exceeding the standard. Let me know if you would like the .blender file - I can zip that up too.

No feedback from the Microsoft guys about what those .dds errors I mentioned above are … :frowning:

cheers, gryff :slight_smile:




Thanks a lot, @gryff!

Could you also share edited .blend file?

I will try to integrate it into my code later.

Some other thoughts. For weapons alongside with first person view we also typically need to add pickable instances. I mean rifles just laying on the floor that we can grab. I suppose that in real life artists create separate low polygon models for this purpose, without any animations included (because it’s not needed). Just wondering if it’s possible to do this from the same loaded file in Babylon? We can, for example, clone every mesh of the rifle (except hands) and merge them to simplify positioning and scaling of the whole rifle. Then we can clone this merged rifle as much times as we need (I think it will be even better to create instances here instead of cloning).

However there are some things that worries me here:

  1. I am not sure that merging of meshes will work correctly here for such complex structure. But instead we can parent all child components to invisible box, for example.
  2. I want to be sure that cloned components will forget everything about metarig and animations (to save memory). And playback of rifle’s animations in hands will not touch these cloned instances.

Just thoughts. I will try it later and will respond here. But please share your thoughts about this if you know something. :slightly_smiling_face:

@splash27 : Ok, here is the .blend file :slight_smile:

A couple of comments about it :

  1. I tried to pack all the textures for you - so you should not need to go looking for them.
  2. When you export the file to .babylon make sure the “add silencer” animation is showing in Dopesheet panel .
  3. When you load it you should now see all the bones . You don’t need all of them. Take a look at this video about creating this type of rig :

FPS Created in Blender

At about 7 minutes in, he deletes all these extra bones.

  1. There are other bones in the gun eg. “bullet”. I checked the animations and it does not seem to do anything. Is it needed? You might want to check all those bones in the gun - are they needed?

  2. If you examine the meshes in the Edit Mode, you will find that you can “remove doubles” but it screws up the animations. You might want to consider creating your meshes and rig as described in the above video. (A quick test let me remove 5K+ vets)

  3. If you are looking for pre-modeled low poly guns, this link might help : Ultimate Gun Pack by 7 MB. They are free to download - but make a donation if you can. All kinds of weapons.

  4. The exporter will throw errors due to the lack of Nornal textures. You can either add those normal textures in a .png format, or go through the all the materials and delete references to normal textures.

Hope that helps.

cheers, gryff :slight_smile:

Thank you a lot. I was trying to integrate it into my engine and it works. :slightly_smiling_face:

However I tried to edit your .blend file. Removed unnecessary bones and animations (that I don’t need). I also removed all channels in all animations that was related to removed bones. And also added one new necessary for me animation (hide_unsil, just reversed version of draw_unsil actually).
Now I can’t export it correctly:

Hands are disappeared and there is no references to textures for some reason. What may I do wrong?
There are .blend, .babylon and .log inside.!Ar9xb-_eK-ligYcEhU5IZ8wPe_BYcQ