godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.08k stars 69 forks source link

glb distributor #6132

Closed flobotics closed 1 year ago

flobotics commented 1 year ago

Describe the project you are working on

i wrote a glb distributor for multiplayer games. You can set own peer as glb-creator, then from all clients you can call request_glb with a String like e.g. "Fox" . Then the glb-creator peer will create the glb (with blender , AI tools like stable-dreamfusion, AI animation generators , etc. ). If the glb is stored into a filesystem directory, it gets distributed across all clients and added to multiplayerSpawner::add_spawnable_scene() . Then you can call add_child() and multiplayerSpawner takes control and spawns it on all clients.

Describe the problem or limitation you are having in your project

Its not possible to e.g. add_child() a not-at-compile-time-known glb file.

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

One peer can set itself as glb-creator. The other peers can request a glb with a String like e.g. "Fox". Then the Fox.glb gets distributed across all clients and saved as scene in res:// . Also added to multiplayerSpawner.add_spawnable_scene()

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

One peer can set itself as glb-creator. The other peers can request a glb with a String like e.g. "Fox". Then the Fox.glb gets distributed across all clients and saved as scene in res:// . Also added to multiplayerSpawner.add_spawnable_scene()

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

You can read the new glb from filesystem and send it via rpc() , its possible with GDScript right now. But its not possible to use multiplayerSpawner or MultiplayerSynchronizer then.

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

Dont know. future is AI. So AI generated glb files should be easily be distributed across clients in multiplayer games.

QbieShay commented 1 year ago

I don't think AI-generated glb is a compelling argument for a plugin like this, but asset sharing is indeed interesting. Could you link your plugin?

flobotics commented 1 year ago

@QbieShay you could make fun stuff, like e.g. a "stable-dreamfusion gun" , to shoot at your friend, whatever text-prompt you entered :) https://github.com/ashawkey/stable-dreamfusion or AI-generated-animations. You build your game while you play with friends with text-prompts, i think that could be fun.

Also it could be used for collaborative working, while you meet with friends in e.g. VR, you can distribute a new model of something you are working on, or just want to show the others, so it must be distributed, or should there someone build a new VR-app and distribute this to all people ?

Also, it could be used for companies like e.g. a furniture-shop. They build one e.g. VR-app, and then you can load the new-furnitures from web, to see them with VR or AR.

here is my code so far: https://github.com/flobotics/godot/tree/glb_distributor

QbieShay commented 1 year ago

From reading your proposal, it's not clear to me what you're proposing.

Do you want your module integrated into Godot?

Or do you need extra features in Godot in order to finish your module?

Or something else ..?

flobotics commented 1 year ago

i tested the module only on windows right now. I also can test it only on HP reverb G2 and pico3 and pico4 VR headsets. So to intergrate it into godot, there must be done alot more i think.

So, perhaps someone is interrested and could help make the code more-platform-available and better. I dont know if i use scene_multiplayer correctly, and other stuff.

To say it short, i dont think that i alone can manage this code for a godot integration, so i search interrested ones :)

QbieShay commented 1 year ago

Alright :D

So, with Godot4's current architecture, the best way to bring this forward would be to first move it to a GDExtension, so that it's easier to distribute since GDExtensions don't need users to recompile the engine and can be just distributed in the assetlib.

After that, it's easier to find people interested in helping you if you post your work in the showcase channel of the discord server. You can also get help in the #gdnative-dev channel.

I don't think the proposal repo is the right place to give visibility to your project otherwise.

flobotics commented 1 year ago

i will have a look at GDExtension

QbieShay commented 1 year ago

Awesome!

I'll close this proposal as there isn't anything specific that's actionable for us.

If you find yourself missing a feature in the engine that you need in order to implement your add-on, feel free to open another proposal.

I think it could be beneficial for your project if you can add documentation and a readme, or show a proof of concept of it working, so that others can more easily understand what you're developing and what kind of help you may want.

Lastly, if you're looking for collaborators, there's also the #job-board channel on discord. You could post it there with appropriate tags.