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

Move gltf to core. #52501

Closed
wants to merge 3 commits into from
Closed

Move gltf to core. #52501

wants to merge 3 commits into from

Conversation

fire
Copy link
Member

@fire fire commented Sep 8, 2021

See godot-extended-libraries/godot-fire#3.

From reduz:

We got quite a lot of demand to make the GLTF importer part of core, given it is needed for VR and other stuff, so I have the feeling we should optimize it for performance (which we should do anyway) and have an option to load actual meshes instead of EditorImporterMesh.. so that means we would need to provide a function to parse the mesh node into a scene node and the editor supplies, otherwise it uses Mesh as a default

General design:

var gstate : GLTFState = GLTFState.new()
var gltf : PackedSceneGLTF = PackedSceneGLTF.new()
print(path);
var raw_f = File.new()
if raw_f.open(path, File.READ) != OK:
	return FAILED
var buffer : PackedByteArray = raw_f.get_buffer(raw_f.get_len())
var root_node : Node = gltf.import_gltf_scene_buffer(buffer, flags, 1000.0, gstate)

Todo from reviewers:

  • add explicit security checks and migrate any URI resolving code for textures & buffers & etc. into a common helper which has an explicit check that returns ERR_FAIL_...
  • EditorSceneImporterMeshNode to MeshInstance needs to be function pointers that allow the code to switch based on function pointer null to MeshInstance3D
  • Blend shape key frames should have service limits requested in Gltf export blend shape #48947
  • Review design of PackedSceneGLTF vs purely using GLTFDocument

@fire
Copy link
Member Author

fire commented Sep 10, 2021

Superseded by: godotengine/godot-proposals#3273

@fire fire closed this Sep 10, 2021
@fire fire deleted the core-gltf branch September 11, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants