Development and Validation of an X-ray Security Scanner Digital Twin for Synthetic Image Generation

Aleksander Dawid

 Department of Transport and Computer Science, WSB University, Dąbrowa Górnicza, Poland

Academic Editor: Blaž Rodič

Cite this Article as:

Aleksander Dawid (2026)," Development and Validation of an X-ray Security Scanner Digital Twin for Synthetic Image Generation ", Communications of the IBIMA, Vol. 2026 (2026), Article ID 228288, https://doi.org/10.5171/2026.228288

Copyright © 2026. Aleksander Dawid. Distributed under Creative Commons Attribution 4.0 International CC-BY 4.0

Abstract

This paper details the comprehensive development and rigorous validation of a functional digital twin for a conventional airport security X-ray baggage screening system. The primary objective was to create a physically accurate software simulation capable of generating high-fidelity synthetic X-ray images to address the scarcity of large-scale, annotated datasets in the aviation security domain. The modeling pipeline began with the meticulous creation of core, reusable three-dimensional assets. Using Blender 3D, a diverse library of baggage items, common contents, and prohibited threat objects was designed with precise geometric and material properties. These models were subsequently imported into the Unity 3D real-time development platform, which acted as the central rendering engine for scene composition and image synthesis. The cornerstone of the system’s realism is a custom-built, physics-based rendering shader, programmed directly in High-Level Shading Language (HLSL). This shader implements a simplified yet effective model of X-ray transmission, simulating the differential absorption characteristics of various materials. To validate the visual fidelity and practical utility of the digital twin, its output was subjected to a qualitative comparative analysis against ground-truth images captured from a physical Krystal Vision X-Ray Baggage Scanner. The results indicate a significant degree of visual congruence between the synthetic and real X-ray images, confirming that the proposed methodology can produce perceptually convincing simulations. The successful implementation of this digital twin demonstrates a viable pathway for the on-demand generation of limitless, perfectly annotated training data. This tool holds substantial promise for two critical applications: first, for the cost-effective and scalable training of security screening personnel via realistic virtual simulators, and second, for accelerating the development and robustness testing of automated threat detection algorithms based on deep learning, all while circumventing the significant logistical, financial, and security constraints associated with continuous access to operational screening equipment.

Keywords: digital twin, security check-in, 3D modeling, shaders simulation

Introduction

The global aviation network, which facilitates the daily movement of millions of passengers and countless tons of cargo, serves as a critical engine for international commerce and connection. This immense and vital throughput, however, creates an equally substantial security imperative that must be addressed. Standing as the critical, often invisible, sentinels ensuring the safety of this complex system are X-ray security scanners (An et al., 2024; Gaus et al., 2019; Park et al., 2024). These sophisticated devices are the cornerstone of aviation security, forming the primary non-invasive method for screening baggage, cargo, and personal belongings. The iconic glow of the X-ray screen, with its kaleidoscopic color-coded images, is a universal experience for any traveler. However, the technology behind this familiar sight has undergone a radical transformation. It has evolved far beyond simple monochrome imaging into a powerful suite of analytical tools. Modern systems leverage advanced algorithms, material discrimination, and even 3D computed tomography (CT) to automatically detect potential threats (Mouton and Breckon, 2015; Wang et al., 2020), from conventional weapons and explosives to organic materials and liquids, with unprecedented accuracy and speed.

X-rays are a form of ionizing radiation, which means they carry enough energy to remove tightly bound electrons from atoms, thereby creating charged particles within the materials they penetrate. This fundamental property is what makes them useful for imaging but also forms the basis for their potential harm to biological tissues (Jaafar Ghalib Jabbar Lftta and Ali Hadi Kazem Nasser, 2024; Schauer, 2011). The primary risks associated with X-ray exposure are well-documented and fall into two main categories: deterministic effects and stochastic effects. Deterministic effects are harmful outcomes that are guaranteed to occur only if a specific threshold of radiation exposure is exceeded. The severity of the effect increases with the dose received. Below this threshold, the effect does not occur. These effects are caused by high doses of radiation that cause widespread cell death and tissue damage, overwhelming the body’s natural repair mechanisms. Examples include radiation burns, similar to severe sunburns but capable of penetrating deeper tissue, and radiation sickness, which occurs after whole-body exposure to a very high dose in a short period and involves symptoms like nausea, vomiting, and damage to the bone marrow. Another deterministic effect is the formation of cataracts, as the lens of the eye is particularly sensitive to radiation damage. It is critical to understand that these effects are not a concern for passengers or airport staff in a security screening context. The doses emitted by modern airport X-ray scanners are millions of times lower than the thresholds required to cause such damage. The more relevant category for low-level exposure is stochastic effects. These are probabilistic effects that have no known safe threshold; their likelihood of occurrence increases with increasing radiation exposure, but their severity does not. The mechanism involves low doses of radiation causing damage to a cell’s DNA without killing it. If this genetic damage is incorrectly repaired by the body, it can lead to mutations that may eventually result in cancer. The primary long-term concern from low-dose radiation exposure is this increased lifetime risk of developing various types of cancer. There is also a theoretical risk of heritable genetic effects, where damage to DNA in sperm or egg cells could be passed on to future generations, though no such effects have ever been observed in human studies (Parplys et al., 2012). This theoretical risk is the foundation of the principle behind all radiation safety protocols: that no dose of radiation is considered completely safe. Consequently, all exposure must be justified by a greater benefit and kept As Low As Reasonably Achievable, a concept known as ALARA (Gislason-Lee, 2021). When considering airport security scanners, the extremely low dose involved is the key factor. The radiation dose from a single airport body scanner scan is statistically insignificant. It is roughly equivalent to the natural background radiation a person receives during just a few minutes of flying in an airplane at cruising altitude or simply from being on the Earth’s surface for a few minutes. This minute exposure is far less than that of a standard medical chest X-ray. Therefore, while the harmful effects of X-rays are a serious consideration in medical and industrial settings, the security screening environment is meticulously designed with heavy shielding and safety interlocks to ensure that the risk to both passengers and operators is effectively zero. The benefit of ensuring aviation security is considered to vastly outweigh the immeasurably small theoretical risk posed by the technology. The implementation of a digital twin within the research framework mitigates risks to human operators.

The airport check-in process, often a passenger’s first encounter with the complexities of air travel, is on the brink of a profound transformation. The catalyst for this change is the emergence of digital twin technology. A digital twin is a dynamic, virtual replica of a physical object, process, or system. In the context of an airport, this means creating a living digital model of the entire terminal, encompassing everything from physical infrastructure like check-in counters and conveyor belts to the real-time flow of passengers, luggage, and staff. In the critical area of aviation security, the X-ray screening of passenger luggage is a complex process where accuracy and efficiency are paramount (Dawid and Buchwald, 2024a). Digital twin technology is now being implemented to revolutionize this specific operation. A digital twin in this context is a dynamic, virtual replica of the entire luggage handling and screening ecosystem. This digital model integrates real-time data from multiple sources, including the X-ray scanners themselves, the conveyor belt systems, the computed tomography (CT) scanners, and the human operators’ workstations. It continuously receives information on processing times, image analysis results, alarm rates, and even the performance metrics of the screening staff. The implementation of a digital twin for luggage X-ray screening delivers significant advantages. A primary benefit is predictive maintenance and optimization. The twin monitors the health and performance of each X-ray machine in real-time. By analyzing data on component stress and usage patterns, it can predict potential failures before they occur. This allows for scheduling maintenance during off-peak hours to avoid system downtime and ensure maximum availability of security lanes. Furthermore, the technology offers profound insights into operator performance and training. The system can create a digital twin of the screening process itself, simulating the flow of baggage images to an operator’s station. This allows managers to analyze workflow efficiency, identify bottlenecks, and understand the factors that contribute to operator fatigue or error. This simulated environment also becomes a powerful training tool, generating a limitless library of virtual baggage with known threat items to train and certify screeners without disrupting the live operational system. Finally, the digital twin serves as a vital tool for scenario testing and process refinement. Security directors can use it as a testing ground to virtually model the impact of new regulations or the integration of new scanner technology. This enables data-driven decisions that enhance both security protocols and operational efficiency before any physical changes are implemented in the real world.

This work presents the development of a digital twin representing passenger luggage. The model incorporates common items typically carried in suitcases alongside three threat objects: a grenade, a knife, and a revolver. The X-ray imaging process was simulated using custom shader programs to alter the visual properties of the luggage and its contents. The entire simulation framework was implemented using the Unity 3D software engine.

This document is structured to provide a comprehensive and logical progression through the development and implementation of our project. The work begins by establishing a foundational understanding of the core technology before moving into a detailed exposition of our methodology, and concludes with a presentation of our findings. A potential application of our 3D model of luggage is for virtual reality courses on dangerous item recognition. In the future, the realism of this model can be enhanced by leveraging generative adversarial network model (Trevisan de Souza et al., 2023).

Digital Twin Technology and Applications

Digital twin technology represents a paradigm shift in how we interact with and manage physical systems. At its core, a digital twin is a dynamic, virtual representation of a physical object, process, or system that uses real-time data and simulation to mirror its real-world counterpart. This goes far beyond a simple static 3D model or computer-aided design (CAD) drawing. The power of a digital twin lies in its bidirectional data flow; sensors on the physical entity continuously send data to the digital model, which in turn can provide insights, predictions, and even control commands back to the physical world (Javaid et al., 2023). This creates a closed-loop system that enables deep understanding, informed decision-making, and proactive intervention. The foundational principle of this technology is the seamless integration of the physical and digital realms (Dawid and Buchwald, 2024). A fully realized digital twin incorporates several key technological layers. It is built upon a detailed geometric model that defines the physical structure and appearance of the asset. This is enriched with integrated physics-based models that dictate how the object should behave under various conditions, such as stress, heat, or vibration. Most critically, the twin is connected to a live data stream from IoT sensors, which provides a constant pulse of information on performance, health, and environmental conditions (Mansour et al., 2023). Finally, advanced analytics and machine learning algorithms process this vast amount of data to detect anomalies, predict future states, and simulate the outcomes of different scenarios. The applications of digital twin technology are vast and transformative across numerous industries. In manufacturing, digital twins of production lines are used to simulate processes, optimize efficiency, and perform virtual commissioning of new machinery, drastically reducing downtime and costs (Can and Turkmen, 2023). The aerospace sector employs highly complex twins for entire aircraft, monitoring real-time performance during flights to predict maintenance needs and enhance fuel efficiency. Within urban planning, city planners are developing digital twins of entire metropolitan areas, often referred to as smart cities, to model traffic patterns, manage energy grids, and plan for sustainable growth (“Digital Twin for Urban Planning in the Green Deal Era: A State of the Art and Future Perspectives,” n.d.). In the realm of healthcare, innovative projects are creating digital twins of human organs to simulate surgical procedures or personalize treatment plans, paving the way for more precise and effective medicine (Sun et al., 2023). Ultimately, the technology serves as a powerful sandbox for innovation, a tool for predictive maintenance, and a catalyst for unprecedented efficiency and understanding across the global industrial landscape.

Modeling and Simulation Tools

In our work we have used Blender software for modeling process (Soni et al., 2023). This powerful, open-source 3D creation suite provided the essential tools for constructing the detailed geometric models required for our project. We utilized its comprehensive polygon modeling toolkit to create the foundational shapes of our objects, from common luggage items to specific threat objects. The software’s advanced sculpting and texture painting features were instrumental in achieving a high degree of visual realism and surface detail. Furthermore, Blender’s robust modifier stack allowed for a non-destructive workflow, enabling efficient iteration and refinement of our models. This flexibility and precision were critical in developing the accurate virtual assets necessary for our simulation. Figure 1 illustrates an example of the modeling work completed in Blender. The depicted suitcase model includes detailed components such as wheels and zippers. Each of these elements was modeled as a distinct object to facilitate the accurate assignment of different material properties.

Fig 1. Screenshot of the Blender workspace showing the constructed 3D suitcase model.

Figure 2 displays three models of dangerous items, also created within Blender. To achieve a high degree of visual fidelity, the textures applied to these models were sourced from photographs of real-world objects. The luggage set was modeled using Unity 3D game engine software, a powerful and versatile platform that extends far beyond its origins in game development to serve as a comprehensive environment for real-time 3D simulation and visualization (“Unity Real-Time Development Platform | 3D, 2D, VR & AR Engine,” n.d.). While primarily known for creating interactive entertainment, Unity’s robust feature set makes it an ideal choice for building complex digital twins and serious training applications (“Comparative Study of Digital Twin Developed in Unity and Gazebo,” n.d.; Haghshenas et al., 2023; Wang et al., 2021). Its integrated development environment provides a unified workspace for assembling assets, scripting logic, and designing immersive user experiences, all within a single, cohesive ecosystem. A core strength of Unity in this context is its powerful rendering engine. For this project, Unity was instrumental in creating the visual simulation of the X-ray process. This was achieved through the development and implementation of custom shaders, which are specialized programs that run on the graphics processing unit (GPU). These shaders were meticulously programmed to override the standard surface appearance of the 3D models, manipulating light and transparency to replicate the unique visual characteristics of an X-ray scan, including the color-coded material differentiation based on atomic density. Furthermore, Unity’s built-in physics engine, NVIDIA PhysX (Maciel et al., 2009), was employed to simulate realistic object behavior within the virtual luggage. This gravity-driven simulation ensured that the items inside the suitcase would settle, stack, and interact with each other in a physically plausible manner, adding a critical layer of authenticity to the digital replica. The engine calculated collisions, mass, and friction to determine the final resting position of each object, just as would occur in the physical world. Beyond rendering and physics, the entire interactive experience was orchestrated using C# scripting. This coding language was used to create the application logic, control the simulation runtime, manage the user interface, and handle the data flow between different components of the system. The ultimate result is a dynamic, real-time simulation that not only visually replicates a physical security system but also behaves as one, providing a valuable tool for research and training purposes.

Fig 2. Blender-rendered views of the 3D dangerous item models used for the X-ray simulation.

Geometric Modeling of Luggage and Contents

Geometric modeling forms the foundational stage of creating digital assets, and, in our work, this process was executed utilizing the comprehensive toolset provided by Blender, a powerful open-source 3D creation suite. Blender’s approach to modeling is both robust and nuanced, offering a multi-faceted workflow that accommodates everything from broad conceptual shapes to intricate surface details. The process typically begins with the creation of primitive forms such as cubes, cylinders, or spheres, which serve as the basic building blocks for more complex structures. These initial forms are then meticulously manipulated through a process known as polygonal modeling, where the artist carefully edits the mesh by working with its fundamental components: vertices, edges, and faces. This allows for precise control over the contour and topology of the object, ensuring the model is both visually accurate and geometrically sound for subsequent operations like animation or simulation. A significant advantage of using Blender for this purpose is its non-destructive workflow, heavily reliant on a powerful modifier stack. Modifiers are automated operations that apply effects to a model without permanently altering the underlying base geometry. For instance, the Subdivision Surface modifier is indispensable for smoothing a low-polygon mesh into a sleek, high-resolution object, while a Solidify modifier can quickly add thickness to a thin surface, turning a single plane into a three-dimensional panel. This non-destructive paradigm is crucial for iterative design, as it allows the modeler to experiment freely, adjust parameters at any time, and easily revert changes without compromising the entire project. This flexibility was essential for efficiently refining the models of luggage and its contents, enabling rapid prototyping and adjustment. Beyond basic polygonal modeling, Blender offers advanced techniques for achieving high levels of realism and detail. Sculpting mode provides a digital workspace analogous to working with traditional clay, allowing the artist to push, pull, and smooth the digital mesh to create organic shapes and complex surface textures that would be exceedingly difficult to achieve with standard editing tools. Furthermore, the software excels in hard-surface modeling, which was particularly relevant for creating mechanical elements like suitcase wheels and zippers. This involves techniques like precision bezier curve editing for creating complex outlines and boolean operations to cleanly combine or subtract shapes from one another. The culmination of this entire geometric process is a detailed, watertight digital asset, ready to be brought to life with materials, textures, and ultimately, integrated into the real-time simulation environment for further application.

The contents of an average passenger’s luggage are typically a reflection of both personal necessity and destination. Commonly, one would find a selection of clothing and footwear suitable for the duration of the trip and the expected climate, neatly folded or rolled. This is accompanied by personal hygiene items and toiletries, often stored in a clear, resealable bag to comply with aviation security regulations for liquids. Electronics such as laptops, tablets, smartphones, and their necessary chargers and power adapters are also standard fixtures. For longer journeys, it is common to find entertainment items like books or travel guides. The luggage may also contain miscellaneous yet essential personal items, including medications, sunglasses, keys, and important travel documents, all carefully packed to ensure a smooth journey. Figure 3 presents a selection of common personal items modeled for this project, including a pair of sunglasses, flip-flops, an apple, two bottles, and a set of headphones.

Fig 3. The configured scene within Unity 3D, showcasing a collection of standard

passenger items prior to X-ray simulation.

Shader Programming for X-ray Visualization

Shader programming stands as one of the most intricate and powerful disciplines within real-time graphics development, serving as the fundamental bridge between the mathematical description of a scene and the rich visual imagery rendered on the screen. In the Unity 3D engine, shaders are not merely optional effects but are essential programs that execute directly on the graphics processing unit (GPU). Their primary function is to dictate precisely how every single pixel, vertex, or fragment of geometry should be drawn, calculating everything from an object’s basic color and texture to the complex interplay of light, shadow, transparency, and reflection upon its surface. This process transforms raw 3D model data and scene information into the final, cohesive image that the user perceives, making shaders the cornerstone of defining a game or simulation’s visual identity and realism. Unity provides a sophisticated and layered framework for authoring these critical programs, catering to a wide spectrum of complexity and developer expertise. For many common visual effects, artists and developers can utilize Unity’s built-in shaders or craft custom visuals without writing code through the Shader Graph tool. This node-based interface allows for the visual creation of shaders by connecting nodes that represent mathematical operations, textures, and lighting models, making advanced shading techniques more accessible. However, for achieving truly unique or highly optimized visual phenomena, writing code directly is often necessary. This is primarily done using HLSL within Unity’s custom ShaderLab framework (“A Digital Twin Model of Three-Dimensional Shading for Simulation of the Ironmaking Process,” n.d.). A shader program in this context is typically composed of two key functions: the vertex shader and the fragment shader. The vertex shader processes each vertex of a 3D model, responsible for transforming its position from 3D model space into 2D screen space and preparing data such as normals and texture coordinates for the next stage. The fragment shader, also known as a pixel shader, then takes over to determine the final color of each individual pixel rendered for that object. This is where the most visually impactful calculations occur, including sampling texture maps, applying lighting equations like the Physically Based Rendering (PBR) model, and creating effects like emission, refraction, or dissolution. The practical applications of shader programming in Unity are virtually limitless, defining the entire mood and aesthetic of an experience. Beyond simply applying a color or an image to a surface, custom shaders can simulate a vast array of materials and states. They can create the illusion of water with rippling waves and reflective caustics, generate the dynamic, heat-distorted appearance of fire, or render skin that exhibits realistic subsurface scattering. In the context of simulation and serious games, shaders are equally pivotal. For instance, a project might require a shader that mimics the specific visual output of an X-ray scanner, interpreting the density of virtual objects and rendering them with a false-color translucency that reveals their internal structures. Ultimately, mastering shader programming in Unity is about mastering the art and science of light and perception, enabling the creation of not just graphics, but believable and immersive visual worlds.

This work utilizes the HLSL language to modify model visuals, aiming to replicate the appearance of X-ray images from security checkpoint stations. In reality, the permittivity of materials to X-rays varies; for instance, more radiation penetrates silk than metal. Simulating an X-rayed object involves more than simply adjusting the alpha transparency component of an RGBA color. These objects also exhibit distinct visual changes at their edges. In X-ray imaging, the rim of an object is more pronounced than its interior. To simulate this effect, we begin by creating a vertex shader function in HLSL (Listing 1).

Listing 1. The core vertex shader function responsible for processing object geometry within the X-ray simulation.

In HLSL for Unity, the UnityObjectToClipPos function is a fundamental transformation tool that converts a vertex position from local object space directly into homogeneous clip space. This essential operation handles the combined transformations of the object’s model matrix, the camera’s view matrix, and the projection matrix in a single, optimized step. It is the standard and most efficient method within the vertex shader to prepare vertices for the rasterization process, ensuring they are correctly positioned on the screen. Using this built-in function is preferred as it automatically accounts for platform-specific differences in coordinate systems, guaranteeing consistent rendering behavior across all of Unity’s target platforms. The ObjSpaceViewDir function in HLSL for Unity is a utility designed to provide the view direction vector from a given point in object space towards the camera. It calculates the vector that points from a specific vertex or fragment’s position (in object coordinates) to the current camera’s position, also transformed into object space. This is particularly useful for effects like rim lighting or reflective shading that require knowing the orientation of a surface relative to the viewer, but within the object’s own coordinate system. Using this built-in function abstracts away the complexity of manually transforming the camera’s world-space position, ensuring correct and consistent results across different rendering scenarios in Unity. The smoothstep function in HLSL for Unity performs a smooth Hermite interpolation between two values. The smoothstep function operates on three parameters: a minimum threshold, a maximum threshold, and an input value to be evaluated. In our specific case, the input is the dot product between the normalized surface normal and the camera’s view direction. This value is then smoothly interpolated between a lower bound of 1 – _RimWidth and an upper bound of 1.0. The function returns 0.0 if the input is less than the lower edge and 1.0 if it is greater than the upper edge. For input values between the two edges, it smoothly and gradually blends between 0 and 1, resulting in an S-shaped curve. This S-curve is invaluable for creating aesthetically pleasing transitions, anti-aliasing sharp edges, and controlling values like opacity or intensity without the harsh visual artifacts of a simple linear step function. It is a fundamental tool for crafting high-quality shader effects. In the final step, we multiply the object’s color value by the adjustable RGBA vector _RimColor to reproduce the effect of X-ray image coloring.

In the next stage of the rendering pipeline, the fragment shader calculates the final color of each pixel based on the interpolated data from the vertex shader (Listing 2).

Listing 2. The fragment shader function implementing the X-ray visualization model in HLSL.

The tex2D function in HLSL for Unity is the essential instruction for sampling a texture. It fetches a color value from a specified texture at a given set of texture coordinates. The function requires two primary parameters: the sampler representing the texture itself and a float2 coordinate (UV) that defines the specific texel to retrieve. This operation is fundamental to applying surface details, colors, and patterns to 3D models within a shader. The GPU’s texture unit performs this sample, often utilizing pre-configured filtering modes to smoothly interpolate between texels, which is critical for producing high-quality, anti-aliased images when textures are scaled or viewed at a distance. In our solution, we introduced an adjustable transparency to the texture’s RGBA color vector, which represents X-ray permittivity. This was implemented using a _Trans parameter, with a value range from 0.0 to 1.0. To better replicate the distinctive look of an X-ray image, we added a custom _Opacity parameter to control the overall contrast of the effect. Figure 4 shows the Unity3D interface panel that allows the user to control the visual properties of an X-rayed material.

Fig 4. The Unity3D interface panel for adjusting the visual properties of the X-ray material simulation.

Physics-Based Gravity Simulation

Physics-based gravity simulation forms a critical component of realistic interaction within virtual environments created in Unity 3D. At the heart of this capability lies NVIDIA’s PhysX engine, a robust and highly optimized physics middleware fully integrated into Unity’s core systems. This engine provides a deterministic framework for simulating physical behaviors, with gravity acting as a fundamental and constant force influencing every dynamic object within a scene. By default, Unity applies a global gravity vector, typically pulling objects downward along the negative Y-axis of the world space, mimicking the effect of Earth’s gravity. This universal force ensures that objects with Rigid-body components will automatically accelerate downward when unsupported, resulting in motion that feels authentic and intuitive to the observer. The simulation of gravity, however, extends far beyond merely making objects fall (Abella and Demircan, 2019). The true complexity and realism emerge from the interaction between this constant force and other elements of the physics engine. When a falling object collides with another, the engine calculates the resulting impact based on properties like mass, velocity, and the physical material properties assigned to each object, such as bounciness and friction. This allows a heavy suitcase to land with a definitive thud and remain stable, while a lighter, bouncier object like a virtual tennis ball might rebound and continue moving. Furthermore, gravity works in concert with constraints and forces to create complex interactions. For instance, an object attached to a spring joint will oscillate under the influence of gravity, while an object being swung on a virtual rope will exhibit pendulum-like motion. This intricate combination of gravity, collision detection, and force application allows developers to simulate everything from the simple stacking of items in a container to the chaotic, realistic collapse of a structure. The applications for such simulations are vast and critical for achieving immersion. In game development, it is essential for creating believable puzzles, satisfying combat mechanics, and environmental storytelling. Beyond entertainment, physics-based gravity is indispensable for creating accurate digital twins and training simulations. For example, in a project simulating airport security screening, accurately modeling how objects of different weights, shapes, and sizes settle and orient themselves inside a suitcase under the influence of gravity is paramount for generating a realistic and useful training scenario for operators. Developers can finely tune the simulation by adjusting global gravity strength for different environments or applying individual forces to specific objects, offering immense flexibility. Ultimately, Unity’s physics system provides a powerful and accessible toolkit for imbuing virtual worlds with the consistent, predictable, and interactive physicality that is foundational to user engagement and simulation fidelity.

In this project, all objects placed inside the suitcase are contained within a collider box, which was scaled to match the suitcase’s dimensions. These objects were configured as rigid bodies in Unity3D to interact with the physics engine. We then enabled gravity simulation. Consequently, when the suitcase is rotated around a given axis, the movement of the internal items is visible due to the X-ray visualization. This functionality of our digital twin allows for X-ray analysis from various angular perspectives. It can also be used to reconfigure the placement of items within a passenger’s suitcase. This simulation is valuable as luggage undergoes a long journey from the airplane to its owner, and its internal contents can shift significantly if not perfectly secured during transit.

Results and Discussion

In this section, we evaluate our digital twin output against the real images that come from security check in x-ray machines. X-ray baggage scanners are a critical component of modern security infrastructure, operating as the first line of defense in a wide array of environments. Their primary function is to non-invasively inspect the contents of luggage, bags, and parcels to identify potential threats, contraband, or prohibited items without the need for physical unpacking. The technology is based on the principle of differential absorption. As an object passes through the scanner on a conveyor belt, it is exposed to a low-dose X-ray beam. Dense materials, such as metals or ceramics, absorb more of this radiation and appear in darker shades of blue or black on the operator’s screen. Less dense organic materials, like food, plastics, or textiles, absorb less radiation and are typically rendered in shades of orange or yellow. This color differentiation provides security personnel with an immediate visual understanding of the contents, allowing them to distinguish between a harmless water bottle and a potentially hazardous object. These systems are indispensable at airports, government buildings, courthouses, correctional facilities, and major public events, where they ensure safety by deterring and detecting dangerous items with efficiency and speed. The Krystal Vision X-Ray Baggage Scanner represents a specific implementation of this core technology, often designed with a focus on reliability and performance for demanding security checkpoints (“Baggage Scanner Manufacturers – Krystalvision,” n.d.). This scanner is engineered to deliver high-resolution imaging, which is essential for operators to clearly discern fine details and overlapping objects within a bag. A key feature frequently highlighted is its material discrimination capability, which uses advanced algorithms to automatically assign distinct colors to organic, inorganic, and mixed materials, thereby simplifying the identification process. The system is built with operator ergonomics in mind, featuring a user-friendly interface with image manipulation tools such as zoom, reverse view, and edge enhancement to aid in thorough inspection. Safety is paramount, and the Krystal Vision scanner incorporates multiple shielding and interlock systems to ensure that X-ray radiation is contained entirely within the tunnel, posing no risk to operators or passersby. It is constructed for continuous operation in high-throughput environments, making it a suitable choice for facilities that require a robust and dependable security solution to maintain a secure perimeter and protect critical assets. Figure 5 presents a genuine X-ray image of a suitcase and a backpack, captured by a Krystal Vision X-Ray Baggage Scanner. The scan reveals a typical arrangement of passenger belongings, including various electronics, articles of clothing, and everyday toiletry products. The scanner’s material discrimination capability is clearly demonstrated by the color coding of the luggage itself; some suitcases are composed of organic materials, indicated by their orange hue, while others constructed from inorganic polymers are rendered in green. Metallic objects within the baggage, such as electronic components or zippers, appear with pronounced clarity and density. This high visibility is intentional, as the system’s color palette is optimized to highlight potentially hazardous items, which are most often metallic in nature. This real-world scan from Figure 5 serves as a critical reference point for evaluating our digital twin model of the X-ray imaging process. For a direct comparison, Figure 6 displays a digitally simulated X-ray of an identical set of luggage and items. A primary observation is the enhanced clarity of the synthetic images generated by the digital twin. This superior definition arises from the absence of real-world electromagnetic interference within the simulated environment. In a physical scanner, this electromagnetic noise introduces various distortions that degrade image quality. Specifically, it can manifest as impulse noise, appearing as random white and black specks akin to salt-and-pepper patterns, or as grain noise, which presents as a more uniform, textured artifact that can obscure fine details. These noise types are visibly apparent in the original scanner image (Figure 5) and represent key challenges in real-world security screening that our model aims to simulate and account for in future iterations.

Fig 5. Representative X-ray images of baggage obtained from SIXray

dataset under ACADEMIC PURPOSES license (Miao, 2019SIXray).

 

Fig 6. Output of the digital twin: simulated X-ray visualizations of baggage for

 comparison with real scanner images.

The next step in our discussion is the security problem of dangerous items inside the luggage. We know that the airport security checkpoint serves as a crucial barrier, designed to intercept items that threaten the safety of an aircraft and everyone on board. The range of dangerous objects discovered in passengers’ luggage is surprisingly varied, stemming from innocent forgetfulness to deliberate malicious intent. Perhaps the most widely recognized prohibited items are firearms and explosives. Even a single bullet, often forgotten in a jacket pocket from a previous hunting trip, can trigger a major security incident. Similarly, replica or toy weapons are treated with extreme seriousness as they can be indistinguishable from real ones on an X-ray screen and could be used to threaten crew and passengers. Beyond obvious weapons, many common household items become hazardous in the pressurized environment of an aircraft cabin. A simple can of aerosol spray, a bottle of bleach, or even common matches are considered dangerous goods. These items are flammable or corrosive and can fuel a fire or cause a chemical reaction that compromises the aircraft’s systems. Similarly, seemingly harmless lithium-ion batteries, found in power banks and personal electronic devices, pose a significant risk of overheating and igniting if they are damaged or defective. Figure 7 shows an example of a dangerous item concealed within a suitcase, where a revolver is easily identifiable.

Fig 7. The digital twin’s X-ray simulation of a suitcase used for threat

 detection analysis, featuring one prohibited object.

Passengers are sometimes surprised to learn that even certain tools and sporting goods are prohibited in carry-on baggage. A heavy wrench or a hammer could be used as a blunt-force weapon, while a baseball bat or a golf club has the potential to cause severe harm. The overarching principle of aviation security is to eliminate any object that could be used to intimidate, injure, or overpower individuals on board or to damage the aircraft itself. This is why security personnel are trained to be thorough and unwavering in their inspections, ensuring that every bag cleared for travel is free from these potential threats. The vigilance of both passengers, who are expected to pack responsibly, and security staff, who are trained to identify these risks, is fundamental to maintaining the integrity of air travel.

Conclusions

The development of a digital twin for an X-ray security check-in system demonstrates significant utility across multiple domains. This simulation provides an invaluable virtual environment for testing and refining image processing algorithms, allowing for rapid iteration without the need for physical hardware or real passenger luggage. Furthermore, it serves as a powerful training tool for security personnel, offering a risk-free platform to practice threat recognition and familiarize themselves with the visual characteristics of various materials under X-ray scrutiny. The ability to programmatically manipulate scenarios, such as randomizing item placement, adjusting material properties, and simulating different angles of inspection, greatly enhances the robustness of security protocols. By simulating the complex physical interactions of items within luggage, including their movement during handling, the digital twin offers a more realistic and dynamic training experience than static image libraries. Ultimately, this technology proves to be a cost-effective and efficient method for advancing security training, accelerating system development, and improving the overall reliability of baggage screening processes. 

References

  • A Digital Twin Model of Three-Dimensional Shading for Simulation of the Ironmaking Process [WWW Document], n.d. URL https://www.mdpi.com/2075-1702/10/12/1122 (accessed 9.25.25).
  • Abella, J., Demircan, E., 2019. A Multi-body Simulation Framework for Live Motion Tracking and Analysis within the Unity Environment. In: 2019 16th International Conference on Ubiquitous Robots (UR). Presented at the 2019 16th International Conference on Ubiquitous Robots (UR), pp. 654–659.
  • An, G., Park, J., Lee, B., Yoon, S., Seo, H., 2024. Development of prototype backscatter X-ray security scanner for luggage inspection. J. Inst. 19, C01034.
  • Baggage Scanner Manufacturers – Krystalvision [WWW Document], n.d. URL https://krystalvision.co.in/sub_category/1/baggage_scanners (accessed 9.25.25).
  • Can, O., Turkmen, A., 2023. Digital Twin and Manufacturing. In: Karaarslan, E., Aydin, Ö., Cali, Ü., Challenger, M. (Eds.), Digital Twin Driven Intelligent Systems and Emerging Metaverse. Springer Nature, Singapore, pp. 175–194.
  • Comparative Study of Digital Twin Developed in Unity and Gazebo [WWW Document], n.d. URL https://www.mdpi.com/2079-9292/14/2/276 (accessed 9.25.25).
  • Dawid, A., Buchwald, P., 2024a. The The influence of the grain noise on the recognition of baggage X-ray security check – a digital twin study. Inżynieria Bezpieczeństwa Obiektów Antropogenicznych 131–143.
  • Dawid, A., Buchwald, P., 2024b. The system of headlights operation recognition using the digital twin method. International Journal of Electronics and Telecommunication 70, 51–58.
  • Digital Twin for Urban Planning in the Green Deal Era: A State of the Art and Future Perspectives [WWW Document], n.d. URL https://www.mdpi.com/2071-1050/14/10/6263 (accessed 9.25.25).
  • Gaus, Y.F.A., Bhowmik, N., Akcay, S., Breckon, T., 2019. Evaluating the Transferability and Adversarial Discrimination of Convolutional Neural Networks for Threat Object Detection and Classification within X-Ray Security Imagery. In: 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA). Presented at the 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), pp. 420–425.
  • Gislason-Lee, A.J., 2021. Patient X-ray exposure and ALARA in the neonatal intensive care unit: Global patterns. Pediatrics & Neonatology 62, 3–10.
  • Haghshenas, A., Hasan, A., Osen, O., Mikalsen, E.T., 2023. Predictive digital twin for offshore wind farms. Energy Inform 6, 1.
  • Jaafar Ghalib Jabbar Lftta, A.N.A.A.Z., Ali Hadi Kazem Nasser, A.N.S., 2024. X-Rays and Their Uses on The Human Body. Current Clinical and Medical Education 2, 91–115.
  • Javaid, M., Haleem, A., Suman, R., 2023. Digital Twin applications toward Industry 4.0: A Review. Cognitive Robotics 3, 71–92.
  • Maciel, A., Halic, T., Lu, Z., Nedel, L.P., De, S., 2009. Using the PhysX engine for physics-based virtual surgery with force feedback. The International Journal of Medical Robotics and Computer Assisted Surgery 5, 341–353.
  • Mansour, D.-E.A., Numair, M., Zalhaf, A.S., Ramadan, R., Darwish, M.M.F., Huang, Q., Hussien, M.G., Abdel-Rahim, O., 2023. Applications of IoT and digital twin in electrical power systems: A comprehensive survey. IET Generation, Transmission & Distribution 17, 4457–4479.
  • Mouton, A., Breckon, T.P., 2015. A review of automated image understanding within 3D baggage computed tomography security screening. Journal of X-Ray Science and Technology 23, 531–555.
  • Park, J., An, G., Yoon, S., Seo, H., 2024. Experimental validation of Monte Carlo simulation model for X-ray security scanner. J. Inst. 19, C01050.
  • Parplys, A.C., Petermann, E., Petersen, C., Dikomey, E., Borgmann, K., 2012. DNA damage by X-rays and their impact on replication processes. Radiotherapy and Oncology 102, 466–471.
  • Schauer, D.A., 2011. Does Security Screening with Backscatter X-Rays Do More Good than Harm? Radiology 259, 12–16.
  • Soni, L., Kaur, A., Sharma, A., 2023. A Review on Different Versions and Interfaces of Blender Software. In: 2023 7th International Conference on Trends in Electronics and Informatics (ICOEI). Presented at the 2023 7th International Conference on Trends in Electronics and Informatics (ICOEI), pp. 882–887.
  • Sun, T., He, X., Li, Z., 2023. Digital twin in healthcare: Recent updates and challenges. DIGITAL HEALTH 9, 20552076221149651.
  • Trevisan de Souza, V.L., Marques, B.A.D., Batagelo, H.C., Gois, J.P., 2023. A review on Generative Adversarial Networks for image generation. Computers & Graphics 114, 13–25.
  • Unity Real-Time Development Platform | 3D, 2D, VR & AR Engine [WWW Document], n.d. URL https://unity.com/ (accessed 9.25.25).
  • Wang, Q., Ismail, K.N., Breckon, T.P., 2020. An approach for adaptive automatic threat recognition within 3D computed tomography images for baggage security screening. Journal of X-Ray Science and Technology 28, 35–58.
  • Wang, Z., Han, K., Tiwari, P., 2021. Digital Twin Simulation of Connected and Automated Vehicles with the Unity Game Engine. In: 2021 IEEE 1st International Conference on Digital Twins and Parallel Intelligence (DTPI). Presented at the 2021 IEEE 1st International Conference on Digital Twins and Parallel Intelligence (DTPI), pp. 1–4.
  • Miao, C., Xie, L., Wan, F., Su, C., Liu, H., Jiao, J., Ye, Q., 2019, SIXray: A Large-scale Security Inspection X-ray Benchmark for Prohibited Item Discovery in Overlapping Images,  CVPR, https://github.com/MeioJane/ SIXray

 

Shares