Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Integration with Godot Engine #5

Open
fire opened this issue Aug 6, 2020 · 12 comments
Open

Integration with Godot Engine #5

fire opened this issue Aug 6, 2020 · 12 comments

Comments

@fire
Copy link
Contributor

fire commented Aug 6, 2020

Researching mixer and saw that there was support for baking art so it be used in VR and Unity.

Aside from the fact Godot Engine is MIT license and incompatible with GPL2 (from the game developer perspective), it should be possible to do the same.

Any suggestions?

@BluePrintRandom
Copy link

BluePrintRandom commented Aug 6, 2020

Blender itself has tons of import / export addons shipped with it by default that py or a button click can call.

using the BPY api + a little time I am sure you can set something up that is one click to export and run a project like UPBGE.

basically everything you need already exists within blender I believe, you just need a little addon to call all the pieces that is calibrated correctly for that export pipe*

gltf format, etc.

@fire
Copy link
Contributor Author

fire commented Aug 6, 2020

I don't understand.

The synchronisation mechanism was originally developed for our VRtist software that include a Unity VR client. As a consequence, the data that are synchronised for VRtist are selected for their relevance to VRtist and the the synchronization "cooks" Blender data into VRtist related messages.

I was referring to this protocol.

@fire
Copy link
Contributor Author

fire commented Aug 6, 2020

As far as I know Unity has horrific support for glTF2. FBX support is painful to implement and Blender doesn't support the full format. Not sure how this is done.

@BluePrintRandom
Copy link

BluePrintRandom commented Aug 6, 2020

fire - you can use blender in VR -> create your assets in VR -> export them in any format to godot -> open them in godots VR tools / engine

you need to wrap this process -

Blender is not near ready yet for all this yet though

they are still at the 'scene inspection stage' - https://developer.blender.org/T68998

@fire
Copy link
Contributor Author

fire commented Aug 6, 2020

You are not answering the question. This is a issue for the mixer protocol. I can do your process in any possible way. The question is for mixer's protocol which was noted to exist.

No. I don't care about the blender VR process. Exporting the blender plugin as gltf2 will run into the slow export bug in glTF2. It will take several minutes as noted in KhronosGroup/glTF-Blender-IO#1120 and may use up to several gigabytes of ram.

I'm expecting some sort of walk-through of the mixer protocol in tcp/ip and maybe some insight in Ubisoft's Unity VRtist app.

@Celeborn2BeAlive
Copy link
Contributor

Hi, thanks for your interest and for your idea ! Indeed an integration of Godot could be great (Maya too as mentionned in your other issue, but personally I prefer open source technologies haha).

We started reflections about how we can cleanly mix different client types. For now we only have Blender and VRtist, our internal VR app, and the architecture and the protocol has evolved according to our needs.
After only a few months we think it is already a bit bloated, and makes the code hard to read for an external developer. So before trying to add other clients types, we want to rework this. We'll be sure to think about other use case than ours, like Godot and Maya.

If you want to explore by yourself how to connect Godot to a Mixer session, feel free to fork Mixer and experiment things. If you want more details abour the protocol, you can read https://github.com/ubisoft/mixer/blob/master/doc/protocol.md.
To know more about how we synchronize data between Blender and VRtist, read this https://github.com/ubisoft/mixer/blob/master/doc/synchronization.md.

For the source code, you can focus on these files for client-server interactions:

@fire
Copy link
Contributor Author

fire commented Aug 10, 2020

This response is excellent.

Did you document the way bpy.types.Mesh is serialized?

I am trying to understand how one node's mesh is sent game engine. I was wondering if I need to decode the mesh format into one the Godot Game engine understands.

I would also like to support animations.

@Celeborn2BeAlive
Copy link
Contributor

No we have no documentation for this part right now, but most of the code for meshes sync is in https://github.com/ubisoft/mixer/blob/master/mixer/blender_client/mesh.py

Right now we send two meshes for each Blender mesh (with options to disable one or the other, for dev purpose): one triangulated and one "original". The triangulated is for consumption by VRtist, and I guess Godot might want one triangulated too. The other one is for Blender and also encodes Blender related data such as vertex weights, bevels, vertex groups, etc...

In the future the code for the triangulated one will probably be moved to a VRtist plugin, and the "original" one handling will be replaced by mechanics of our generic sync system (https://github.com/ubisoft/mixer/tree/master/mixer/blender_data). That is to say that right now you can use this code to experiment and test the system, but it will evolve a lot in the next weeks/months so you should expect required changes in your code too.

@fire
Copy link
Contributor Author

fire commented Sep 22, 2020

Hi, I was prototyping a python based version of the Mixer client in Godot Python. https://github.com/touilleMan/godot-python

Uploading Mixer Project.zip…
You have to extract and copy the python addon into the folder and use a Godot Engine executable with this zip.

The above is the extracted client, but I was hoping to see if the https://github.com/ubisoft/mixer/tree/master/mixer/broadcaster directory aka the protocol is more permissively licensed. This would really help.

This is currently missing the send scene "content" part of the protocol. So it hangs. Here's a screenshot.

image

See #6

@Celeborn2BeAlive
Copy link
Contributor

As mentioned in #6, closing this issue in favor of https://gitlab.com/ubisoft-animation-studio/mixer/-/issues/8.

@fire
Copy link
Contributor Author

fire commented Jul 1, 2021

I have a task to write design for integrating Mixer with Godot Engine.

@fire
Copy link
Contributor Author

fire commented Sep 24, 2021

Status update: waiting on Blender to be workable on LTS Blender 2.93.

fire referenced this issue in V-Sekai/mixer Aug 14, 2023
Fix object transform reset when edit mode selected

Closes #5

See merge request motion-pictures/blender/dccsync!5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants