Live data from Hacker News

Simulating Jupiter

emildziewanowski.com

21–30 of 39 posts

Re: Simulating Jupiter

#21
post #6

Props for a site of that visual complexity that was performant, visually appealing, and eminently readable on mobile.

The article is incredibly interesting, but the choice of colors is so low-contrast that I can only read in it "reader mode", where the animations don't work. I have resorted to "select all" where the letters stand out a bit, but it's ugly and not very ergonomic...

If the consensus is that the mobile color scheme is better than the desktop one I can just change it

Re: Simulating Jupiter

#23

Hello everyone! I'm the author of the article. First of all, thank you so much for sharing it here. I've been taking note of the feedback - I'll try to fix the issue with contrast and other UX problems. If there are any specific suggestions or further feedback you have, please feel free to reach out to me. Thanks again for taking the time to read and share the article!

Fluid mechanics guy here. Let me first say this looks really nice overall!

The part that has probably highest potential for improvement is the sharpening, the artifacts there look a bit weird still.

Physically speaking, what you see on Jupiter (and on a river) is an interfacial flow. There is a divergence-free bulk flow underneath, but the interfacial flow itself has a lot of divergence. Upwellings have positive divergence and supply fresh stuff (colour!), downdrafts have negative divergence and consume stuff/colour.

But wait! You are using curl noise for your vector field! Of course the divergence is then zero everywhere!

If you take just the gradient of the scalar noise field you use for your curl noise, this will have lots of divergence and "compatible shape". Just scale this down a bit and mix with your curl noise.

And then finally take the value of your scalar noise field, scale it to be symmetric around zero, and use this to determine how much color to add/remove.

I think this will remove your need for sharpening entirely.

Disclaimer: this is just top-of-my-head while walking home.

Re: Simulating Jupiter

#25
post #19
post #17

Earlier quoted context omitted.

> performant Huh. Opening this webpage on Firefox floored my laptop (8 core 16GB). The lag was several seconds, including for clicking "back" or opening a new tab.

Follow-up: this only seems to be the case when the "Animated Great Red Spot" image is in view.

May I ask what GPU do you have?

Re: Simulating Jupiter

#26

Hello everyone! I'm the author of the article. First of all, thank you so much for sharing it here. I've been taking note of the feedback - I'll try to fix the issue with contrast and other UX problems. If there are any specific suggestions or further feedback you have, please feel free to reach out to me. Thanks again for taking the time to read and share the article!

Fluid mechanics guy here. Let me first say this looks really nice overall! The part that has probably highest potential for improvement is the sharpening, the artifacts there look a bit weird still. Physically speaking, what you see on Jupiter (and on a river) is an interfacial flow. There is a divergence-free bulk flow underneath, but the interfacial flow itself has a lot of divergence. Upwellings have positive dive…

Really great observations - thank you! I already use the method you described - curl is mixed with some amount of gradient to artificially bring color from the bottom layers. It can be observed at the center of the red cyclone in the last YT clip. Keep in mind - i wasn't going for true fluid mechanics - I just used some of the flow patterns observed in real fluids and layered them on top of each other to give the illusion of a more complex behavior. As for the sharpening - it is used to counteract the blurring effect of interpolating the color texture every frame.

Re: Simulating Jupiter

#30
post #7

The author seems to be experimenting in UE4 or UE5 (material graph shown in screenshot), but the examples are displayed in sharedtoy embeds? I'm wondering, is there a direct way to save UE4 material shader to shadertoy or some easy conversion tool? Otherwise it would have taken eons to produce this page...

Website acts as my portfolio - I'm a game developer, so that is why I use Unreal material graph. Shadertoy allows me to demonstrate ideas on live example that is animated and anybody can play with its code. For the most part HLSL(Unreal) can be translated to GLSL(Shadertoy), but that wasn't the case here. In Unreal I use my own custom flow textures, in Shadertoy it is not possible - everything has to be stored in code. Even though the basic idea behind Unreal and Shadertoy shaders was the same, the implementations were quite different. It was easier to just do everything twice, that to convert it. And yes - it took a lot of work :).
Post reply on HN