Download

Thanks for the BP->C++ Converter, it's awesome!

I have still no idea what everyone is talking about. What exactly is this converter doing, I don’t understand the magic behind Blueprints, but converter sounds like it actually makes c++ code, so… what kind of magic is this converter doing? <3

I dont think we will know exactly what the converter does, but logically it most likely just compiles the blueprints into c++, but does not generate editable code. Blueprints in essence are just extensions of c++ and so are technically already c++, just not displayed as code but as flow graphs of nodes.

When c++ is compiled it gets compiled into a .dll file, which is read by the game executable. Im not sure blueprints are normally handled, but I dont believe they are compiled into .dlls the same way, which is why they are slower.

You are wrong Shirk :wink: And why should we not know what “exactly” the converter does, everyone can look at the code on github.

BPs are usually executed in a VM, like Java. That’s why they are slow. The VM then communicates with C++, normally BPs are not C++.

The converter first converts the blueprints into C++ code, so it generates .cpp files for each of your actors. Then it automatically compiles this code, so in your packaged game your BP are no longer executed in a VM but instead they are native C++.

Sorry, I didnt mean that blueprints are the exact same thing as c++, but they communicate with it like you said and so are in essence an extension of c++. I also wasnt aware that the code was on github!

In such case it is really interesting to find generated C++ files…

Mother of god

Thank you! :slight_smile:

The converted code is saved in:
<Project Path>\Intermediate\WindowsNoEditor\NativizedAssets\Source\

It’s not, it generates a state machine and builds a switch case. Or at-least that’s what mine generated.

Edit: I wonder what would happen if you take a c++ bp node and connect that to the begin play and generate the c++

Who ever developed this tool for blueprints is well …](https://www.youtube.com/watch?v=eG-BOuN41vU)

Any chance you could post what the generated code looks like? Im interested to see the formatting and if its readable.

It is not “readable”, thats what I can tell you :rolleyes: It’s not meant to be ever looked at.

@John
How many layers of functions call does have the Blueprints generated C++ code compared to the same program written in C++ ?

Wow this is amazing, i didn’t even realize they were working on something like this… This makes the engine even more accessible now… get pretty much pure native performance even though you proto-typed it all in BP.

I don’t know.

Something I have noticed is that profiling does not work any more after the converter was used, so doing stat startfile and stat stopfile is generating a file, but the only real info left is how long the tick took, but I can no longer see how long different functions or node were executed. This makes it quite hard to find which areas of the code are the ones I have to work on to improve performance. If I profile without the converter enabled I see all the values, but then obviously the results are super inaccurate since everything is slowed down by being blueprint-only.

Will this be improved in the future?

This literally brought tears to my eyes. Tears of Joy.

If this scales well I could see map generation times on giant maps drop from minutes to tens of seconds and that would be amazing!

I don’t suppose this is just a preliminary step to allowing us to actually code C++ visually? :slight_smile:

are you saying that blueprints are 1251% slower than C++?
doesn’t really seems a good thing to me.

It is well documented that they are about 10 times slower.

It is standard for scripting languages to be this slow compared to the source language.

This is really cool, Epic is once again showing that their tech stack is always evolving.

Any chance you could post some snippets just to show us the converted code? You would avoid us the trouble of installing the preview to try it out.