Home | Documentation | Atomic Chat | Github

Embedding in Application


I am looking at Embedding Atomic in an application using c#.

  • Ideally I would extend a windows UserControl and draw a 3D view-port to a form.

  • Other than maybe a basic environment (is global illumination possible?) all geometry would be generated at run time. I would implement a change que here and track changes.

  • In the end I would like to be able to compile compile to an executable and generate an atomic project but this is not immediately necessary.

Any pointers or hints at getting off the ground would be greatly appreciated.



Welcome to our community!

I’m not 100% sure if I did understand your questions correctly.

Do you want to embed a scene view in a winforms application? Is that correct? I don’t have experience with winforms, but I guess it’s possible at least in theory to display the OpenGL context, but honestly, I don’t think it’s worth the hassle since it’s not a supported feature (nor there’s any intention of supporting it), so I expect quite a bit of hacking will be necessary, and you’ll probably end up with a product that works and looks OK only on Windows.

If Turbo Badger isn’t enough for your needs, I’d suggest using Qt on the C++ side, basically you just have to look how Atomic is doing the context creation and point it to a Qt “widget” instead, there are many tutorials on creating an OpenGL context on Qt you could use. In the worst case you could render to a texture and display in a Qt image.

GI is not available at the moment AFAIK. There’s something called “Atomic Glow” in the works (coming very soon) that may be of your interest, it uv maps, calculates and bakes lighting/AO. For procedural generation it could be very useful. Naturally mesh generation isn’t a problem and it even has a custom mesh component accessible from scripting languages.

Compiling works fine already, creating binaries you can ship isn’t a problem at the moment. I’m not sure what you mean with “generate an atomic project” but Atomic outputs the distributable files, it doesn’t work as a ‘player’ application where you ship your game files and the binary to run them.

I’m not sure if I’ve addressed all your points satisfactorily, please feel free to elaborate your questions if I got them wrong.


I don’t have any pointers, but I’ll be watching this with interest. It’s one of the things we plan to get to as well for internal tools. Please share as much as you can as you progress :slight_smile:

As an aside, a drop-in WinForms Atomic component downloadable from NuGet would be :astonished:


Yes this is what I am looking to do. If need be it could be a Turbo Badger window that only displays the scene and does not “dock” into the host. I do not need any other sort of UI as the host application will handle all of that.

The fact that it is windows only is also not an issue as this is a windows application.

I will look for this. It is a bit of an issue that there is no GI as this is a standard from my point of view.

What I am imagining for future work is that I would parse out a folder structure and files that the Atomic Editor could open and use to refine the 3d environment. This is longer term.

What I am really looking for is the entry point in the c# API for this. I am assuming there is a series of specific classes and steps that are required to launch a scene add meshes etc etc.

Thanks again for the help. I am looking forward to digging more into this tool. It looks like it has a really solid foundation.


@mattbenic Have you looked at Xamarin.Forms? I was able to get Atomic rendering on a XAML control with it. The Xbox One support also “embeds” rendering in a XAML app.

@joel-putnam Atomic uses SDL2 for the platform layer, you may want to look into using the external window support of it and the Graphics subsystem. I would guess there is an example of embedding either a SDL2 app or a D3D11 app using WinForms. We also have great subprocess support in Atomic, and D3D11 can share rendering resources between processes, which would get rendering in the app very quickly.


@JoshEngebretson not yet :slight_smile: We haven’t quite got to the point where we need these tools yet.