Live data from Hacker News

Simulating Jupiter

emildziewanowski.com

11–20 of 39 posts

Re: Simulating Jupiter

#11
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...

Looking at the final shadertoy example (https://www.shadertoy.com/view/4XSXz3) I would think he just recreated each effect in shadertoy (variable and function names dont seem exported to me).

Most of the effects on the page are only a couple of lines it seems so maybe he did just rewrite them all? I do wonder why he bothered with UE material graphs if he's this proficient at shaders anyway.

Re: Simulating Jupiter

#12
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...

UE translates shader graphs to HLSL - high level shading language, see:

https://dev.epicgames.com/community/learning/knowledge-base/...

Shadertoy needs GLSL - open gl shading language. Luckily, UE has a HLSL -> GLSL transpiler built in:

https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScrip...

There are other HLSL transpilers: Microsoft's ShaderConductor, Unity's hlsl2glsl, Vulkan's vcc, etc.

To port your favorite Shadertoy examples back to UE, you can transpile GLSL to HLSL with ShaderTranspiler, glslcc, ShaderConductor, etc.

Disclaimer: I don't use UE or Shadertoy. In fact, this is my first exposure to GLSL/HLSL. My claims may be inaccurate.

Re: Simulating Jupiter

#13
When I was at university, we did a different Jupiter simulation - the whole planet. We were fortunate enough to have a comet smack into it and ring it like a bell.

Then a few of my senior colleagues used the observations in asteroseismology models (a generalised helioseismology model really) to study the interior.

https://en.wikipedia.org/wiki/Asteroseismology

https://en.wikipedia.org/wiki/Comet_Shoemaker%E2%80%93Levy_9...

Re: Simulating Jupiter

#14
post #9
post #6

Earlier quoted context omitted.

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...

It's white on black, or at least white on very dark gray. Contrast is about as high as it could be on my device. Might there be a problem with your device?

> It's white on black, or at least white on very dark gray.

It's light grey (#666b67) on dark grey (#222623), not much contrast on desktop. Mobile uses other colours, the same background (#222623) but a lighter font color (#B2B5B3), which is _way_ better.

Why not use the same foreground color on desktop?

Re: Simulating Jupiter

#15

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

> eminently readable on mobile

Sadly the font colour on non-mobile devices is way too dark, the whole site is way too low contrast: #666b67 (desktop) vs #B2B5B3 (mobile) on #222623.

Desktop colours: https://webaim.org/resources/contrastchecker/?fcolor=666B67&...

Mobile colours: https://webaim.org/resources/contrastchecker/?fcolor=B2B5B3&...

Re: Simulating Jupiter

#16
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...

Looking at the final shadertoy example ( https://www.shadertoy.com/view/4XSXz3 ) I would think he just recreated each effect in shadertoy (variable and function names dont seem exported to me). Most of the effects on the page are only a couple of lines it seems so maybe he did just rewrite them all? I do wonder why he bothered with UE material graphs if he's this proficient at shaders anyway.

I can imagine using material graphs is a much better way to experiment, iterate and progressively build up the effects than hand coding a shader. It's kind of like asking why write code in C# in Visual Studio when you can just write assembly?

Re: Simulating Jupiter

#17

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

> 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.

Re: Simulating Jupiter

#19
post #17

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

> 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.

Re: Simulating Jupiter

#20
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!
Post reply on HN