Exporting from Blender: A Quick-Reference

This thread, and in particular this first post, is intended to act as a quick-reference for those seeking to export models from Blender.

Note that it is not intended as a tutorial–only a guide to some of the options available for exportation, and some of the considerations incurred by each. Further, I personally am not familiar with all options here at time of writing, and so there may be some errors in the below. Please do correct me as called for!

Full instructions, guides, or tutorials may be available elsewhere–search around! See also the manual, such as this page.

With all that said, the list!

All Versions:

Blender 2.8 and Up:

Blender 2.79 and Below (to 2.5):

6 Likes

I’ve been seeing a fair bit of confusion over the options available for exporting models from Blender. While at least some of this is covered in the manual, I thought that it might be helpful to have a “quick start guide” available here, in the forums, too.

If I’ve left out any options, or omitted any important information, or been mistaken in what I have included, please do correct me!

Furthermore, if new options become available, or old options fall away, please do poke me to edit the list.

Thanks for the reference! It is highly appreciated!

Although, what do you mean by this? If it works for the developer’s models, why can’t it work for any model?

1 Like

It’s my pleasure, and I’m glad, respectively! :slight_smile:

I don’t know the specifics offhand, I’m afraid. My impression–which may well be incorrect–is that they’ve implemented it according to their specifications, which might mean that certain features have been excluded, or work in a non-standard way, or or only produce correct output within certain limited ranges of inputs–or something else again.

You’d have to ask someone more-knowledgable about PRPEE specifically for a better answer, however, I’m afraid!

For a minor example from my own copy of YABEE, I’ve modified it to output model vertex colours with an alpha channel drawn from the second layer of Blender vertex colours. (As Blender doesn’t support alpha channels in its vertex colours.)

This is all well and good for my own work, but if someone else were to use it they might (reasonably) expect that a second layer of Blender vertex colours would be exported as a second layer of model vertex colours, and be confused when such a second layer appeared to not be exported.

(Of course, YABEE doesn’t by default export more than one layer of vertex colours, as I recall, so it’s not a perfect example. However, it hopefully illustrates one way in which one developer’s specific handling of a matter of exporting might cause problems for other developers.)

This is great @Thaumaturge . As always your tutorials are super helpful.

I just starting experimenting with Panda3d’s pipeline for the first time. To start I ran blend2bam on an assortment of .blend characters. Passing params for animations, etc. In all cases I don’t get a texture in pview, and in most cases I just get the model in ‘t pose’.

Pview does work for viewing animations in ie. Roaming Ralph - but no luck on my own media.

Just from a high level - is there a tutorial someplace that gives tips on troubleshooting the export process? I could go in and start to tweak things in Blender to see what works - but hoping maybe there is a documented process someplace?

Thanks!

Thank you! I’m glad that you find them helpful! :slight_smile:

Hmm… I’m not as familiar with “blend2bam” as I am YABEE, I’m afraid–including the questions of its documentation.

I do see that the “blend2bam” GitHub repository has some documentation–if you haven’t done so already, it might be worth looking there.

Otherwise, the best thing to do is perhaps to ping its author: @Moguri

I’ll dig a bit there, thank you.

Is the reason you use YABEE that it’s just more stable overall? And you purposely run older versions of Blender to work with it correct? Is it actively maintained anymore? Just curious. thanks.

He uses YABEE as he is using an older version of Blender
Newer versions require blend2bam

EDIT: YABEE Doesn’t work properly on newer blender versions.
EDIT2: PRPEE might be another option, but blend2bam is recommended.

1 Like

Not a problem. :slight_smile:

It’s essentially because I’ve been using YABEE since before blend2bam became the recommended exporter. (I honestly don’t recall whether blend2bam was at all available when I started using YABEE.)

As a result, for one thing I’m more familiar with YABEE. But perhaps more saliently, my main project’s pipeline is centred around YABEE–in particular a version that I’ve modified slightly. Switching now would mean a major upheaval to that pipeline.

Exactly. Because…

As far as I’m aware, no, I’m afraid.

This is, I imagine, the reason that YABEE doesn’t work on newer versions of Blender: those newer versions introduced changes that broke YABEE, and there wasn’t someone willing to update it.

(Aside from the developer of PRPEE, but that has other issues to my understanding, as noted above.)

Update, and the 2nd option on the list worked - gltf export from Blender and the gltf-viewer!

It was insanely easy 1) export from Blender 2) test with gltf-viewer ./mymesh.gltf 3) You can preview the animation and mesh in a window.

The character also had a diffuse and bump map, so I’m surprised it worked so easily.

2 Likes

A quick bump to note that I’ve edited the original post.

Specifically, I’ve changed the given recommended pipeline from “blend2bam” to “glTF”, and added a few more points on those two options, I believe.

blend2bam makes use of Blender’s gltf exporter and panda3d-gltf. However, it does a few extra things like picking ideal settings for the glTF exporter. This is why it’s generally recommended over doing the glTF export manually. I consider blend2bam to be mature, and I have been using it successfully in game jams. However, I understand that there are corners missing, and I encourage people to file issues on GitHub.

1 Like

Hmm, I see.

To clarify, some of these changes in my first post above came about due to discussion in this thread:

That said, and as I mentioned in that thread, my understanding is that blend2bam exports an entire scene; as far as I’ve gathered, there’s no way to export just a specific object or set of objects.

Beyond that, there was a recent example and discussion of there being difficulty in exporting an animated object that consists of multiple meshes. This seems to work when using the gltf exporter alone.

And finally, I’m a little dubious of recommending that new users work with a command-line-only tool–such tools, I feel, can be a little more confusing than GUI-based tools for users not already familiar with command-line work. (And less straightforward even for those who are.)

I do hear you on the picking of ideal settings. Could you elaborate on what it does here, please?

All that said, I do want more discussion on this matter! There’s a lot that I don’t yet know on this matter, I feel, and I’m currently going by the input of only a few people, I fear!

The settings that blend2bam sets are here. Some of the key ones are disabling Y-up exporting (to avoid potential axis-conversion errors on export and import) and sampling animations. Exporting tangents is nice for normal maps in simplepbr. blend2bam also supports exporting physics shapes since it can inject extra data in to the glTF data that the exporter emits.

As for not being able to select objects, I can see how that would mess up some workflows. I have not run into that myself yet, but that does not mean it is not a valid workflow. I will give it some thought.

On ease of use for new users, I recommend they also look at pman which will automatically convert assets for use in Panda3D applications when running the application. Also, Panda3D is already pretty command-line focused with all of it’s tools (e.g., pstats, all of the x2bam tools, running Python applications, etc.). As such, I find adding another CLI tool into the mix does not really disrupt things.

Also, thanks for your discussion on this matter. It’s great to get some more feedback and figure out how to make these tools work for more people!

Ah, thank you! :slight_smile:

Those do indeed look useful!

Thinking of simplepbr, and as somewhat of a side-question, is there an option to use a non-PBR pipeline? Just old-fashioned materials?

(I don’t use PBR, and am dubious of its artistic universality.)

Indeed.

For one thing, I know that I’ve found it rather useful–especially when I’ve had a fair few assets–to keep related assets in a single Blender-file.

And for another, I think that I’ve found that it can be handy at times to be able to export only part of a level. For two examples, one may want to test specific elements, to split up larger levels into multiple sections for quicker loading.

By the way, if I may add a “wishlist item”–something that YABEE didn’t have–I’d like to have the ability to nominate specific Blender-actions to export. That would make it rather easier to have multiple Actors in a single Blender-file, I do think!

The thing is, most of those command-line tools can be accessed in non-command-line ways, or are rarely used.

For example, Python can be run at a button-press when using an IDE (and I would recommend that new users employ an IDE). Similarly, YABEE at least had the option to automatically run PView on export.

And if we’re using a specific exporter, then the “x2bam” tools needn’t be employed. (I’m not sure that I’ve ever run them manually.)

As to PStats, it’s a single-word command, with no options to complicate matters.

Thus I don’t think that a new user need deal with all that much command-line usage in Panda.

Interesting–I don’t think that I was aware of this tool. Thank you for the link! :slight_smile:

Honestly, thank you in turn! It’s great to have more input and discussion of this–and especially from someone working directly on one of the exporters!