Download

Import / Export .blend (Blender) files with a plugin for UE4

Since looks like Blender just shutdown the development of the FBX plugin and they got problems with the FBX SDK license, why Epic games or the Blender group don’t make a plugin under MIT for example for UE4 or include the plugin with the engine ?

Pros:

  • Direct control from .blend scene.
  • Import of Static and Skeleton meshes.
  • Import of textures.
  • Import of material properties.
  • More import settings.
  • Control of the FBX SDK, since is begin used with UE4 already.
  • MIT licensed or included with the UE4 EULA, no problems with GPL.

The basic idea is read the .blend files in UE4 with a custom frame to select what import and what no and in engine make the conversion to FBX and then use as a normal FBX file.

Read the selected .blend file, then select the entities and read the prefix of the files to import properly each model (collisions, skeletons, etc) and then convert the selection to FBX.

Plugin should be MIT/Zlib/BSD or other of that licenses but no GPL or LGPL.

You can’t import .blend files. Blender devs already explained that you would need a large chunk of Blender’s code in order to make it possible, and due to license incompatibilities it’s not going to happen.

OpenGEX or IQM import plugins (yet to be created) are the only simple and feasible (but limited) way of getting stuff from Blender to UE4 without FBX.

Then as you said should be a bridge between Blender <-> UE4 the export of Blender meshes to other format as for example OpenGEX or USD or other of that and then turn to FBX ? you can add with that formats too direct support to UE4 but then need a double work.

From what I understand, when you import FBX, it gets converted into UE4’s internal format. So Blender > OpenGEX > FBX > UE4 doesn’t make sense. OpenGEX would be converted into UE4 internal format on import, just like FBX does. So Blender > OpenGEX > UE4 is how it should be. Ditching FBX altogether. And that’s what UE4 plugin would do - read OpenGEX and convert it into internal format. I might be wrong though.

Might as well make a standalone app that takes OpenGEX and converts it into FBX. This way the converter app can closed source and using FBX SDK.

Why not a GLTF Importer for Unreal?

Because there is no UE4 importer? (I couldn’t find one following your link) Because there is no working and tested Blender exporter? (the one that says “work in progress” could be forever in that state, know how Blender Foundation “cares” about game dev)

OpenGEX has working exporter for Blender, it’s a plain ascii format, and well documented. Still no importer for UE4.

IQM is exporter, has docs and also can export into binary IQM, which creates smaller file and exports faster as I recall.

Personally I don’t really care about the format as long as it works with both Blender and UE4 and is not an abandoned format (and has nice workflow and docs).

Alright understandable - I see where you are coming from :slight_smile:

//opinion
It is not exactly difficult to write mesh importer for unreal engine and then release it to public. So whoever is interested could try doing that by themselves. For most of the other purposes fbx importer should suffice.

Scimming through opengex specification, it really looks like those guys were trying to recreate json.

Sounds about right - open source adepts are guilty of that.

There is a pretty huge problem with openGEX. Being a text format means its very slow to parse AND really big compared to binary files. Ive compared filesizes with fbx and its nowhere even near.
Some quick math: For your floats, it uses the hex value ex(0x3F800000). Thats 10 digits thing wastes 10 char bytes assuming 1 byte ASCII encoding for each character. That means that for lower precision(you would probably use way more digits) you are using more than twice the space as floats are 4 bytes normally. So its 10 bytes on text against 4 bytes on binary, and binary doesnt need parsing as you can just memcpy it while text has to be parsed wich is slower.
That doesnt happen on GLTF, becouse GLTF is a hybrid format, it has the scene description in text, but the actual raw data like the vertex arrays is done in binary format, wich makes it quite cool in my opinion. But that format is meant for WebGL and im not very sure how well it works as a exchange format, it has stuff like opengl state on it.

Blender .blend would be awesome, but reading/writing .blend files is specially hard given that .blend has pretty much no documentation and you need blender source to see it. Honestly, i dont know why there isnt a proper binary standard exchange format that works like FBX but opensource.

For the purposes of data exchange file size and import speed doesn’t matter, as long as we aren’t talking about terabytes of data and hours to import it. Parsing 250+ Mb file doesn’t quite take long (few seconds). The only issue with floats is that in order to keep precision, they need to be stored as hex values and those are not human readable. Also, text files compress well, so compressed plalintext file will be comparable to fbx or smaller.

I wouldn’t touch OpenGEX, because it is reinventing json. It would be easier to just grab json and create some custom format based on it.

Again, the issue has always been with making an add-on for Blender that is maintainable, clean and satisfies BF. Sometimes when an add-on is popular, useful and cleanly written, BF will maintain it officially. There are only so many add-ons that qualify. Most of the Blender add-on that deal with IO are half-a$$ed and at one point they break due to Blender API changes and no one fixes them. That’s why OpenGEX could quality - it’s being maintained (last time I checked).

If someone can write JSON exporter, fine by me. Just get it done right and maintain it :slight_smile:

Who is gonna be funding that?

That’s pretty much the only reason why there’s no json blender exporter…

Kickstarter? I don’t know… First problem is to find UE4 developer with knowledge of the engine on C++ level, knowledge of Blender and Blender Python API and IO API, get him/her interested and see what the cost would be. Maybe it can go to Marketplace too, to offset initial cost of development. Once all that in place - might do Kickstarter or whatever platform is as feasible. Hell, maybe Epic can fund it.

A couple of days ago I tried something. I think a good format is Pixar USD, for many reasons. I can write the scrip in python in blender and a mate (c++ boss, knowing the engine) was able and like the idea to made the importer for UE4. Unfortunatelly, USD is closed to the public untill this summer. I send an email to pixar in order to become a partner and have acces to the material to start working on it, they seems to like the idea too, unfortunately and with their words, “we must decline” so, in my words “we must wait”.

Also I was thinking about using the .blend format or even create a specific format for import and export content only from blender to UE4 based on json or something similar, but as has been said here,the .blend format can cause incompatibilities with licenses (not sure, I have no idea how they do in unity) and create a new format, will require a lot of work, especially for maintenance.

I not like openGEX

.blend format doesn’t contain any vertices or faces or bones. It’s just a meta data that used by Blender to construct scenes. So you can’t just import Blender file, because there is nothing to import. You’d literally need chunks of Blender itself to be in the UE4 plugin, so that it could generate your scene from .blend file (that’s my understanding of what was explained a while back by Blender devs when someone was asking about importing .blend files). And that is the issue. If .blend file had vertices, bones, etc., there would be no issues or license incompatibilities.

I think it’s a bit of a misnomer to assume blender will stop supporting fbx. One person who worked on the .fbx exported was advocating for using his efforts elsewhere, but blender is open source, and already has decent fbx support so I don’t see that changing anytime soon.

Wait, where did this information come from?

Import/export chain for belnder–>UE4 is 2…4 weeks job, maybe a bit extra time on top of that if you want it to also fully/properly support skeletal animations and not just meshes. Maintenance after that is slightly different story, because developer would need to chase everchanging blender api.

The best bet would be to attempt to hire someone. There shoudl be at least 5 people on forums with sufficient skill to do that, that includes me. I also planned looking into the export plugin myself, but I’m not sure if I’ll get to that in foreseeable future due to the amount of stuff I need to do.

Currently FBX pipeline works fine, for static and skeletal models, with Blender 2.77. If Epic keeps current FBX importer in UE4 as-is, then no matter what happens, Blender > FBX > UE4 will work for the foreseeable future just fine.

Nope, there are scale problems, skeleton problems at import/export, scale problems with the bones and UE4 when edit is like don’t are scaled, no materials import… etc

Not sure where you see the part “works fine”