Long term strategy
Wanted to throw out a suggestion. The dev team won't want to hear it. They'll say "Go away".
I had a thought about how stuff is going on over in the open source 3D/Rust world, especially with the bevy game engine. Talking the programming language oc, not the game.
Bevy is built on wgpu, which is the rust library for abstraction over both WebGPU, and desktop libraries like Vulkan/opengl.
If blender was built on top of Bevy (or just built on top of wgpu without bevy), it would have a lot of inherent capabilties, so the projects could co-benefit each other, by not having to write a lot of the same type of code. The architecture is fully pluggable and MIT licensed (Rust and Bevy). Blender could still keep it's own license on top of that. I'm not sure about hte raytracing iibaries, I believe raytracing is still coming of age in rust, but there will eventually be support in bevy, and likely a lot of raytracing libraries in rust in coming years.
Yeah, but what about the conversion dipwad? Yeah ... That would be a beast. Had an idea there though. The sponsor of the conversion gets to hire the conversion team for 2 years afterwards. Easy way for them to put together a Rust team, as it's very hard right now (and they'll all have that experience). Conversion team will come from external (not core blender team), and when done will train the blender folks.
I'm not offering up to be part of that conversion team. Just wanted to throw out the idea, as I think it's not really such a bad idea. By going to Rust, you keep the devs happy to because many know that the industry is heading that direction even if off to a slow start.
And some of that conversion could likely be automated (things that don't call external or implicit libraries) - though I know this often accounts for less than hoped for. Probably less than 10%, but who knows.
Then again, the whole rust ecosystem might not be there yet ..., but it really is getting much closer.
Overall thought is that existing python plugins would still work in the new system. C++ plugins could be rewritten as rust plugins. Rust plugins would be awesome.
6 Comments
"The dev team won't want to hear it. They'll say "Go away". I dont think that is a good way to start a proposal
I am a blender core developer and rust enthusiast. All my projects outside blender are rust or assembly based. There are a lot of different issues that need to overcome. For example the intermediate representation of rust code is so complex that the optimiser cannot make sense of what is going on and produces code that is far from optimal. With simple algorithms the performance can be 25% of a c/cpp implementation.
This strategic misses to mention what the real benefits are.
The core devs are looking at other languages as well, but haven’t found good substitutes
there are a few edge cases where there may need workarounds like std::mem, using unsafe code, and stuff like that to work around any restrictions (when needed), but most articles I've read is that hte code is extremely optimal (in release mode), though I'm not going to argue that point further from here. The info is out there.
A good response to the proposal of adapting Blender to Rust can be found here: devtalk.blender.org/t/replace-python-code-with-rust/975
Overall it’s just not that tantalising an option and doesn’t present many (if any) improvements over Blender’s current architecture. Bevy also seems to be very much in its infancy, so making such a massive change to support the development of an obscure game engine is not really practical.
Thanks for leaving your thoughts!
A big part is future proofing.
My personal (strong) belief is that few going forward will choose C++ over Rust as their main native language. When Rust starts getting an open source blender type of project, you may start to think differently. It's not that modern C++ is bad. It's that there's a choice now, and the language that learned from other languages, has many benefits, including the ecosystem itself. Without wgpu, I'd say, no way. With wgpu, things look very achievable. Not have to maintain those lower layers ...
BTW, python scripting could be embedded using this project: github.com/RustPython/RustPython
Also, it could likely be done by creating just the UI in Rust, and then calling into the C++ libraries (using CXX crate functionality) crates.io/crates/cxx
Thus, convert one library at a time. Only downside is Rust UI libaries are still in the works. Ones like SixtyFPS are looking pretty good though
One other thing is that the 60fps team might actually be the best team to reach out to for doing such a project, as they could focus their project around items that ensure it can have all the widgets and doohickeys that blender has in it's UI, or I guess I should say, that their library has everything needed for Blender's successful conversion.
You could call this "team funding". Basically, what they are funding is putting together a team that spent a year working together, and gained a lot of shared knowledge about Rust, and their choices of libraries, etc. All that stuff is worked out. The team is ready to go for other projects for given period of time (2-3 years likely). Work on blender will be fixed amount of time (1 year) for 6 people for initial conversion efforts (not every library, but as many as possible in that time period, plus the UI), then team works for sponsor next 2-3 year. Plus, they get sponsorship recognition anyways of course. Someone would likely be interested. I smell Microsoft.