from Hacker News

WebGPU-Based WiFi Simulator

by jasmcole on 10/20/24, 6:01 PM with 84 comments

  • by seanp2k2 on 10/20/24, 8:07 PM

    Cool visualization but it focuses so much on the ``'-.,_,.-'`waves`'-.,_,.='`` and not on the actual coverage pattern of 6-12.5cm waves, so not as actually useful for showing coverage as other tools, but fun as an art project.

    And of course, I can't mention that without shouting out projectM (open-source Milkdrop) that supports WebGL https://github.com/projectM-visualizer/projectm/blob/master/... and one of the OGs, Geisswerks https://www.geisswerks.com/

    If you like that, you might also love NestDrop for music visualization tailored for VJs and with special features to support projecting inside domed surfaces https://nestimmersion.ca/nestdrop.php

  • by missblit on 10/20/24, 7:57 PM

    Bugs:

    #1 if you spam the "add a new source" button you eventually get a JavaScript exception logged to the screen due to an array with a fixed max size of 128 elements overflowing.

    #2 this could be graphics card or driver specific (I have an AMD card), but scrolling just right can can break the simulation due the the text boxes; for example by quickly paging up and down, or scrolling all the way to the bottom and then wiggling the scroll position up and down. Once this happens the bad data propagates until the entire thing is filled with noise, solid black, or solid white. If you then scroll up to 3D mode the screen will be filled with a mess of polygons.

  • by dtgriscom on 10/20/24, 8:00 PM

    > For example, as you scroll you'll notice that the waves are refracting around these text boxes.

    Now, that's useless AND badass.

  • by kristiandupont on 10/21/24, 5:34 AM

    I once wanted to make something similar, for sound. I wanted to create active noise cancelling "in the room", instead of via headphones. I pictured these devices combining a microphone and a speaker that you could set up in strategic location. After thinking about it for a bit, I realized that inference would cause areas with silence and others where the sound volume would be doubled. Less than ideal but still possibly interesting. But then I thought about it some more and realized that I needed to think in 3D, which makes the setup orders of magnitude more complex.

    It seems like that would apply here as well, at least when looking at the effects of refraction?

  • by zamadatix on 10/20/24, 7:39 PM

    Badass on the visualization side. The multiple emitter portion and the end of the scroll reminded me of https://apenwarr.ca/beamlab/ which demonstrates beamforming (adjusting the phase of adjacent transmitters to focus power towards a specific receiver). To play with this one the "easiest" way to see what's going on is go to the right hand menu, unclick 3 so you just have 2 transmitters, click the "r" button, and then click or click and drag to see how the beam gets optimized (you can see some stats about the received power gain in the righthand side).

    While this has to be the most fun to watch demonstration I've seen, something like the free tier of Hamina will likely be many times more useful to those wanting to optimize home Wi-Fi layout https://www.hamina.com/planner. The downside being they force you to make an account whereas this one lets you use it locally with the power of your own browser. The upside being Hamina gives multiple distilled views of the simulation as focused on common Wi-Fi statistics + features and less focus on displaying the wave simulation itself.

  • by croon on 10/21/24, 8:34 AM

    I think I clicked the link at the bottom to add new sources to the simulation a few times too many:

    Unexpected Application Error!

    offset is out of bounds

    RangeError: offset is out of bounds at Float32Array.set (<anonymous>) at Pi.makeUniformBuffer (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:32:118833) at Pi.updateUniforms (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:32:117585) at Pi.setState (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:32:114537) at https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:70:2373 at Vc (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:8:24370) at la (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:8:42602) at aS (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:8:41415) at ro (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:8:40441) at im (https://wifi-solver.com/dist/bundle-UKQ5A5W6.js:8:37031)

  • by geysersam on 10/20/24, 7:41 PM

    Another interesting similar project: https://cemsim.com/ (I'm not the author)
  • by faragon on 10/21/24, 6:00 AM

    I was expecting here SDR radio processing: noise read from GPIO's passed to a web browser with a pipe, showing activity on all channels at once.
  • by Scryptonite on 10/20/24, 8:14 PM

    When I run the Waveguide Simulator demo on my Alienware M15 Ryzen Ed. R5 (has a RTX 3070; Windows 11 Pro, Chrome v129), I hear a distinct high pitched flutter noise emanating from my laptop. I thought it was from the speakers, but no, with my volume down it was still present as long as the simulator was playing. Weird, but very cool demo (probably my hardware, never hear this during games or other WebGPU demos). The realistic house simulation yields a different signature in the sound.
  • by richbradshaw on 10/20/24, 9:08 PM

    I have a Wifi 6E router, so I wonder if 6GHz vs 5 vs 2.4 acts noticeabley differently here? Is the overall shape the same or does the frequency make a big difference?
  • by jasmcole on 10/20/24, 6:52 PM

    See also the blog post here discussing this project:

    https://jasmcole.com/2024/10/18/a-decade-of-wifi/

  • by maho on 10/21/24, 7:52 AM

    I need this, but for heatpump noise.

    It's mostly broadband noise that can be simulated by simpler methods, but visualizing possible resonance patterns for the low-frequency emissions from the compressor (which typically runs at 20Hz, 40Hz, ..., 120 Hz) would be good to know.

    Although I am not sure how the 2d simulation result carries over to the 3d world...

  • by timkq on 10/21/24, 7:27 AM

    I wonder if there is something like this but open-source, so I could customize this. I'm looking for a tool to solve UWB positioning (for indoor navigation) - to be able to know where to optimally place various UWB anchor points.
  • by KingOfCoders on 10/21/24, 5:14 AM

    "Sorry, WebGPU is not supported on your device" Firefox, Nvidia

    A. Why?

    B. What a bad error message

  • by bhouston on 10/20/24, 11:56 PM

    WeBGPU support is increasing but it isn’t yet above 70% of devices: https://web3dsurvey.com/webgpu
  • by rubatuga on 10/21/24, 3:41 AM

    Similar concept in shadertoy:

    https://www.shadertoy.com/view/st3XWX

  • by whalesalad on 10/21/24, 3:08 PM

    Won't run for me on Firefox or Chromium on Debian 12.
  • by crazygringo on 10/20/24, 9:01 PM

    This is exceptionally cool.

    A while ago I was trying to find realistic examples of what WiFi "looks like", to try to get an intuitive sense of how it operated in a house or outside a building -- to what extent it spreads in the same way as a normal lightbulb, or to what extent its vastly larger wavelength complicated the picture.

    At the time, literally the only visualization I was able to find was this artistic seemingly nonsense:

    https://inspirationist.net/what-wifi-looks-like/

    So I'm very happy to see this tool. I'd be even more curious to see a non-animated version that lets you drag your router around and see "illumination" of the overall signal to see how it changes, continuing to take into account how reflections confuse and degrade the usable signal, etc. Instead of the animation of slow wave propagation. Maybe that exists somewhere?

  • by ddtaylor on 10/20/24, 11:37 PM

    Seems Firefox on Linux isn't supported. I'll give this a look another time.
  • by noahbp on 10/20/24, 7:07 PM

    It's so frustrating that WebGPU support was released 1.5 years ago on Chrome, and yet is still unavailable on all other browsers.

    This is a real killer feature that will dramatically slow adoption of non-Chromium browsers, even with Google defanging ad blockers.

  • by crtified on 10/20/24, 9:33 PM

    What are the system requirements to run this? Fairly 'standard' Linux system running Chrome here.

    "Sorry, there was an error starting the simulation

    Sorry, WebGPU is not supported on our device

    WiFi Solver may not be compatible with your device."