Infrared Search and Track System

This is a fairly complex topic
I am trying to make an infrared tracking system for IR missiles. I know how to do the guidance system, however, I have no clue where to start for actually making a realistic infrared seeker detect heat signature. An IR seeker has a search cone, it looks in a certain direction with infinite distance and has an angular diameter that limits how far off the target can be from its line of sight. So basically, if the angle between the direction to the target and the seeker look direction is more than a certain angle, the seeker cannot track the target.
The issue that I’m stumped on is that there can be hundreds of objects in the workspace with assigned heat signature values, and even with CollectionService, looping through all the instances with heat signature values to determine whether or not it’s within the missile seeker search cone is way too slow. It should scan several times a second. Another method I thought of was to cast a bunch of rays within the limit of the search cone to detected whether or not an object with heat signature is passing in front of the seeker, however, that isn’t viable either as a seeker can see for several kilometers out and the rays are very likely to completely miss objects because of the gaps. I honestly have no idea what to do.
I don’t know how War Thunder modeled it, but they did it very well. Nearly every moving object has a heat signature. A missile can lock on not only to the plane’s engine, but also the heated gas behind it, it can be decoyed by countermeasures (burning strips of magnesium), it can track the rocket plumes of another missile, bullet tracers, the sun, the moon at night, and even a burning tank on the ground. There is even an IRST system similar to radar. Speaking of which, radar is also very well modeled in War Thunder, it’s similar to infrared, but more impressive is the fact that even ground reflections are modeled. On normal search and track mode instead of pulse-Doppler, you can see a green haze on the radar when the radar is reflected by the ground. In addition, for both radar and infrared search, a single scan across the sky takes a fraction of a second and with the newer radars like the AWG-9, the radar can easily detect a target over 50km, so there’s noway radar and infrared are modeled using something like raycast. Anyone got any ideas? I suspect Gaijin developers use something much more low-level, similar to raytracing. Is that something that I can make on Roblox?

If you have difficulty visualizing what I’m trying to describe, please visit these YouTube videos:
Early Infrared Missiles
Radar Systems

1 Like

The looping through thing might work if you do not have too many parts, just loop through and raycast to each one. However this may start to slow down if there are many parts.

War thunder uses a much faster and more powerful language so it probably does something like this

Considering the addition of missiles like the AIM-9M with an insane tracking rate, nearly once every frame, I highly doubt that it iterates through an array of every single object with heat signature and evaluate the relative angle and distance. Surely they’ve come up with a more efficient method.

Maybe you can look into boids. Then create attractors, which have strength of temperature. Your projectile will be a boid, which’ll travel towards the attractor. Should automatically switch targets when you create flares and stuff

I’m more concerend about sensors, not missile guidance.

Im typing out an essay, give me a few min.

I’ll give this one a shot, I don’t quite understand mathematically how this would work, but with my background in computer computations and data structures/algorithms, I may be able to point you in the right direction.

With that let’s address the first concern that comes to mind. One practical approach to managing the multitude of objects in the game, along with their corresponding heat signature values, is through a technique called spatial partitioning. This is essentially the practice of segmenting the 3D game space into smaller, more manageable regions, each of which tracks the objects within it. This way, when you need to locate objects within a specific distance or angle, you only need to sift through objects in the relevant regions rather than all objects in the entire game space.

A commonly used form of spatial partitioning is a grid or voxel system. In this method, you break down the 3D space into uniform cubes. When an object moves, you calculate its new location and update the corresponding cube in the grid. To identify nearby objects, the system checks the cubes that overlap with the search area.

That being said, there are more advanced systems, such as octrees or k-d trees, that might be even more effective. These data structures segment the game space adaptively based on how objects are distributed, making them quite adept at handling areas with different object densities.

The second issue is the detection of heat. In terms of detecting heat signatures, one way to streamline this process is by assigning each object a “heat” value. Instead of replicating the complex physics of infrared light, you can take a simpler approach. By conducting a distance and angle check, the system can ascertain whether an object is within the seeker’s field of view. Furthermore, the object’s heat value can affect its detectability. For instance, objects with higher heat values can be detected from further away or at wider angles.

While this method may not mirror reality in every detail, it offers a good enough approximation for a gaming environment. If you want a higher degree of realism, you could consider more advanced techniques like ray tracing or radiosity. But keep in mind that these techniques are generally more complex and require more computational resources.

Now, let’s actually talk about a high-level implementation of this system.

First, create a 3D array or an equivalent data structure to represent the grid. Each cell in the grid can hold a list that contains references to the objects within that cell.

Second, when an object moves, identify its new cell based on its updated position. You can do this by dividing the object’s coordinates by the cell size and rounding to the nearest whole number. Then, move the object from its old cell and add it to the new one.

third, if your seeker needs to find nearby heat sources, it can just check the cells that fall within its search cone. To do this, go through the cells in the grid one by one. For each cell, calculate the angle between the seeker’s viewing direction and the direction of the cell. If this angle is smaller than the seeker’s field of view, add the objects in that cell to a list of potential targets.

Finally, for each potential target, calculate the actual angle to the target and compare it with the seeker’s field of view. This will help you figure out whether the target is visible. At this point, you can also take into account the target’s heat value to see if it’s hot enough to be detected.

A good understanding of graph theory may be required to fully understand how to do this, but overall the concepts should be well understood. There are tons of online resources to help figure out how exactly to implement the math behind this, the hard part is going to be the limitations of ROBLOX.

2 Likes

it works!
although i wasn’t rlly able to show it in the video, each one of those flares (glowing smoke) have heat signatures and i was able to acquire lock on them, not just the plane’s engine

Made with Clipchamp
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.