Hacker News new | ask | show | jobs
by themodelplumber 2703 days ago
Wow, this is very similar to the way I use procedural 3D textures and displacement maps to draw planets and things. So much so that I don't even see the explosion, just a growing planet (really, just tweak the mapped color gradient a bit).

Example:

https://www.friendlyskies.net/images/266.jpg

So much of 3D graphics is "hmm, this random thing I just made slightly resembles an $X". "OK, so let's say I just created a method for modeling $X." :-) Really fun stuff.

2 comments

That's a common trick in PC 4k intros.

Despite the apparent variety, most 4k intros rely on a single effect, maybe two. There isn't enough space for more. The only things that change are the parameters.

Interestingly, the technique used here is signed distance field raymarching. A technique that is used by maybe 90% of all 4k intros today.

So basically, write the code in GLSL instead of C, add music, play a bit with the parameters, use a good exe packer like crinkler and you have a nice 4k intro.

For reference http://www.pouet.net/prodlist.php?order=release&type%5B%5D=4...

The effects make the difference, besides artistic direction, so materials, blur (bokeh), the sdf geometries (often just mere balls and cubes, but perhaps a twister or a nice water surface or a fractal) just for starters. Just from my outside perspective.

That's really cool, in part because it's comforting to hear. :-) Sometimes I feel a bit guilty about how much variety can be had from abusing a single distance function + various texture maps, camera angles and focal settings, environment colors, etc.
The signed distance function also finds application in real physics simulations of fluids, where it goes under the name of "level set method". Ron Fedkiw, who's worked a lot on it, is one of very computational physicists who also holds an Academy Award. His homepage is very interesting:

http://physbam.stanford.edu/~fedkiw/

Very interesting indeed!

Off-topic: May I suggest that you switch to using imgur instead of the image host you chose? The ads on imgur are much less intrusive.

Imgur doesn't work on the old iPod I was using while my phone charged. It never loads fully, but TBF I never upgrade iOS past 2 major versions. So iOS 7 and the first "plain" image host search result it is... :-)

Edit: Found the image link on my own site:

https://www.friendlyskies.net/images/266.jpg

It'd work if people just simply posted the direct image, so you don't have to load their massively bloated website. Then again a direct link wouldn't support them through their monitization methods (ads), but if I'm already running an ad blocker..
While I argued for Imgur over using the hosting site the parent to mine used with regards to intrusiveness of ads I should note something important about Imgur with regards to the bloat you mentioned.

The image subdomain servers of Imgur, i.imgur.com, look at the referer of your request and will conditionally redirect you to the web app.

Basically, direct links to images will only give you the image directly if the page you came from is on their whitelist.

Reddit is on said whitelist but I don’t think HN is.

And to further complicate the matter keep in mind that browser caching might make it look to you as though a direct link you posted somewhere is really direct, but to those who haven’t visited the image already they will be redirected the first time they visit that direct link.

For example, here is a direct link to an image hosted on Imgur: https://i.imgur.com/6O265V5.jpg

For me it will look this direct link serves the image only, even when I click my own link in this comment after I’ve posted the comment and am visiting it with HN as referer.

But if HN is not on their whitelist then you and everyone else clicking the link in my comment will be redirected to their web app, provided you didn’t happen to have the image in your cache already.

Edit: Yup, visited the link in this comment from another computer and am indeed redirected as I expected.

Edit 2: Am also redirected even on the device I posted from when following the link in my comment. So even browser caching didn’t stop that in this case.

The image subdomain servers of Imgur, i.imgur.com, look at the referer of your request and will conditionally redirect you to the web app.

Fortunately, if you send no referer it seems you get the image directly. This is easy to do with a browser setting.

> This is easy to do with a browser setting.

On your desktop browser yes. On mobile devices not as easy.

And even on desktop you might not want to globally disable sending referer because other sites might break.

And even if you use a browser add-on to only block referers for i.imgur.com, most other people haven’t so everyone else is still being redirected.

Ah, thank you for the informative reply! I admit that's clever of them, even though it's not to my benefit.
What's weird is, I'm pretty sure I originally posted the "direct" image link that PostImage provided, among the options given post-upload. When I tested the link from HN, I just saw the image on Safari's black background. But minutes later I tested the same link here at HN and saw the image buried in a page of ads.

I wonder if they have some kind of "hey, non-members get a limited number of directs" policy.

Understandable. Unfortunate but understandable.
Found a copy on my web server and linked above.
Thanks :)