Creation Graphs

The Creation Graph is used to create asset pipelines and also define GPU-related things such as materials and shaders. In essence it lets you set up a graph that takes some inputs and processes them using nodes that may run on either the CPU or GPU, the graph can then output things such as shader instances, images or draw calls. The big power of the Creation Graph is that it lets you reason about data that lives in the borderland between GPU and CPU, but being able to do so within one single graph.

Creations Graphs live separately from Entity Graphs. You often find Creation Graphs living under Render Components (for issuing draw calls), or within .creation_graph assets, where they are used to define materials and images. As an example, a Creation Graph that outputs an image probably takes an image that lives on the disk as input, uploads it to the GPU and then has the graph output a GPU image. However, the user is then free to add nodes in-between these steps, for example node for compression or mipmap generation. Compared to other game engines, things that often end up in the properties panel of an import image, can here be done dynamically in a graph, depending on the needs of your project.

Within the core folder that we ship with the engine you will find several creation graphs, many of these are used for defining defaul materials and also as defaults graph for use within our DCC asset import pipeline.

Simple red material

Image loading and material creation are just a few examples of what can be achieved with the creation graph. The table below shows when a creation graph is used compared to the tools one could use in Unity and Unreal.

Asset TypeUnityUnrealThe Machinery
ImagesTextureTextureCreation Graph with Image Output node
MaterialsShaderMaterialCreation Graph with Shader Instance Output node
ParticlesParticle EffectCascadeCreation Graph with GPUSim nodes that emits particles
Procedural materialsProcedural MaterialsMaterialCreation Graph with Image Output node with dynamic logic
MeshesMeshStatic MeshDCC Asset referred to by Creation Graph within Render Component

The engine comes with a Creation Graphs sample, it contains examples of how to make materials and particle systems.

Like the entity graph, the creation graph can executes nodes in sequence from an event. Some examples of this are the Tick, Init, and Compile events which are executed at known points or intervals. However, creation graphs commonly work using a a reverse flow where an output node is triggered and then all the nodes it depends on are run, in order to supply the output. Examples of these outputs are Draw Call, Shader Instance, Image, and Physics Shape. Note that these outputs are just blobs of data interpreted by the code that uses them. You can in other words add your own output nodes and types from code.