Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for importing and exporting .blend files #3529

Closed
fire opened this issue Nov 11, 2021 · 10 comments · Fixed by godotengine/godot#54886
Closed

Add support for importing and exporting .blend files #3529

fire opened this issue Nov 11, 2021 · 10 comments · Fixed by godotengine/godot#54886

Comments

@fire
Copy link
Member

fire commented Nov 11, 2021

Describe the project you are working on

3d multiplayer game.

Describe the problem or limitation you are having in your project

Currently it takes 3-5 steps to go from Blender to Godot.

  1. Open blender
  2. Work
  3. Save as gltf
  4. Place the gltf file in the Godot Engine project directory
  5. Press save button

The reverse of gltf exporting is true too.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This feature lets you drag or place .blend files in the project folder and it will import the files.

An editor setting sets the location of the blender binary. A empty setting means the feature is disabled.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  1. Add an editor setting to define the Blender path.
  2. Set the editor setting so the file system browser works
  3. Open the blend file via the command line without a py.
  4. Save the blend as a gltf in the .godot/imported folder
  5. Open in gltf importer

Symmetrical steps for saving as blend.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Was an addon until Reduz asked for me to port it.

Is there a reason why this should be core and not an add-on in the asset library?

Reduz thought blend i/o should be core instead of an addon.

@Calinou Calinou changed the title Add Blend Import / Export Add support for importing and exporting .blend files Nov 11, 2021
@Calinou
Copy link
Member

Calinou commented Nov 11, 2021

Is exporting .blend files from Godot really needed? Isn't the Blender glTF importer good enough for most use cases?

@fire
Copy link
Member Author

fire commented Nov 11, 2021

The goal of Blender import and export is to reduce the number of steps in the workflow. .blend import and export can all be done manually and is error prone.

Here's the reverse.

  1. Export as gltf from Godot Engine
  2. Open blender
  3. Open blender import dialog
  4. Find the gltf in the Godot Engine project folder
  5. Error prone settings managment on gltf import
  6. Press import

@mrjustaguy
Copy link

I think opening and saving .blend files in Godot actually makes a ton of sense if done right, as it is not totally uncommon for something to go wrong with Blender Exports, albeit much rarer these days, so having the option to open Blender's own files (sort of as a fallback) could help in such situations, instead of trying to figure out what went wrong and/or switching export file type in blender and hoping for the best.

@ngreve
Copy link

ngreve commented Jan 8, 2022

Being able to directly import a blend file and iteratively making Godot more compatible with Blender, would very likely be a massive advantage, compared to other game engines.

What I am looking for in particular, is a way to manipulate the geometry node inputs of a Blender model, from within Godot, to be able to use them for animations.

There is already an Unreal Engine Addon available, called AlterMesh, which provides such a feature. Gamefromscratch also talked about it.

EDIT: Today askNK also reviewed AlterMesh. Check it out to see the communities response. Unsurprisingly, it is received very positive.

@GeorgeS2019
Copy link

GeorgeS2019 commented Feb 4, 2022

@ngreve Please check this repos, perhaps it is relevant to what you have suggested.

image

@Zireael07
Copy link

This (awesome repo) is about modeling in editor, not about Blender import

@GeorgeS2019
Copy link

@Zireael07 Currently this discussion is more about .Blend import as GLTF.
Godot4 alpha 1 article discussed about Improved 3D Scene Importer

Godot 4 comes with a dedicated import dialog that allows you to preview and customize every part of the imported scene, its materials and physical properties. Scripts can still be used for additional tweaks,

It is here I see opportunity to improve the scope of .Blend import beyond current scope of GLTF and HOW project like ply may eventually evolve to contribute to that needed feature.

@Xartorx
Copy link

Xartorx commented Feb 4, 2022

It would be awesome to be able to import materials directly from .blend file bypassing GLTF format, because currently GLTF doesn't support some things (e.g. subsurface scatter or clearcoat).

@Calinou
Copy link
Member

Calinou commented Feb 4, 2022

It would be awesome to be able to import materials directly from .blend file bypassing GLTF format, because currently GLTF doesn't support some things (e.g. subsurface scatter or clearcoat).

I don't think this will ever be feasible, as .blend is not an interchange format. We also have no plans to use Assimp again (which can read .blend files directly, but as I said, it's ill-advised).

@fire
Copy link
Member Author

fire commented Feb 4, 2022

As someone who is writing a .blend importer for Godot Engine via blender executable. I also second that we will not be using ASSIMP for blender import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants