Porting the renderer to vulkan

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Porting the renderer to vulkan

Post by Daxel »

Hi!
This is totally not my area of expertise, but I've been following the development of Godot, an open source 2d and 3d game engine that has been ported to Vulkan from open GL recently.
They abandoned Open GL because:

1. They consider Open GL is being abandoned by the industry, the software and hardware providers, with bugs that will never be adressed and broken compatibility.
2. Open GL API design does not map well with modern hardware.
3. Vulkan offers more moderns features not present in Open GL.
4. Vulkan has much better performance than Open GL, with better threading support.
5. Vulkan is less prone to bugs than Open GL.

Juan Linietsky explaining the benefits of porting Godot to Vulkan:
https://www.youtube.com/watch?v=-39yxfc9DEA

And they ported the 2 engines (godot uses a dedicated 2D engine and a dedicated 3D engine, not like unity that only has one engine) with only one developer (Juan Linietsky) in a year of work. I think that the 2D engine was ported in less than 6 months.

My guess is that Moho could use Godot's open source 2D renderer (MIT license) to massively improve its performance, fix some very old bugs like those related to display errors using masks, be less prone to future bugs, better supported by present and future OS's and hardware, and all relatively free of work because it is already done for free. Godot's code is very very well documented, extensively tested and follows sctrict guidelines to be easy to understand so it can be easily mantained by the community. So it should be relatively easy to pick up and understand by experienced programmers. Godot contributors guidelines: https://docs.godotengine.org/es/stable/ ... utors.html

Godot is supported on IOS thanks to MoltenVK, that is a well mantained (by KhronosGroup) open source Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on iOS and macOS.

So I just wanted to share those thoughts in case this is feasible and could help shape the future of Moho, but as I said I'm not an expert so this may be more complex than I think or straight impossible for some reason.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: Porting the renderer to vulkan

Post by davoodice2 »

Daxel wrote: Sun Oct 10, 2021 7:14 pm Hi!
This is totally not my area of expertise, but I've been following the development of Godot, an open source 2d and 3d game engine that has been ported to Vulkan from open GL recently.
They abandoned Open GL because:

1. They consider Open GL is being abandoned by the industry, the software and hardware providers, with bugs that will never be adressed and broken compatibility.
2. Open GL API design does not map well with modern hardware.
3. Vulkan offers more moderns features not present in Open GL.
4. Vulkan has much better performance than Open GL, with better threading support.
5. Vulkan is less prone to bugs than Open GL.

Juan Linietsky explaining the benefits of porting Godot to Vulkan:
https://www.youtube.com/watch?v=-39yxfc9DEA

And they ported the 2 engines (godot uses a dedicated 2D engine and a dedicated 3D engine, not like unity that only has one engine) with only one developer (Juan Linietsky) in a year of work. I think that the 2D engine was ported in less than 6 months.

My guess is that Moho could use Godot's open source 2D renderer (MIT license) to massively improve its performance, fix some very old bugs like those related to display errors using masks, be less prone to future bugs, better supported by present and future OS's and hardware, and all relatively free of work because it is already done for free. Godot's code is very very well documented, extensively tested and follows sctrict guidelines to be easy to understand so it can be easily mantained by the community. So it should be relatively easy to pick up and understand by experienced programmers. Godot contributors guidelines: https://docs.godotengine.org/es/stable/ ... utors.html

Godot is supported on IOS thanks to MoltenVK, that is a well mantained (by KhronosGroup) open source Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on iOS and macOS.

So I just wanted to share those thoughts in case this is feasible and could help shape the future of Moho, but as I said I'm not an expert so this may be more complex than I think or straight impossible for some reason.
Agree 100%/ Performance Performance Performance
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
JoelMayer
Posts: 285
Joined: Sun Apr 05, 2009 8:29 pm

Re: Porting the renderer to vulkan

Post by JoelMayer »

Since Apple ditched OpenGL on their platforms anyway every graphics software has to move to Vulkan or Metal sooner or later ;)
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Porting the renderer to vulkan

Post by SimplSam »

I just think the overlying GPU integration needs to be reviewed & revised, regardless of whether the underlying engine is Vulkan, OpenGL, Metal, other or any combination thereof. Simply plugging in Vulkan would not address the current GPU issues nor irregularities.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
JoelMayer
Posts: 285
Joined: Sun Apr 05, 2009 8:29 pm

Re: Porting the renderer to vulkan

Post by JoelMayer »

SimplSam wrote: Mon Oct 11, 2021 2:20 pm I just think the overlying GPU integration needs to be reviewed & revised, regardless of whether the underlying engine is Vulkan, OpenGL, Metal, other or any combination thereof. Simply plugging in Vulkan would not address the current GPU issues nor irregularities.
Agree ^
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Porting the renderer to vulkan

Post by Daxel »

JoelMayer wrote: Mon Oct 11, 2021 8:14 am Since Apple ditched OpenGL on their platforms anyway every graphics software has to move to Vulkan or Metal sooner or later ;)
As far as I know the industry is embracing Vulkan as the new open multiplatform gen-12 renderer and abandoning Open GL just like Apple officially did. Metal is Apple specific so it's not an option if you want to keep Moho multiplatform. But Vulkan works on Windows and Linux natively and on IOS thanks to MoltenVK.

SimplSam wrote: Mon Oct 11, 2021 2:20 pm I just think the overlying GPU integration needs to be reviewed & revised, regardless of whether the underlying engine is Vulkan, OpenGL, Metal, other or any combination thereof. Simply plugging in Vulkan would not address the current GPU issues nor irregularities.
Well there are a lot of bugs on OpenGL that are not going to be fixed because not only Open GL is starting to be abandonware but also Nvidia, Windows, AMD or whoever should do their part to fix those compatibility bugs are not interested anymore. There was nothing that Godot could do about certain OpenGL bugs for years and Moho is probably facing the same issues and they will only get worse over time. So yeah just plugging in Vulkan would address some issues, at least. And at the same time will make Moho less prone to bugs because Vulkan is better supported by OS's and hardware providers and also the nature of Vulkan is less prone to bugs, experts say.

So the question is not if Vulkan is a better option than Open GL. It clearly is and I'm sure that the dev team knows it. The thing is that porting the renderer to Vulkan is not easy. Actually it could be pretty cumbersome and Lost Marble doesn't have unlimited resources. That's why I propose them to check Godot's open source MIT Vulkan renderer, because they could use that renderer for free and if that's possible maybe the amount of work needed to adapt Moho's graphic features to it could be totally worth it. I'm also taking into account that Moho is having problems with Apple and they will get worse over time and Vulkan works on Apple thanks to MoltenVK.
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Porting the renderer to vulkan

Post by SimplSam »

A Moho move into the Vulkan hemisphere seems inevitable, but timelines might be measured in years rather than months. Even with the OpenGL deprecation from Apple (3 years ago), Apple have yet to announce a date for OpenGL runtime support withdrawal. Godot themselves will not fully deprecate OpenGL and plan to maintain support for OpenGL ES3.

At this time the Godot Vulkan render engine might also be considered to be untested in the real-world, and Godot do not as-yet have a release date (other than expected some time in 2022). Thus the platform might be considered unstable for a while - whilst its gains release status and cycles around various early release phases. It might well require a consortium of 3rd party implementers in order to prove its stability and usefulness - as a 3rd party tool.

One interesting sidenote: The Blender team have planned support for Vulkan this year - but do not envisage any performance improvements with it, and also continue to maintain support for OpenGL 3.3+ (released in 2010).

Ultimately - it would be wonderful if Moho could use and fully exploit this shiny (relatively) new toy, but I fear this path of righteousness will be strewn with the blood & guts of the damned :twisted: !
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Porting the renderer to vulkan

Post by Daxel »

SimplSam wrote: Tue Oct 12, 2021 7:42 am Godot themselves will not fully deprecate OpenGL and plan to maintain support for OpenGL ES3.
Yes but Godot is much more general purpose and is meant to deploy on the web, to even run on the web (the editor), on Android, on a Raspberry Pi, etc. And still only the Vulkan renderer will have all the features Godot can provide. OpenGL will be used for the low end renderer with limited features. And they also plan to add more renderers after Vulkan, but Moho doesn't really need to be as multiplatform and multipurpose, if it can run on Windows and IOS that's all it needs.
SimplSam wrote: Tue Oct 12, 2021 7:42 am At this time the Godot Vulkan render engine might also be considered to be untested in the real-world, and Godot do not as-yet have a release date.
Godot 4.0 might be considered to be untested. But Godot is orders of magnitude more complex and feature packed than Moho, and the 2D Vulkan renderer was made in 2019 (https://godotengine.org/article/vulkan- ... s-report-2). So even if they are still working on finishing Godot 4.0 with all it's features, it's not because the 2D renderer is not ready. It has been ready for years and Godot has a huge number of contributors that have tested it, and proved performance and quality improvements. So I think that the 2D renderer specifically is safe to use.

Just wanted Lost Marble to know that an open source 2D Vulkan renderer exists, that could run on Apple thanks to MoltenVK and also was developed in a way that is not tightly coupled with Godot so it may be usable but that last part is what I don't know and LM devs will know better than me for sure.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Porting the renderer to vulkan

Post by chucky »

Isn't Vulkan driver dependant?
If that is the case, then I doubt if it'll the first choice, it's just nice for the people with the right hardware ( like most of us yes)
I don't really know about this stuff, but if it's fussy about cards, then I don't see it being a good move right now.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Porting the renderer to vulkan

Post by Daxel »

chucky wrote: Sun Dec 19, 2021 1:33 pm Isn't Vulkan driver dependant?
If that is the case, then I doubt if it'll the first choice, it's just nice for the people with the right hardware ( like most of us yes)
I don't really know about this stuff, but if it's fussy about cards, then I don't see it being a good move right now.
All graphic APIs are somehow hardware/driver dependant, including OpenGL (each version), or DirectX (each version too) that is, at the same time, OS dependant. So the question is how much Vulkan support currently is in Moho's userbase.
Or more specifically: Which percentage of users would be able to run Vulkan/MoltenVK (the IOS adaptation) ? we have to take into account that right now Moho 13.5 requirements are:

Windows® 10 / macOS® X 10.15, 10.16 or higher
64-bit OS required
2.0 GHz Intel Core i3 or higher
4 GB RAM or higher
1.6 GB free hard drive space or higher
OpenGL 4.1 supported graphics card required

So right now it should be very close to 100% support, and that's why Godot team decided to adopt it and take advantage of it, and the userbase is growing a lot and super excited about the improved performace and features that are going to come to Godot 4.0. Godot will keep supporting a limited version with OpenGL 3.0 and maybe even 2.0 but that's because Godot has an online HTML5 web version of the program, it can run in a raspberry pi, it's meant to deploy games in arcade consoles, mobiles, web, etc so the situation is vastly different. Moho is a paid animation software and already require the users to have a decent modern computer to be able to run it and OpenGL 4.1, like its normal in the industry.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Porting the renderer to vulkan

Post by chucky »

I don't understand why ios is being talked about.
Is this all a very apple-centric phenomena?
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Porting the renderer to vulkan

Post by Daxel »

chucky wrote: Mon Dec 20, 2021 2:22 am I don't understand why ios is being talked about.
Is this all a very apple-centric phenomena?
I'm not sure if I understand your question. I only mentioned IOS because right now Moho supports it so I guess they will want to keep doing it, and in the case Moho adopted Vulkan, it would be easily supported in IOS through MoltenVK, that kind of translate Vulkan to IOS, because Apple is the only platform that doesn't support Vulkan. That is how Godot will run on IOS. And has the huge benefit of not having to develop two rendererers, one for Windows and other for IOS.

Also its worth mentioning that since Apple is abandoning OpenGL that will be problematic for Moho IOS support, and IOS version of Moho seems to be the one with worse performance right now but Vulkan would be a big improvement for windows too (less bugs, better performance).

I never had any apple product and I never will. Their efforts to make their hardware unrepairable, their software overcontrolled exclusive and closed, abandoning openGL, not supporting Vulkan, the lack of competitive performance or gaming support... I honestly don't like or need anything about Apple.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Porting the renderer to vulkan

Post by chucky »

Ahhh so you mean OSX , not iOS ... no probs then. :D
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Porting the renderer to vulkan

Post by Daxel »

chucky wrote: Mon Dec 20, 2021 5:20 pm Ahhh so you mean OSX , not iOS ... no probs then. :D
Oh sorry, I see iOS is their mobile OS, yeah I meant the Mac OS. That's how much I am interested in Apple :roll:
Post Reply