What I did today

About to finish Tutorial 5 using the “Edge-Avoiding À-Trous Wavelet Filter”. On the way to a real-time, game-ready path tracer! :slight_smile:
The following images show a scene with the current tutorial state of the path tracer:

Unfiltered (1 sample per pixel):

Filtered (1 sample per pixel):

Ground truth (1000 samples per pixel):

The downside of that edge-avoiding filter is that it requires per-scene tweaking of the various weighting parameters involved. I’m pretty sure the authors spent a whole lot of time to find the right weight coefficients for the still images shown in their paper.

EDIT: Tutorial 5 (more like a demo really than a “tutorial”) is in: https://github.com/LWJGL/lwjgl3-demos/tree/master/src/org/lwjgl/demo/opengl/raytracing/tutorial

This morning I wrote a garbage collector. GC has always seemed to be some kind of impossible mystery that only extremely talents folks like JVM engineers could understand. Turns out a basic tracing garbage collector isn’t very complicated.

Take a look: https://github.com/snordgren/goose

It isn’t very complicated until you have to handle references in registers, concurrency, threads and cache coherency, finalizers, and references…

Cas :slight_smile:

… and optimisations by the JIT. You can have multiple (inlined) implementations of 1 callsite at a time, which all store these references in different registers, or (differently laid out) stack memory.

The way Azul’s Zing VM handles all this is quite remarkably sensible… start here https://www.azul.com/products/zing/pgc/

Cas :slight_smile:

Worked on a new demo today. This time we make a few big steps:

  • externalize the scene description out of the shader (the example will use LWJGL 3’s Assimp binding to load a scene with meshes)
  • that means, we are adding the ability to trace triangle meshes for the first time and getting closer to actual usefulness
  • with any triangle meshes bigger than like 32 vertices there now comes the necessity to use a spatial acceleration structure. The already existing LWJGL 3 demos have some ready which we will use for this (most importantly KDTree.java)
  • Adding stackless kd-tree traversal as per this fine paper (lwjgl3-demos also already has a shader implementation ready which we will use and integrate into our path tracer)
  • Interpolating the normals using barycentric coordinates
  • Hybrid rasterization and ray tracing. The benefit of rasterization is that we can use it to “shoot” the primary rays and let them intersect with scene geometry (simply by means of projection/rasterization; this has been done like 20 years ago, nothing of that is new!) and write normals and depth into a texture, which the actual path tracer can then sample to know where to start shooting the secondary rays from (this is basically only a performance optimization, but a very worthy one, especially when we are now talking about traversing lots of kd-tree nodes and testing triangles). The good thing also is that all optimizations for rasterization algorithms apply here as well, such as frustum culling and occlusion culling.

Here is a development image visualizing the kd-tree traversal without rasterization (so, primary rays are being shot by the raytracer) (lighter orange means more kd-tree nodes being traversed) with vertex normals interpolated in the raytracer using the barycentric coordinates returned from the ray-triangle intersection tests:

(sorry for the rather poor image compared to the previous ones, but remember, this is a debug render) :slight_smile:

Today I worked on completing the next demo, which is almost ready. Like mentioned it features hybrid rasterization and path tracing of triangle meshes using stackless kd-tree traversal. The following images show renders of Crytek’s popular Sponza model with the primary rays being rasterized and two additional bounces being path traced at FullHD.

Decided to start learning some 3D with libGDX. Got inspired by this to make some 3D grass.

dboU8KWxQ70

It uses 30,000 decals. Took me a couple weeks to smash my head against it, made the wind adjustable today :yawn:

VERY NICE!! :slight_smile:

I nearly finished my implementation of compute shader based two-phase occlusion culling for a self-feeding gpu render pipeline :slight_smile: Inspired by the slides from RedLynx. Very impressive that this system can simply be put on top of an existing renderer and performs like f* hell… and provides proper occlusion culling for arbitrary scenes without the need to distinguish between occluders and occludees. Just a perfect system Oo

EDIT: The system uses a highz depth pyramid from the last frame, culls bounding boxes of all objects against it, renders the visible objects, refreshes the depth pyramid and renders the false occluded objects. Made a demonstration video, sorry for the crappy assets and the crappy demo :slight_smile: The 7-8 cars have roughly a million vertices combined. In the video, I switch between occlusion culling enabled/disabled and set the occluding plane visible/invisble, to show how occlusion culling influences the frame time.

hIJHpLpGidQ

I spent a week filling my wordpress site with my projects and I just made my first post about Silicon Tycoon! Check it out here http://ecumene.xyz

This was also posted in the Silicon Tycoon thread, but it doesn’t look like that has many watchers so I might just quietly work on the game on my wordpress.

In my quest to make my current project GWT compatible I wrote a pure java zlib inflater for my PNG decoder

Created a visualization of a method used to solve the inscribed rectangle problem (an easier variant of the inscribed square problem https://en.wikipedia.org/wiki/Inscribed_square_problem). The points where the mesh intersects are solution points for the center of the rectangle, one part of the method.

Started making automatic updater for one of my applications receiving long-time support:

It fetches informations about last updates from GitHub releases API and then compares version number to currently installed version - if it’s higher than current version, changelog entry gets appended. UI is not finished yet and automatic updating and installing is work in progress, but I’m happy with how it turned out so far.

Implemented 3D Volumetric Light by raytracing the scene and calculating the volume using the shadow map.

https://puu.sh/yvLcs/6f9870f304.gif

Volume only. It’s rendered at half-res + gaussian blur(also at half-res).

https://puu.sh/yvLo3/728e5663dd.gif

Looks ace. Volumetric lighting is one of the nicest effects.

Cas :slight_smile:

Today (actually the last five days) I started my first electronics project ever (never soldered before or did anything in that regards). So I got myself covered with electronics stuff, a soldering iron, a multimeter (I basically had NOTHING!) and practiced soldering on male headers and prototype boards. Then I was going to go into Arduino development with a small Arduino Nano. Read a little bit about it until I found out about the popular and veeeery cheap ESP8266-01 2.4GHz WiFi module. That is a more capable microcontroller in its own (faster (even 32-bit) CPU, more (1MB) flash memory and… yeah… WiFi!) than the Arduinos and decided to build a small WLAN repeater using the fantastic esp_wifi_repeater project.
Was a lot of fun figuring out the wiring and an actual working way to flash a new boot image/firmware onto the ESP module and this is the working result:

(soldering bridges is a freaking nightmare)

In the end I have to conclude: Writing Java and running it on a PC is still more fun!

Nice project Kai!
I’ve been enjoying electronics lately too. I soldered my broken car key remote and bought a bunch of electronics on ebay. Servos, sensors and arduinos, to have some fun with soon.
I’ve been enjoying this blog to keep up to date with what’s going on in the system on a chip SOC and single board computer SBC market:

Yesterday I’ve updated my prototype Drone Swarm to version 0.4, more info here

I’ve also put more effort on blog side and explained some thoughts on gameplay and focus on my blog

As usual is very hard to get some feedback on games in early (very early) development, so idea on how improve on that side is welcome

I started to learn LibGDX while I watched the entire Defenders series, and made the basis of a pong game to learn the basics and set up. You can play 2 player and hit the ball back and forth and score, but that’s it so far.

Finished up getting my html renderer to work by using GWT. One thing I have noticed is, is that webgl is much stricter when it comes to the standards than opengl is. I have had many issues on the implementation that needed fixing because my opengl code worked but was not strictly correct