Hacker News new | past | comments | ask | show | jobs | submit | e_dziewanowski's comments login

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


May I ask what GPU do you have?


512MB ATI AMD Radeon Graphics


I'm afraid the only thing I can do in such case is to display a static image instead of a shader. Would you prefer that?


I was able to view it smoothly on my phone, so I'm not too fussed, but that might be a better experience for anyone else that has the same issue in future.


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


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.


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.


Nice work. You briefly mentioned curl noise... About 10 years ago I wrote gaseous-giganticus[1] which uses curl noise to create gas-giant planet textures. They don't move, like yours, but don't look too bad (and looking at Jupiter, you can't really see that move over small time scales anyway.) Some animation is possible[2] with gaseous-giganticus, but not in real time, as it's all done on the CPU, and it doesn't really sustain over time, as it starts off looking very fuzzy, resolves into something pretty nice, then gets weird. Here is some more output from early days: https://imgur.com/a/9LipP

Here are some slides about the development of gaseous-giganticus (best viewed with a real computer, not on a phone, as it uses arrow keys to navigate the slides): http://smcameron.github.io/space-nerds-in-space/gaseous-giga...

[1] https://github.com/smcameron/gaseous-giganticus [2] https://imgur.com/mqCwMeI


Really cool - thanks for sharing! I thought about using cubemap to have the whole planet simulated but, since I only use the effect as a part of a skybox, it would be wasteful. You also use particles instead of textures. Are you familiar with the work of Larry Yaeger and Craig Upson? They created Jupiter for "2010", and used similiar, particle based approach.


I am aware of the existence of that work, but was never able to find any details about it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: