I’m talking about something that Maya/Stingray has where stuff visible in the Maya are submitted live to the engine and viceversa. So I could basically open Unity, open Blender, activate appropriate plugin on both sides that would transfer mesh data between the two and basically use Blender as ProBuilder while doing Unity-specific things, such as adding scripts, etc. inside Unity Editor.
What would I need to develop on both sides (Unity and Blender) to make it work? As in, where to start?
Not pricey if you consider the number of hours you will need to code the same thing. It would be an enormous time saver, everything just speeds up really quickly if it can be done in Unity or feeds in directly. Great pity I still use milkshape 3D and need to beg the wife to let me have access to her photoshop. Looks great though.
You need to read blender’s python api (it is not very documented), find a subroutine that gets called every time anything is changed, install a hook into that subroutine, then every time the hook is hit, gather the scene and transfer it over to unity. It won’t be very different from making an exporter. On unity’s side creating and modifying meshes is fairly trivial, except you’ll need some script to run continuously, waiting/listening for changes.
Frankly, I wouldn’t bother with live link, because I don’t see the point in live update. It’ll only slow down your blender development process (by introducing hiccups).
An export plugin that could handle object instances properly - now THAT would be very useful. … I could probably write that one too, just don’t seem to ever find time for that…
Well, I can see the point: Free ProBuilder-like solution. Detecting updates won’t be a problem (Unity or Blender-side - my plan is to create “true” live link that would synchronize all objects to their Unity/Blender closest equivalents on both sides, e.g. Blender lights would be converted to Unity lights and so on), the problem I see would be actual communication between the two, i.e. sending updates to the other side.
I highly recommend to forget about tuning lighting in blender, though. Geometry - yeah, that can work. If you start trying to sync lights, there will be significant differences, and you’ll end up wasting time, instead of saving it.
Well the whole point is to have them split screen, so you can update backwards and forwards. So tweak the lighting in engine and see the results in the DCC…
Except with all the stuff needed for proficient level building. Because no merging, welding, subdivide, and so on (basically everything on this list marked “ProBuilder only”) it is as useful as “safe” scissors or a foam hammer. Not to mention that with “Basic” you can only build colored things, not things with actual textures.
ctrl + s with bender file inside unity doesn’t do it good enough? why does it need to be live-updated? That’s not very useful, and you will still incur delays, probably 0.5 sec or something, same as saving the file and tabbing to unity.
My idea is to have Unity scene graph synced with Blender’s so all objects in Unity’s space becomes objects in Blender space and vice versa. Blender has its own “scene graph” of sorts, completed with child-parent relationships.
So the idea is simple: You open scene in Unity, open up Blender, establish link on both sides, then Blender’s side clears all the objects currently in there and recreates what is in Unity. Then after each edit of any meshes (as all Blender meshes are editable by default) mesh data is transported back to the Unity side and meshes are then recreated using it. Additionally, any new object created in Blender would be then recreated on the Unity’s side with the closest equivalent (e.g. Blender lights will become Unity light of the same type unless that specific light type isn’t in Unity) and vice versa.
Then, by releasing it for free I put ProBuilder out of the commission since all people who are capable of utilizing Blender can use my free tool instead. Mwahahahahah.
The only thing is how would I establish a link between the two. I guess some sort of IPC, but is that even possible without source access from Unity’s side? I don’t worry about Blender side, since if needed I can just fork it over and implement my changes to make it work if I can’t do it with Python api. Of course I could’ve make some sort of “swap file”, but I’d prefer if both could communicate over RAM as it would be just much faster on both ends.
Well I would probably think about building meshes without intermediate file formats - such as using TCP with blender and Unity to network stream the data.