The Machinery Beta — April 2021 (version 2021.4)

It’s that time again! A new month and a new The Machinery release. Hope you are enjoying the longer, sunnier days, as well as our new additions!

If you are already running The Machinery, this new release should pop up in your Downloads tab. Otherwise, get it from our beta download page and have a look at this quick introduction video. If you find bugs in this release or have requests for specific features, post them to our issue tracker. For more general discussions, hit us up on the forum or Discord.

Key highlights in this release are:

As always, we also have a number of smaller updates.

Animation Triggers

The animation system now has support for Triggers. Triggers are labelled points in an animation that can be connected to outside events:

Adding triggers to an animation.

Adding triggers to an animation.

You can query for triggers that happened in the last frame using tm_animation_state_machine_api->triggers() or you can hook triggers up to actions using our visual scripting language:

Triggers in the visual scripting graph.

Triggers in the visual scripting graph.

UI Components

We are working on a new plugin for in-game UIs. This plugin allows you to add UI controls using the Editor and the Entity Component System. You can experiment with it by enabling the UI Components feature flag.

UI controls are implemented as UI Element components that belong to an UI Canvas component. The UI Canvas component lets you select whether it should be rendered in screen space or world space together with some other options. Screen space UIs are your traditional 2D UIs with menu options for the game, etc. World space UIs are UIs that are positioned in the 3D world, such as text on a wall.

When a UI Canvas is rendered it will gather all the UI Element components found in its child elements and render them:

UI Components hierarchy.

UI Components hierarchy.

Here’s an example of what UI elements positioned in world space can look like.

Interaction System sample with additional UI Controls.

Interaction System sample with additional UI Controls.

The UI elements have a basic API that you can use to get the corresponding tm_ui_*_t control and the state of interaction for the current frame.

Note that in addition to using the UI entity system, it is also possible to create UIs directly from code, using our IMGUI model.


Rendering

  • Fix for crash when destroying cubemaps. [#536] [#535] [#530] [#527]
  • Proper cleanup of cubemap images.
  • Fix for crash when deleting sun entity.
  • Fix for ringing artifact in rendering. [#531]
  • Fix for bug when connecting Position node to Base Color node. [#541]
  • Fix for Atmospheric Sky overwriting sun light color / intensity.
  • Fixed crash when using timestamps on non-graphics queue.
  • Added ability to set native color space for swapchains.
  • Renamed .shader files to .tmsl.
  • Added Visual Studio extension for shader language syntax highlighting.
  • Fix for tm_renderer_command_buffer_api->copy_image() not respecting mip maps.
  • Fix for rare threading issue in GPU resource readback mechanic.
  • Fix for incorrect resource barrier when doing in-place mipmap filtering.
  • tm_render_component_api->set_culling_enable() can be used to programmatically enable/disable view frustum culling.
  • Fix for rectangles rendered using tm_primitive_drawer_api->stroke_rect() being 2x too big.
  • tm_shader_api->shader_version() and tm_shader_api->system_version() are two new functions that returns a version number that can be tracked to verify if cached constant buffer- and resource binder instances needs to be updated.

Editor

  • Fix for crash when importing OBJ files.
  • Fix for icon clipping. [#534]
  • Fix for crash when opening projects from the Download tab. [#524]
  • Fix for bug where selection occurred after gizmo was moved, thereby selecting a different object. [#539] [#533]
  • Fix for log messages missing from log file. [#538]
  • Fix for crash when log is cleared after a reload. [#548]
  • Added icon to show volume component support in Property tab.
  • UI theme editor now supports changing color alpha.
  • UI theme editor has colors separated in groups.
  • All selection actions in the asset browser now happen when the mouse button is released.
  • Copy in the Console tab now copies the full log if nothing is selected.

Build

  • Fix for “New Plugin” code not compiling. [#545]
  • Fix for hang in tmbuild trying to execute vswhere. [#525]

Documentation

  • The Readme and the Guidebook are now in the API documentation.
  • Added predefined macros to the shader system reference

Entities

  • Fix for bug causing an infinite loop in notify_event().

Preview tab

  • The preview tab no longer uses the DCC asset component, instead it shows an entity that is rigged the same way as if the user presses “extract assets”. This makes the preview entity and the extracted entity behave similarly while also decreasing GPU memory use.

Graph

  • It is now possible to pan and zoom the graph while dragging a connection, moving nodes or making a selection.

Creation graph

  • Creation graph prototypes are now always compiled before instances, ensuring any state contained inside the prototype that the instance depends on to be available. This fixes an issue were buffers could occasionally become duplicated on disk.
  • The new Get Instance node allows you to get a graph instance from a component on the current entity, or another entity. The component should implement the aspect TM_CI_CREATION_GRAPH_INSTANCE_PROVIDER in order to appear in the node.
  • The new Create Instance node allows you to create an instance of a graph. The difference from the older Import node is that it doesn’t automatically read any outputs from the instance.
  • The new Read Instance Output can be combined with Get Instance or Create Instance nodes to read named outputs from a graph instance. The outputs need to be named using the Output node in the graph from which you are trying to read the outputs.
  • Fixed a bug where The Machinery could crash if too many Creation Graph were changed at the same time.
  • Filter Image node can now also take an Image as input and do filter operations in-place directly in the resulting GPU Image.
  • Filter Image node now has a Storage Policy to indicate if the filtered result should be shared between all instances (cached as part of the node) or instantiated for each instance of the creation graph.
  • Fix for Compress Image node not respecting mip chains.
  • We now keep track of in-flight execution of instances and make sure they finish before destroying the interpreter.
  • GPU Image → Image node now optionally supports releasing the input GPU Image after the readback has completed.
  • The TM_CREATION_GRAPH_EVENT_NODE_OUTPUT event is now triggered on the default instance immediately after the compile of the graph has finished
  • Support for optional run_dependencies() node callback that can be used to decide if a node that caches its result needs to run its dependencies or not.
  • Image nodes writing to shared resources now uses the run_dependencies() mechanism to determine what parts of the graph that needs to run based on validity hash tracking.
  • debug_tag of GPU images created by creation graphs now uses the resource name of the creation graph (if any) to make it easier to track down memory ownership in the Device Memory Analyzer view.

Entity Graph

  • Support for vec2, vec3, and vec4 Expression Language graph nodes.
  • Events, Subgraphs, Input and Output nodes now indicate their activity.
  • Added support to watch wire data.
  • Facelift for the Graph Component Property View.

Sculpt Component

  • Fix for sculpt component not working.

Math

API

UI

  • tm_ui_api->textedit() now takes the size of the buffer instead of the length in glyphs. [#518]
  • When editing RGBA colors, the alpha component is now inside the expanded picker instead of outside.

Projects

  • The migration index is now sorted in the saved data. [#470]

Plugins

  • Fix for errors sometimes happening when reloading plugins. [#537]

Hotfix 2021.4.a

  • Fix for Add Component button in Properties view not working. [#552]
  • Fix for error when selecting the Scale tool in the Scene tab. [#553]
by The Machinery Team