Log In  


Cart #point_cloud_ladybug-0 | 2019-05-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
38

I took a shot at "demaking" an image made by Inigo Quilez. His original piece draws an animated scene which is modeled and rendered entirely by code which runs on the GPU (note: this link takes you to a webpage which runs heavy GPU code, and it will likely slow down your browser while it's running): https://www.shadertoy.com/view/4tByz3

My version is a lot simpler. It draws a single still image in two passes (first a depth/material-ID pass, then a lighting pass to get the final result), so be patient! Nothing else happens after it finishes drawing the image.

Unlike the original version, which uses Signed Distance Field modeling to describe its shapes, I used a point-cloud generator/rasterizer which uses a z-buffer for sorting (very similar to the triangle-renderers used in almost all current 3D game engines, but it only draws points instead of triangles). Each object on the screen is created by some function which submits a sequence of 3D positions with material values to to the rasterizer.

All lighting operations (diffuse + specular + approximated directional shadows + SSAO) are performed as a post-process, like deferred rendering in modern environments. Since the shapes in the scene are just arbitrary collections of points, they don't have "real" normals - instead, all normals are approximated based on the depth buffer, after all the points have been rasterized.

38


interesting to see that pico resolution is not completely breaking screen-based calculation.


Yeah!! I stalled on trying to approximate the normals from the depth buffer since I assumed it wouldn't really work, but it's like...totally fine. Until then it was all ssao and outlines since they didn't require normals for anything, and my point cloud generators don't know anything about normals/gradients.


I only just stumbled upon this now.
This is a seriously clever piece of work. Wow.


Indeed. This is astounding. Just goes to show something I believed all my life. All life and reality are made up of math.

Perhaps too small or too complex for most of us to understand, but it's there all the same.

Quiet and heartfelt star for you and this masterpiece, @2darray.



[Please log in to post a comment]