
Show HN: Procedural Voxel Rendering in WebGL - guillaumec
http://guillaumechereau.github.io/goxel/
======
willvarfar
Lovely! Reminds me of L-Systems such as the 2D Context-Free Art
[http://www.contextfreeart.org/gallery/](http://www.contextfreeart.org/gallery/)
and the 3D Structure Synth
[https://www.flickr.com/groups/structuresynth/](https://www.flickr.com/groups/structuresynth/)

I had planned to use such a system one day for a Ludum Dare entry :)

~~~
guillaumec
Yes, the syntax is directly inspired by ContextFreeArt. I didn't know about
Structure Synth, it looks very cool.

------
vog
Doesn't work here:

    
    
        Blocked loading mixed active content "http://bootswatch.com/slate/bootstrap.min.css"
        Blocked loading mixed active content ...
    

You may want to include your JavaScript via "//bootswatch.com/..." instead of
hard-coding unencrypted HTTP via
"[http://bootswatch.com/..."](http://bootswatch.com/...")

~~~
guillaumec
Thanks, I just put the js in the webpage directly. That should fix it.

------
im_down_w_otp
Needs more Comanche ;-)

------
stcredzero
Is this actually voxel rendering, or is it voxels rendered with polygon
rendering techniques?

[https://en.wikipedia.org/wiki/Voxel#Rendering](https://en.wikipedia.org/wiki/Voxel#Rendering)

~~~
Cacti
Huh? What is "actual voxel rendering"?

I mean, short of using special hardware and raycasting methods, everything is
going to be reduced to triangles of some form. Even the more specialized stuff
that NVIDIA has been working on.

~~~
oofabz
Not everything has to be drawn as a triangle. You can apply a fragment shader
symmetrically to every pixel in a framebuffer, instead of using geometry to
apply different fragment shaders within each triangle.

This technique is commonly used to post-process already-rendered scenes, like
with a tone mapping shader or depth of field effects. But for simple scenes
you can also put an entire rendering engine in the fragment shader, typically
using ray marching.

Here are some examples of this technique being used to draw voxels:

[https://www.shadertoy.com/results?query=voxel](https://www.shadertoy.com/results?query=voxel)

~~~
Cacti
That is a very good point, I forgot about that option.

Do you think this will be a realistic option at some point for wide-spread
use? The stuff I saw from NVIDIA looked like they think a hybrid approach
(voxels are shoveled to the GPU in a octree arrangement to handle ray
marching, but the output is traditional triangles) would work best for
efficiency reasons.

------
nergal
Nice! What shader (I guess?) is used to make the cube borders looking a bit
rounded?

~~~
guillaumec
Author here: this is simply using a bump texture.

------
vmorgulis
Very cool and powered by emscripten!

------
bobajeff
Works on my phone!

