Weather Radar Help

I am struggling on creating a Weather Radar system. How could I create a weather radar system? Similar to this…


and yes thats in roblox

3 Likes

Analysis

This appears to be a SurfaceGUI on top of some Part rendered on the Server. One could also show a client GUI version with similar code. It looks like there is a core map that is shown (presumably static) with an overlay of a IR Rainfall visualization and also a Tracking Icon for a Tornado or something.

Approach

Assuming this is all true, then here is how I would do it:

Start Simple

  1. Build a simple Local Client GUI with a base Frame (maybe nested)
  2. Add an ImageLabel to the Frame and expand it 100%, assign a Z-index of say 10
  3. Add another ImageLabel for the Rainfall color bands, assign a Z-index of say 20
  4. Add a Frame with an ImageButton and Text Label for the Tornado tracker, assign z-Index of 30
  5. Find or Create Radar Shapes that you can select from and reuse (maybe 8)
  6. Tween the movement and rotation of the Radar image (run tween 3-15 seconds, then Re-Tween)
  7. Tween the movement of the Tornado (run tween 3-15 seconds, then Re-Tween)

Weather GUI Handler

I would add a LocalScript and a ModuleScript to manage the overall process. The LocalScript would simply load the ModuleScript on the client. I’d subscribe to RemoteEvents which update the Weather with vector directions and durations. Upon these events, I’d cancel or expire ongoing Tweens, and create new Tweens with changes in location, direction and rotation for the radar images and tracking icon. I would also get updated text data for the Tracking Icon label.

WeatherUpdate Module

I’d then create both a Script and a ModuleScript on the Server. The Script would simple load the ModuleScript on the Server which would use a CoRoutine to intermittently update the weather and emit weather events to the clients every 3-15 seconds. These events would include parameters for: Storm Location, Storm Direction, Rainfall Intensity, Tracker Location, Tracker Direction, Tracker Text, and Duration.

Enabling SurfaceGUI

After getting this all working on the clients, I’d then pursue Server-side support for this using SurfaceGUIs. That involves adding a new Script on the server hosting part to load the GUI ModuleScript (instead of loading it with a LocalScript). It also involves adding BindableEvents and triggering them in addition to, or in lieu of, the RemoteEvents. You can do both, or disable what you don’t need for now with flag variables / config.

Future Capabilities

It’s possible you might need additional options:

  • Supporting Multiple Tracked Storms
  • Supporting Multiple Tracked Rainfall Blobs
  • Supporting Different Visualizations for Sleet, Hail, Snow, and Wind
  • Smoothing Changes to Weather Position with Vector Arithmetic
  • Allow for Zoomable Maps

Dynamically Drawing Radar Shapes?

It seems difficult to try to draw or render your own colored radar blobs on the GUI. I understand several ways to approach that, but each has issues. Since there is no Canvas support, you can use multiple overlapping GUI objects with rotations and scaling to get some benefit. However, this hampers the alpha blending options when overlaid, and it requires reusing base shapes that are overly geometrical (e.g. circles, ellipses, etc.).

It’s better to go with 8 to 16 distinct solid, pre-defined shapes on an image with a transparent background, and then using Slicing to pick the right shape. You can then scale the result if needed as well, and rotate it.

Why Not use GUI Elements as Pixels?

You can roll-your-own GUI drawing library which deploys GUI elements as pixels. You can use Bezier curve equations to draw your own clouds. I recommend not doing that.

Why Not in 3D?

You could consider doing this with advanced client-side 3D rendering (not-GUI). Here you could roll your own cloud layers using particle effects and maybe 12-24 ParticleEmitters. It would look very different, but very cool. I recommend not doing that, unless it’s the entire focus of your game.

Conclusion

You can do this pretty easily. I would time-box this one and decide what it’s worth. I’ve done really advanced visualizations in the past for holographic voxel mapping of terrain. I’ve also done a lot with Weather in Roblox recently, but more for temperature, rain, snow, wind effects (on players), etc. I’ve not done a GUI for Weather Radar.

If you build one, please share it out or show it off!

2 Likes

Just get a image and scale it down or stretch it. From there you can use prims algorithm for making it avoid stuff I guess.

Make any progress with this one?

How can i make a radar that rotates around in a circle and displays objects as dots on the radar’s screen with raycasting?
And it changes live so when the part moves closer the dot gets closer to the centre of the screen, like a radar does in real life