# Simulation > **Warning:** The functionality described in this article is not available in the Community SDK edition. > You should upgrade to [**Sim**](https://l.unigine.com/SdhugY462) SDK edition to use it. ## Crane Winch With Rope This sample shows how to create a winch system with interactive rope simulation. You can rotate the crane, adjust the rope length, change the mass of the attached load, and detach the load to observe the resulting physics behavior. Enabling the *[Visualizer](../../../api/library/engine/class.visualizer_cpp.md)* checkbox in the sample's UI displays the system's response to parameter adjustments. The rope includes an optional tension compensation feature, which helps maintain rope stability and realism under varying loads. This type of winch is suitable for simulation of helicopter operations or heavy duty equipment towing. The rope is implemented as a C++ Component that you can use in your project. **SDK Path:***/source/simulation/crane_winch_with_rope* ## Fire Hose Extinguishing This sample demonstrates how to implement a fire hose system using *[decals](../../../objects/decals/ortho/index.md)* and *[particle](../../../objects/effects/particles/index.md)* collisions. Foam particles are emitted from a hose, interact with the environment, and leave visual marks on surfaces. When aimed at fire sources, the foam gradually extinguishes them over time. Foam decals accumulate and persist for a limited duration, fading and expanding gradually to simulate realistic dispersion. The emitter direction can be set to a fixed angle using the *Angle* slider, or enabled to sweep back and forth smoothly when the *Rotate* checkbox is selected, mimicking realistic hose motion. This approach can be used to simulate fire suppression in interactive gameplay, emergency response training, or realistic firefighting visualizations. **SDK Path:***/source/simulation/fire_hose_extinguishing* ## Fisheye Camera Emulation This sample demonstrates emulation of real fisheye cameras based on the **Kannala-Brandt** panorama rendering mode. Switch between six distortion models on the fly and tune every lens parameter live � from the principal point, focal length, skew, and image circle radius to the distortion coefficients � with the result rendered directly to the main viewport. In *Physical* mode the lens is defined the way real projects do it: by its datasheet (sensor dimensions and focal length in millimeters) or by intrinsics taken from a camera calibration tool, with the pixel-space parameters derived automatically. **Key Features:** - Six distortion models: **Equidistant**, **Orthographic**, **Stereographic**, **Equisolid**, polynomial **F-Theta**, and the calibrated **Kannala-Brandt** model with tangential distortion - Full manual control of the camera intrinsics: focal length, principal point, image dimensions, skew, and image circle radius - *Physical* mode: define the lens by sensor size and focal length in millimeters (with circular or full-frame image circle fit), or feed in calibration intrinsics directly - Vignetting presets: none, natural (the sin(theta)/theta relative illumination law of an ideal fisheye), or custom polynomial coefficients - Chromatic aberration set directly or physically, via the Abbe number of the lens glass - Live readouts of the derived lens data: image circle radius in millimeters, minimum focal length, and the model monotonicity limit. **Use Cases:** - Sensor-accurate camera simulation for autonomous driving, robotics, and drones - Matching synthetic imagery to a real calibrated camera to close the sim-to-real gap - Prototyping and validating lens configurations before committing to hardware. **SDK Path:***/source/simulation/fisheye_sample* ## Floating Buoy This sample demonstrates realistic water interaction in UNIGINE, showcasing both the current state of **[Global Water](../../../objects/objects/water/water_object.md)** control via changing **[Beaufort](../../../objects/objects/water/water_object.md#creating_waves)** levels and the use of fetching the water level at a certain point for a simplified simulation of buoyancy without using physics. **Core Features:** **Global Water Control.** Adjust ocean conditions in real-time using the **Beaufort slider** (0-12). Higher values create stormier waves with enhanced foam and detail. **Optimized Buoyancy System**. Simulates floating objects without full physics collisions. Uses three anchor points for stable wave-following behavior. It then smoothly adjusts the object's position and rotation to match the waves, with calculations based on: - Object mass (customizable) - Global buoyancy coefficient (adjustable via **Buoyancy slider**) - Water surface steepness and wave height. **Use Cases:** - Marine simulations - Weather system prototyping - Performance-sensitive scenes with many floating objects - Games needing stylized water interactions. **SDK Path:***/source/simulation/floating_buoy* ## Flocking This sample demonstrates the simulation and control of flocking behavior (Boids algorithm) for different types of entities, such as birds and fish. Two separate controllers manage the behavior of these groups using common flocking principles like cohesion, alignment, and separation. You can adjust various parameters in real time to observe how they influence the behavior of each flock: - **Cohesion** - strength of attraction toward the center of the flock. - **Spot Radius** - distance within which other units are considered for cohesion and alignment. - **Alignment** - force that aligns a unit's direction with the average heading of its neighbors. - **Separation** - repulsion force that prevents units from crowding too closely. - **Separation Desired Range** - distance threshold for applying separation force. - **Target** - amount of force directed towards target. - **Unit Max Speed** - maximum unit speed. - **Unit Max Force** - maximum steering force applied for movement corrections. - **Unit Max Turn Speed** - how quickly a unit can rotate to adjust direction. Two independent flocks (e.g., fish and birds) demonstrate how multiple controllers can operate simultaneously with distinct settings. Optional debug visualization renders bounding boxes around each flock, helping observe bounds and transitions. **Use Cases** - **Games and simulations** - realistic swarm behavior for birds, fish, insects, crowds, or drones. - **Training AI systems** - testing multi-agent behavior and interaction dynamics. - **Environmental storytelling** - adding life to ecosystems and natural environments. - **Cinematic scenes** - choreographed group movements for visual impact. - **Education and research** - exploring emergent behavior in decentralized systems. **SDK Path:***/source/simulation/flocking* ## High-Level Car Physics System ![](../../../samples/img/cpp_sim_samples_high_level_car_physics_system.jpg) This sample showcases the **High-Level Car Physics System**. To learn more on using the system to create your own wheeled vehicle simulation please refer to **[this article](../../../code/usage/vehicle_physics/index.md)**. **Features:** - Setting engine's power and resistance curves, as well as idle speed (RPM). - Gearbox simulation (manual and automatic) enabling you to adjust throttle and speed values for shifting gears along with transition time, as well as to set the number of gears and configure gear ratios. - A transfer case distributing torque between the axles, with low and high range for off-road driving. - Easy setup of steering and driving axes, with locking of both the interwheel and inter-axle differentials. - Mathematical wheel model for more realistic steering, enabling simulation of forces affecting the rotating wheel, along with an ability to adjust suspension travel distance, spring, and damping values. - Simulation of various surface conditions (such as dry, wet, snow-covered, or icy road, mud, and so on). - Switching between different views (driver's view, external camera, etc.). - Cockpit details: engine and brake sounds, a dashboard with animated gauges, rear-view mirrors, and a steering wheel following the input. - Keyboard, gamepad, and wheel device input working simultaneously. - A set of debug windows displaying information on all vehicle parameters in real time. Fine-Tuning the *Wheel Joystick*: If you use a wheel device, you might need to readjust settings to control the vehicle properly. - Run the sample and press **F3** to visualize the axes. - Check the controls status - which axis each control corresponds to. - If the controls mismatch, open the demo project in UnigineEditor to reconfigure them. Find the **joystick_input** node, it has the **car_joystick_input** property assigned. Adjust the **Joystick Axis** parameter where required. **SDK Path:***/source/simulation/high_level_car_physics_system* ## LiDAR Sensor Advanced Emulation ![](../../../samples/img/cpp_sim_samples_lidar_sensor_advanced.jpg) This sample demonstrates an advanced **LiDAR** sensor emulation for self-driving cars, robotics, and drones. The sensor scans the scene sector by sector and measures the distance and the response intensity for each ray. The measured values are then modified by a set of models that simulate the imperfections of a real sensor. **Key Features:** - Emulation of both **mechanical** (rotating, full 360-degree) and **solid-state** sensors - Configurable **scan rate** (Hz) and **detection range** - **Vertical FOV** defined either by a pair of angles with a given number of channels, or by a file with the exact channel angles of a certain sensor model - **Horizontal FOV** defined by an angle range with a given number of rays - **First**, **Last**, and **Strongest** beam return modes - Response intensity calculated from the physical properties of the surface - **Motion distortion** of the point cloud caused by the movement of the sensor during the scan - **Noise** of the distance and intensity measurement and **dropoff** of weak returns - **Weather affection**: attenuation of the returns by rain, snow, and fog, and false returns from precipitation - Point cloud colored by intensity, distance, or height, and exported to the **LAS** format Click *Show Settings* to open the **Lidar Configuration** window and change the sensor parameter values at runtime. **Use Cases:** - Simulation of autonomous vehicles and robots that require sensor-accurate LiDAR input - Testing of perception and AI algorithms against noisy data and adverse weather conditions - Emulation of a certain sensor model to validate SLAM, localization, and path planning. Each frame a camera renders the sector that the sensor has passed since the previous frame, and a compute shader gathers the distances and the intensities along the rays of this sector. The number of sectors per revolution depends on the **frame rate** and on the **[scan rate](#rotation)**. The width of a sector is proportional to the angle that the sensor passes during one frame: the higher the scan rate or the lower the frame rate, the wider the sector rendered per frame. The width is limited by the maximum view FOV specified in the **LidarAdvanced** component, because a too wide frustum would distort the projection and reduce the accuracy of the measurement. > **Notice:** A high scan rate requires a high and stable frame rate. The **[channels](#angles)** of a real sensor are usually distributed unevenly, being denser near the horizon and sparser at the edges of the vertical FOV. To reproduce a certain sensor, the exact channel angles can be loaded from a **[text file](#lidar_mode)** with one angle in degrees per line. The `channels_dist_files` folder contains `VLP-32.txt` with the channel table of the real *Velodyne VLP-32C* sensor and `channels_distribution.txt` with an arbitrary distribution that shows the effect more clearly. Each point is registered at the position that the surface occupied at the moment the beam reached it. Fast movement of the sensor or of an observed object therefore stretches and skews its point cloud, reproducing the way a real sensor perceives moving objects. The response **[intensity](#intensity)** is calculated from the normal, the roughness, and the metalness taken from the G-buffer. Each of these components can be excluded from the calculation, and its contribution, as well as the base response, can be adjusted. A real beam has a certain width and can be reflected by several objects along its path: by a droplet or a snowflake in the air, by foliage, and by the surface behind them. Each reflection returns to the sensor separately, and the *[Return Mode](#return_mode)* parameter defines which of these returns is kept: - **First** - the nearest return, which makes the sensor detect the precipitation in front of a surface instead of the surface itself. - **Last** - the farthest return, which makes the sensor ignore the precipitation and register the surface behind it. Real sensors use this mode to see through rain, snow, and foliage. - **Strongest** - the return with the highest intensity regardless of its distance. A solid surface usually gives a stronger response than a droplet, but a weak or a distant surface can be overridden by close precipitation. In clear weather, as well as with the *[Weather False Returns](#weather_false)* option disabled, each ray produces a single return, and all the three modes give the same result. The heavier the precipitation, the more false returns appear along the beam and the more the modes differ. No real sensor returns exact values, so the measured distance and intensity are **[distorted](#distortion)** before the point gets into the cloud. The distance is shifted by a constant bias set by *Range Accuracy* and by a random error with the standard deviation set by *Range Std*, which makes flat surfaces slightly rough. The intensity is distorted in two ways at once: it is multiplied by a random factor around 1 (*Intensity Mult Std*) and shifted by a random value around 0 (*Intensity Add Std*). The first one scales with the response itself, while the second one affects weak and strong returns equally. Weak returns are lost completely rather than distorted, which is reproduced by the **dropoff** model. The points with an intensity below *Intensity Threshold* are discarded at once. The remaining ones can be lost in two more ways: *General Rate* discards a given share of the points at random regardless of their intensity, and the pair of *Intensity Limit* and *Zero Intensity* discards weak points with a probability that grows as the intensity approaches zero. Dark, distant, and grazed surfaces are the first to disappear from the cloud. The **[color](#color)** of the points is defined by the **LidarAdvanced** component in *UnigineEditor*. The **Lidar Configuration** window contains the following parameters, grouped into the panels that can be shown and hidden separately: | Parameter | Description | |---|---| | **Scan** | | | Yaw Rays | The number of rays emitted in the horizontal direction. | | Pitch Rays | The number of channels, i.e. the number of rays emitted in the vertical direction. Read-only if the channel angles are loaded from a file. | | Mode | The way the channels are distributed within the vertical FOV: **Uniform** (with an equal step between the channels) or **File** (with the angles taken from a file). | | Angles File | A text file with the channel angles in degrees. Available in the **File** mode only. | | Yaw Min / Yaw Max | The horizontal FOV in degrees. | | Pitch Min / Pitch Max | The vertical FOV in degrees. Read-only if the channel angles are loaded from a file. | | Near Distance / Far Distance | The minimum and the maximum detection distance in units. The returns outside this range are discarded. | | Rotation Hz | The scan rate, i.e. the number of full scans per second. | | Solid State | Scanning only the specified horizontal FOV instead of the full 360-degree circle. | | Return Mode | The return to be kept if a ray produces several returns: **First** (the nearest), **Last** (the farthest), or **Strongest** (the most intense). Has an effect only when the false returns from precipitation are enabled. | | **Dropoff & Noise** | | | Intensity Threshold | The response intensity below which the points are discarded unconditionally. | | General Rate | The probability of losing a point regardless of its intensity. | | Intensity Limit | The response intensity below which the points start to be discarded randomly. | | Zero Intensity | How aggressively the points with an intensity close to zero are discarded. | | Simulate Noise | Enabling the simulation of the measurement noise. | | Range Accuracy (cm) | A constant bias added to all measured distances. | | Range Std (mm) | The standard deviation of the distance measurement error. | | Intensity Mult Std / Intensity Add Std | The standard deviation of the multiplicative and the additive intensity noise. | | **Weather** | | | Simulate Weather | Enabling the effect of the weather on the returns. | | Weather False Returns | Enabling the false returns from droplets and flakes. | | Fog Visibility (m) | The meteorological visibility range used by the fog extinction model. The lower the value, the stronger the attenuation. | | Rain Rate (mm/h) / Snow Rate (mm/h) | The precipitation intensity used by the rain and the snow extinction models. | | **Intensity** | | | Use Roughness / Use Metalness / Use Normal | Taking the roughness, the metalness, and the incidence angle into account when calculating the response intensity. | | Intensity Modifier | The overall multiplier of the response intensity. | | Base Response | The response intensity of a surface with no other components taken into account. | | Roughness Weight / Metalness Weight / Base Weight | The contribution of each component to the resulting response intensity. | | **Visuals** | | | Enable Render | Enabling the visualization of the scan results. | | Render Points | Displaying the point cloud. | | Render Frustums | Displaying the frustums of the cameras that render the sectors. | | Mode | The value that defines the color of a point: **Intensity**, **Distance**, or **Height**. | | Height Min (m) / Height Max (m) | The height range mapped to the color gradient. Available in the **Height** mode only. | | Palette | The color gradient used for the point cloud. Custom palettes can be added via the Editor. | The following parameters are available in the sample description window: | Parameter | Description | |---|---| | Rotation Speed | The rotation speed of the sensor node in degrees per second. Rotating the node during the scan reveals the motion distortion of the point cloud. | | Disable Render | Hiding the scene so that only the point cloud is displayed. | | Show Settings | Showing and hiding the **Lidar Configuration** window. | | Save LAS | Saving the current point cloud to a **LAS** file in the sample world folder. | **SDK Path:***/source/simulation/lidar_sensor_advanced* ## LiDAR Sensor Emulation ![](../../../samples/img/cpp_sim_samples_lidar_sensor_emulation.jpg) This sample demonstrates a realistic **LiDAR** sensor simulation, used in self-driving cars, robotics, robot vacuum cleaners, and drones to map their surroundings. The sensor renders the environment as four views arranged around it that together cover a full 360-degree scan. The distance and the response intensity are measured for each ray, the intensity being calculated from the normal, the roughness, and the metalness taken from the G-buffer. You can tweak its settings (scan range, FOV, resolution, etc.) via API and in *UnigineEditor*. **Key Features:** - Emulated LiDAR using rendered views, from 3 to 8 (4 by default) - Configurable **min/max range, FOV, beam resolution** (number of stacks and slices) - Asynchronous data transfer using *[asyncTransferTextureToImage](../../../api/library/rendering/class.render_cpp.md#asyncTransferTextureToImage_TextureToImageTransfered_TextureToImageTransfered_Texture_void)* - Point cloud rendered via the **PrimitiveRenderer** and colored by intensity - Point cloud export to the **LAS** format via the *Save Lidar Data* button - Optional visual debugging: depth and intensity textures, scan points, and frustums. **Use Cases:** - Autonomous vehicle simulation (robot vacuums, drones, cars) - Autopilot and AI training using virtual LiDAR input - Robot navigation and localization (SLAM, path planning). **SDK Path:***/source/simulation/lidar_sensor_emulation* ## Moving Crane With Rope Slings ![](../../../samples/img/cpp_sim_samples_moving_crane_with_rope_slings.jpg) This sample demonstates how to imitate a crane with sling ropes transferring an object. The scene contains the manipulator with the ropes connected to it. Ropes are also connected to the load, which has *[BodyRigid](../../../principles/physics/bodies/rigid/index.md)* assigned. The connection points are set via **AttachPoint**. You can move the load around the scene by dragging the manipulator with the mouse, and make it interact with the wall also available in the scene. Physics is simulated at 120 fps with 10 iterations to adjust the distance between points. The physics update for the load is adjusted by impulses to ensure proper interaction with the environment. Ropes are created using an arbitrary set of points and *[joints](../../../principles/physics/joints/index.md)* between them. This approach can be used to create any kind of rope or even a net consisting of a number of ropes, a wire, or a primitive *[cloth](../../../principles/physics/bodies/cloth/index.md)*. You can use the sample ropes as a basis for your specific task by configuring their parameters as required. Indices for segments are generated randomly to avoid a linear accumulation of error in joints. **SDK Path:***/source/simulation/moving_crane_with_rope_slings* ## Power Line Wires Sag ![](../../../samples/img/cpp_sim_samples_power_line_wires_sag.jpg) This sample demonstrates how to create wires using the **RopeSystem** component. You can adjust the wire diameter and generate a new mesh based on the updated value. The plane included in the scene can be moved to make the wires swing. Simulating wires doesn't require a high number of physics iterations or a high frame rate, as they typically remain stationary and only swing in place. However, if the wires in your scene are primarily decorative and don't need any physical interaction, consider using a static mesh instead to improve performance. Ropes are created using an arbitrary set of points and *[joints](../../../principles/physics/joints/index.md)* between them. This approach can be used to create any kind of rope or even a net consisting of a number of ropes, a wire, or a primitive *[cloth](../../../principles/physics/bodies/cloth/index.md)*. You can use the sample ropes as a basis for your specific task by configuring their parameters as required. Indices for segments are generated randomly to avoid a linear accumulation of error in joints. **SDK Path:***/source/simulation/power_line_wires_sag* ## RADAR Sensor Emulation ![](../../../samples/img/cpp_sim_samples_radar_sensor_emulation.jpg) This sample demonstrates an **FMCW** (Frequency-Modulated Continuous Wave) **radar** sensor emulation that renders the scene sector by sector and evaluates the radar equation for every pixel on the GPU. The pixel energies are accumulated into resolution cells over range, azimuth, elevation, and radial velocity. Each cell then receives the noise a real receiver has, and the cells that clear a detection threshold are reported as detections. The targets in the scene differ in **backscatter coefficient** (signal reflection rate per square metre) set in UnigineEditor per material with the *radar_gamma_db* [custom parameter](../../../content/materials/custom_parameters/index.md), in decibels. The strongest returns come from the boxes with the highest metalness, the weakest from the ground, and identical-looking objects can differ too, since what a target returns is set by its material rather than by its appearance. Click *Show Settings* to open the **Radar Configuration** window and change the sensor parameter values at runtime. **Key Features:** - Measurement **zones**, each a complete grid of cells over **range**, **azimuth**, **elevation**, and **radial velocity**, with its own cell sizes and gates, which lets a near zone resolve finely and a far one reach further with coarser cells - **Blind volumes** that exclude the parts of the mounting structure from the measurement, so that their returns do not raise the detection threshold around them - Response calculated from the **radar equation**, so that a target is detected by its material, its aspect, and its range, with the two-way antenna taper weakening the returns towards the edge of the FOV - **Radial velocity** measured for every detection from its Doppler shift within a single scan, which is how a moving target is told apart from the static objects at the same range and angles - **Thermal receiver noise** and **signal fluctuation**, which make a weak target flicker between scans instead of being detected every time - **CA-CFAR** (Cell-Averaging Constant False Alarm Rate) detection, where the threshold of a cell follows the background around it, so weak targets are not suppressed in a noisy area and false alarms are not produced in a quiet one. The number of false alarms per scan is drawn from a Poisson distribution around the rate you set - **Measurement jitter** that displaces a detection by the error the sensor would have at its signal-to-noise ratio, so a weak detection is positioned less accurately than a strong one **Use Cases:** - Simulation of automotive and robotic radars for driver assistance and autonomous driving - Testing of detection and tracking algorithms against noise, clutter, and targets that differ in backscatter rather than in shape - Tuning of the CFAR window and the false alarm rate of a sensor ahead of hardware trials - Validation of a sensor placement and of the coverage it leaves A wide field of view is rendered as several azimuth sectors, since a single frustum wide enough for it would distort the projection. The *Sector FOV* parameter sets the width of one sector, and the field of view is split into equal sectors no wider than that. *Render Frustums* outlines them in the scene. A target on the boundary between two sectors is measured once, because the angles of a cell are counted from the sensor and not from a sector. The point clouds of *Render Detections* and *Render Raw Cells* are drawn with no depth test, so a point stays visible through the geometry in front of it. The measurement zones and the blind volumes are edited in the properties of the **Radar** component in UnigineEditor, because changing them rebuilds the cell grid. A grid that cannot be built is reported to the console, naming the parameter to change. > **Notice:** A zone measures velocity only within a limited range, and a target moving faster is reported at a wrong velocity, as an FMCW receiver would report it. **SDK Path:***/source/simulation/radar_sensor_emulation* ## Robot Arm Manipulator ![](../../../samples/img/cpp_sim_samples_robot_arm_manipulator.jpg) This sample demonstrates how to build a physics-based robotic arm with a kinematic chain composed of six links: one fixed and five movable. Each movable link is connected via a hinge joint (*[JointHinge](../../../principles/physics/joints/index.md#hinge)*) and driven by a motor that responds to keyboard inputs. The arm's **end effector** is a **magnetic gripper** capable of **grabbing, holding, and releasing** dynamic objects in its environment. The gripper and each joint can be controlled independently via key bindings, which are configurable and demonstrated in the *Controls* section. This setup provides a flexible starting point for creating custom robotic arms with any required number of degrees of freedom (DoF). You can replace manual input with a control system (e.g., inverse kinematics, AI, joystick, or ROS integration) to adapt the robot arm to your specific use case. **Use Cases:** - **Simulation & prototyping** of industrial robotic manipulators. - **Educational environments** to teach principles of robotics, joint control, or physics-based animation. - **AI training** for robotic arms using reinforcement learning or motion planning. - **Human-machine interfaces**: test robotic interaction with dynamic environments. - **Virtual reality** robotics simulations or operator training. **SDK Path:***/source/simulation/robot_arm_manipulator* ## Segmentation This sample shows how to build **segmentation masks** using the **SurfaceID** buffer, which stores the identifiers of nodes and materials together with the custom parameters you assign to surfaces and materials yourself. Segmentation masks can be used to isolate the surfaces sharing the same value, for example for training and validating perception systems. A mask is produced by a postprocess material that takes one value out of the **SurfaceID** buffer for every pixel, turns it into a color, and renders it into a texture shown in one of the seven **WidgetSprite** views. Surfaces sharing a value share a color, and untagged surfaces stay black. The views demonstrate how scene objects can be tagged by different criteria: - **Node ID** and **Material ID** - the identifiers written by the Engine itself. Every node gets a color of its own, while objects sharing a material share a color. - **Custom Surface Param** views - a custom parameter set per surface: the primitives of one kind (e.g., boxes) in the scene share the same value, regardless of the material each of them uses. Each of the four views reads a different **layer** of the buffer: **Scene** shows the combined result, while the other three show only opaque geometry, only transparent geometry, and only decals. With *Multilayered* disabled, the nearest surface overwrites the rest, and the **Transparent** and **Decal** views stay empty. - **Custom Material Param** - a custom parameter set per material: each material ball in the scene is built of two surfaces sharing a single material, so all the surfaces using this material resolve to a single color in the mask, while a surface parameter would color just one of them. Toggling *Multilayered* recompiles the shaders, and the sample waits for the recompilation to finish before drawing the next frame. The *Status* box describes the surface the sliders are applied to: the ID of its material, which parameters have been given a value on it instead of the default one, and how many bytes one surface takes up in the parameter buffer. The scene itself is rendered once. For opaque geometry the **SurfaceID** values are one of the G-buffer targets, filled by the same pass that writes albedo, normals, and velocity, so the seven views only read what is already there and no geometry is drawn again for any of them. The postprocess materials are built as **[material graphs](../../...md)**. To get the value it has to visualize, each material fetches it from the **SurfaceID** buffer with one of these nodes: - *Surface Parameters* - used by six of the materials. It can return the node ID, the material ID, or the custom surface parameter, and its *Type* option chooses the layer to read from: **Scene**, **Opaque**, **Transparent**, or **Decal**. - *Material Parameters* - used by the seventh one, returning the value stored in the material. The value is then turned into a color: the **Node ID** material does it with the *Id To Color* node, which spreads neighboring identifiers into visually distinct colors, and the other six multiply the value by a color and wrap the result with the *Frac* node. A custom surface parameter is stored per surface, outside the material, while a custom material parameter is stored in the material itself and applies to every surface using it. Neither of them clones the material or recompiles shaders, so objects with different values keep sharing one material and stay in the same draw call. The **SegmentationRenderViewports** component subscribes to the *Begin Post Materials* render event and, for every view listed in its *Viewports* array, renders the assigned postprocess material to a temporary texture, copies the result into a texture of the view size, and displays it in a **WidgetSprite**. The *Layout* group of the component defines the size of a view, the position of the grid, the number of columns, the spacing, and whether the titles are shown. The surface the sliders are applied to is set by the *Target* and *Surface* parameters of the **SegmentationSample** component in UnigineEditor. **SDK Path:***/source/simulation/segmentation* ## Ship Buoyancy (High-Accuracy Voxel Approximation) This sample demonstrates how to implement **physically accurate buoyancy** for objects floating on **[Global Water](../../../objects/objects/water/water_object.md)**. A grid of virtual volume elements is generated around a physical body using its surface. Each voxel in the grid is evaluated to determine whether it lies above or below the water surface. Submerged voxels are visualized in blue. For every voxel below the water surface, the system: - Calculates and applies distributed **buoyant forces**. - Applies **[linear and angular damping](../../../principles/physics/bodies/index.md#damping)**. You can also define a **custom [center of mass](../../../principles/physics/bodies/index.md#mass_center)**, and optionally enable **debug visualization** of force directions, and sampling points via API. Use the **Beaufort** slider parameter to adjust wave intensity. **Use Cases:** - Marine simulations involving boats, ships, debris - Performance-sensitive scenes with many floating objects - Games needing stylized water interactions. **SDK Path:***/source/simulation/ship_buoyancy_high_accuracy_voxel_approximation* ## Ship Buoyancy (Physical) This sample demonstrates how to implement **physically accurate buoyancy** for dynamic objects floating on **[Global Water](../../../objects/objects/water/water_object.md)**. A physical body is divided into a grid of virtual volume elements, each sampled independently for water height. Based on how much of each cell is submerged, the system: - Calculates and applies distributed **buoyant forces** - Adds appropriate **torque** to simulate rotation - Applies **linear and angular damping** depending on submerged volume. You can also define a **custom center of mass**, and optionally enable **debug visualization** of submerged sections, force directions, and sampling points via API. Use the **[Beaufort](../../../objects/objects/water/water_object.md#creating_waves)** slider parameter to adjust the wave intensity of the **[Global Water](../../../objects/objects/water/water_object.md)** object. This approach is useful for games and simulators involving boats, ships, debris, or physics-based water interactions. **SDK Path:***/source/simulation/ship_buoyancy_physical* ## Thermal Sensor Emulation The sample demonstrates the use of **[post_sensor](../../../content/materials/library/postprocess/post_sensor/index.md)** postprocess materials for meshes and decals to create the effects for real-time sensor simulation of optical sensors in the EO (Electro-Optical) or IR (Infrared) passband (thermal, enhanced night vision, Forward-Looking Infrared (FLIR)). For detailed information about each effect, refer to the descriptions on the plates in the scene. **SDK Path:***/source/simulation/thermal_sensor_emulation* ## Tracked Vehicle (Physical) This sample demonstrates how to imitate the vehicle tracks using physical (i.e. having body and shape) track plates, wheels, and hinge joints (**[JointHinge](../../../principles/physics/joints/index.md#hinge)**). It illustrates how physical tracks behave on interacting with various obstacles and when rotating depending on the vehicle speed. **SDK Path:***/source/simulation/tracked_vehicle_physical* ## Tracked Vehicle (Simple) This sample demonstrates how to imitate the vehicle tracks using non-physical (i.e. without body assigned) track plates, wheels, and joints (**[JointWheel](../../../principles/physics/joints/index.md#wheel)**). It illustrates how non-physical tracks interact with various obstacles. **SDK Path:***/source/simulation/tracked_vehicle_simple*