Task
The client tracked objects through tables of sensor readings, and it was hard to see the overall picture in the numbers. They also needed a way to run simulations of the process chain.
Solution
I built the system in Unity with 3D twins of the objects, data bindings and custom HLSL shaders that highlight each state. Data updates are separate from the visuals, so new data sources connect without rebuilding the scene.
What was done
- Built a digital twin system in Unity
- Made 3D twins of objects linked to live data
- Wrote custom HLSL shaders to highlight object states
- Separated data updates from visuals to support different data sources
- Built a simulation engine for the process chain
Result
The state of every object is clear at a glance. New models and highlighting rules can be added without rewriting the project.
Developer's note
What was hard
The hardest part was maintaining a stable frame rate while rendering all 58 industrial machines simultaneously on a standard factory workstation. The initial CAD models from engineers contained millions of redundant polygons and tiny bolts. I had to optimize the geometry manually, configure LOD levels, and combine static meshes for efficient batching.
Another challenge came from highlighting machine states with custom HLSL shaders. The scene needed to outline faulty units and shift hull colors on overheating without duplicating materials in memory. I moved status flags into dedicated GPU buffers so each shader pass resolved machine states in a single draw call.
What came easy
Building the shop floor layout editor in Unity went smoothly. The snap-to-grid coordinate system and semi-transparent placement ghosts came together quickly, making it comfortable to arrange machinery inside the virtual factory from early prototypes.
Interactive camera controls also proved straightforward. Free orbit navigation, double-click focus on any machine, and smooth zooming worked reliably using standard quaternion math without extensive tweaking.
Technologies
UnityC#