3 ms·
I'm also looking forward to trying flutter_gpu when it's released (or at least closer to stable)! That's probably going to be the default choice for most people
by nmfisher 2y ago
I'm also looking forward to trying flutter_gpu when it's released (or at least closer to stable)! That's probably going to be the default choice for most people working with 3D/Flutter.
I'd say there are two main differences:
1) Unlike flutter_gpu, Thermion isn't tied to Impeller. For example, last I checked, Impeller won't be supported on web, so you probably won't be building "native Flutter 3D apps" on web any time soon either (except for embedded webview, which is very limited). Likewise, Thermion doesn't require Flutter and can be used anywhere you can get a hardware accelerated surface, window or render target. That opens up a lot of opportunities if you're just interested in writing a 3D app in Dart, with no need for UI (or at least, with no need for Flutter's UI).
2) Filament is a mature PBR engine (and from the outside at least, it certainly seems to have more resources allocated to it than flutter_gpu). I wouldn't expect Impeller 3D to have feature parity for a long long time, if at all. Things like the Filament material system (shader language & compilation pipeline), driver support, etc are very comprehensive. One example - a webgpu backend for Filament is planned, which I suspect will arrive long before Impeller on webgpu.
- zigzag312 2y agoI would be surprised, if Impeller isn't eventually ported to the web, as it's much smaller (100KB per architecture) than Skia/CanvasKit (1.5 MB). But like you said, this won't happen any time soon. Note that size comparison is not completely fair as even with Impeller, Skia (as HarfBuzz is embedded into it) is still used for text layout and shaping. > Updating the web engine to interface directly with Impeller is a non-goal at this time. It is a significant undertaking (compared to a flag to swap dispatchers that already exists) and also bypasses display list optimizations. > For this added implementation complexity, Web support has not been a priority at this time for the small team working on Impeller. > We are aware that these priorities might change in the future. There have been sanity checks to ensure that the Impeller API can be ported to WASM and also that Impeller shaders can be compiled to WGSL for eventual WebGPU support. https://github.com/flutter/engine/blob/main/impeller/docs/faq.md https://github.com/flutter/engine/blob/main/impeller/docs/fa...
- nmfisher 2y agoYes, you're probably right. I believe (?) the intention is also to publish Impeller as a standalone rendering engine (i.e. independent of Flutter). Will be interesting to see if there's a use case there too.
- satvikpendem 2y agoInteresting, thanks for the context. How "native" is it in Flutter, ie can I have 3D models directly inside a Flutter app? A good example could be something like the Wonderous app [0] where instead of SVGs of the monuments, it could be 3D models instead. Is it fairly easy to embed inside Flutter and still have the core app functionality work (ie, responsive to touches, accessibility, etc)? [0] https://github.com/gskinnerTeam/flutter-wonderous-app https://github.com/gskinnerTeam/flutter-wonderous-app
- nmfisher 2y agoOn Android, iOS and MacOS, the 3D viewport is just a widget just like any other in the Flutter hierarchy (so has access to gestures/filtering/etc). Doing that on Windows is more difficult (as there’s no D3D backend for Filament), so it’s actually an HWND that sits behind the Flutter app. On web, it’s similar (HTML5 canvas), but this can actually be imported into the Flutter app as a widget, I haven’t wired that up yet (there are performance implications on certain browsers too).