Hacker News new | past | comments | ask | show | jobs | submit login

The problem imho is bandwidth. Unless you are iq or similar, creating geometry and textures from thin-air with pure math is just not possible, so you need to load 3d models, which are much heavier than their html/png counterparts.

For individual models, like if you browse sketchfab, it's not such a big deal if the artist optimized things to be "game-ready", but for full environments, it's a problem, especially as audience expectations are influenced by what they see with multi-gigabyte assets on standalone games and simulations.

I don't think this is a complete showstopper, like 10-20 years ago we had the same problem with 2d games and Flash, but as long as the experience was compelling enough and the preloader wasn't completely boring, people waited, but there has been a shift towards wanting things to be instantaneous on the web (e.g. video with adaptive bitrate switching, blurry but instant > sharp but buffered)

Anyway, I guess my point is I don't think it's exactly a technical limitation of programming, as much as a conflict between audience expectations and wait time




Signed distance fields _are not that bad_ (thank you Inigo Quilez)

Once you have your primitives, it becomes basic math and union, subtraction, intersection for the most part.

I made this shader a few days after learning the basics -> https://twitter.com/LeapJosh/status/1494417750395179012

If glsl ever got function pointers or similar, you'd see simple SDF DSLs and frameworks bloom overnight and many of them would be easy and awesome.


Raymarching ever-more-complex mathematical functions is neat if you're creating a demo out of curiosity or for art's sake.

But it's a very expensive and not-very-scalable method of rendering things, certainly not a replacement for meshes of triangles.


Shameless plug - I wrote sdf-csg[1] as an attempt to have that cake and eat it too. Basically, build things out of SDFs, then create meshes out of them for efficient rendering.

[1] https://github.com/wwwtyro/sdf-csg


This is very cool. I wish I could use it in unity!

Going to take a few minutes to scope out what a port would take...


Check out Fuse[1][2], it also has a SDF to mesh feature and since it is based on Stride[3] (C#) it might be easier to port.

[1] https://github.com/TheFuseLab/VL.Fuse

[2] https://www.thefuselab.io

[3] https://www.stride3d.net


Fair point.. and the response is also right on. I'd edit my original comment to say "...creating full interactive scenes of geometry and textures..." if I could :)


"Unless you are iq or similar" => it's actually quite accessible if you dive into it. This Pouët thread is a nice starting point: https://www.pouet.net/topic.php?which=7920&page=1. Also: https://www.pouet.net/topic.php?which=7931&page=1




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: