-
-
Notifications
You must be signed in to change notification settings - Fork 96
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 a glTF2 scene exporter #885
Comments
I would provide it as a GDNative addon via asset library
…On Sat, Dec 16, 2017 at 5:17 PM, K. S. Ernest (iFire) Lee < ***@***.***> wrote:
Godot master
*Issue description:*
It would be useful to expose an engine api for a scene exporter. The ideal
case is that we can click on a scene and then export it as a gltf2 file.
It may not be possible to be lossless exporting from scene to gltf2 and
back to scene, but it would be helpful for these cases:
- Easy export to sketchfab
- Easy export to blender
- Storing scenes in a standard format that can be sent to another
engine / renderer / future godot version.
@reduz <https://github.com/reduz> I require a Scene Exporter api exposed
to gdnative. Importing scenes has a large dialog of options, so would
exporting scenes.
*Steps to reproduce:*
- Click on scene
- Export as gltf2
** Irc Log ***
<iFire> reduz: is roundtrip from godot to gltf2 part of the roadmap?
<reduz> iFire: not really
<Calinou> why would you want to export glTF from a game engine?
<Calinou> unless we get a level editor…
<iFire> Calinou: why not?
<Calinou> then it would start making *some* sense
<Calinou> (and not that much)
<iFire> Calinou: well it just feels more proper to import any format and then export as gltf2. A) I can then put it in sketchfab B) Save a copy of the scene in gltf format because it's changed now
<iFire> C) move the scene to another game engine ;)
<Calinou> again, it's not relevant until we get a level editor
<iFire> I thought the scene editor is a level editor
<Calinou> once we have that, it has one main use: making renders in Blender or similar. Only really high-end games can afford this, so it is probably not a priority at all
<Calinou> it is not quite one. it doesn't let you create actual geometry using a GUI (CSG or similar)
<iFire> I don't care about, that's a workflow thing
<Calinou> also, remember that Godot and Blender materials are not fully compatible anyway
<iFire> some people use csg others use models
<Calinou> Eevee should be mostly similar, but you're going to have to wait 5 years until most people use it :/
<iFire> Calinou: but gltf is a workable process for standardizing the import
<iFire> there are blender import pipelines for gltf2
<Calinou> how good are the importers, too?
<iFire> https://github.com/ksons/gltf-blender-importer <-
<iFire> apparently the importer and exporter are different projects
<iFire> Calinou: anyways for my use case I don't need to go all the way to blender
<Akien> Well I think it would be nice to have a gltf2 export feature as a plugin, someone just needs to write it
<iFire> Akien: Can you expose the apis?
<Akien> There is no huge use case, but it's still nice to have. I like the idea to export a 3.1 scene as gltf2 and import it against in Godot 8
<iFire> I don't know what I need
<Akien> iFire: Then how would I know? :p Best would be to start and see what you are missing.
<Calinou> GDScript would be too slow for this, probably
<Calinou> (for large scenes)
<Akien> I don't think so.
<Akien> Blender's plugins are in python :)
<iFire> Akien: I was able to get a fbx importer but the gdnative interace has a bug with the import plugin and scanning for the fbx extension. karroffel is on it.
<Calinou> do remember that Godot isn't a 3D DCC, it stores vertices and everything differently
<iFire> Calinou: I don't see how it's impossible
<iFire> those are only things that make it more difficult
<Calinou> is it worth spending time on right now?
<iFire> I might spend time for fun :)
<iFire> or I can make a game lol
<Calinou> I don't find that task particularly fun
<Calinou> I'd find new renderer features funnier
<Calinou> or, you know, a 3D level editor
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/godotengine/godot/issues/14752>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z260B-DS2iDjPEyIjpCBn-w-ebVVJks5tBCVCgaJpZM4REccu>
.
|
it could be handy to be able to export snapshots of the game in progress scene as a gltf scene also for artists |
I'd be interested in this. @fire, did you make any progress on it? |
I have not done any work feel free to take over. Wanted to write down the concept. |
Just FYI, I'm working on this now. Doing it in python. No glTF lib, just creating a big python dict and saving as JSON, with binary blobs coming from int/float python arrays. Textures are a hangup due to godotengine/godot#18109 and there are lots of little details to get worked out before it's done. |
Any progress on this? |
My python version is at https://github.com/garyo/godot-export-gltf, in case it's useful to anyone. |
Bump, any news on this? |
I think doing this in gdscript vs godot-python would be better. Making someone install godot-python seems a bit ridiculous. |
I was able to complete work exporting GLTF2:
Materials don't work, neither do animations or skeletons. godotengine/godot#19232 (comment) The GLTF2 scene exporter code needs to be extracted into a module before it is mergable into Godot. This is all the time I can spend it on this weekend. Looking for contributors. |
Here's the github branch: |
Thank you for this really desirable feature. |
I'd like to state that there is indeed a huge usecase for this for all level designers. It would mean they could test and block out levels within Godot using primitives and CSG Meshes and only once they are happy how it plays in game export it to a 3D modeling package for refinement. It would also mean anything generated in realtime could be used outside of Godot. I'm actually surprised it's considered just a "nice to have". |
@golddotasksquestions you are quoting something from 2 years ago, now if you check the WIP PRs, there is work towards more than just CSG, full scenes may be able to be exported soon to a couple of formats. And this issue may need to be closed and a another opened on the proposals repository with a summary of the current state of the PRs. |
Any progress on this ? :) |
I've updated the proposal and started a pr chain on Godot Engine master. |
Any progress on exporting to blender through glTF2? :-) |
This is now implemented: https://godotengine.org/article/introducing-the-godot-gltf-2-0-scene-exporter
|
Describe the project you are working on:
3d multiplayer game
Describe the problem or limitation you are having in your project:
I wish to export my scene to a standardized exchange format.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
It would be useful to expose an engine api for a scene exporter. The ideal case is that we can click on a scene and then export it as a gltf2 file.
It may not be possible to be lossless exporting from scene to gltf2 and back to scene, but it would be helpful for these cases:
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
This is a description of the architecture of the gltf plugin at https://github.com/godot-extended-libraries/gltf.
I split the importer into a glTF2 document and an importer. This allows us to modify the document to be a exporter.
This also allows for extensions through #1463 for import and export.
PRs:
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Have to port 3000 lines of core module code to gdnative because it includes the importer code too.
Is there a reason why this should be core and not an add-on in the asset library?:
Core code is large and I do not want to duplicate it. This moves the gltf2 importer into a doument and two plugins (import and export). If I make the gltf2 exporter a GDNative plugin which is possible, I can't do this without duplication. glTF runtime import is also a requested feature from the community and also export.
Older Proposal
Click for the old proposal.
@reduz I require a Scene Exporter api exposed to gdnative. Importing scenes has a large dialog of options, so would exporting scenes.
The text was updated successfully, but these errors were encountered: