Vertexwahn
https://vertexwahn.de/
Recent content on VertexwahnHugo -- gohugo.ioen-usJulian AmannSun, 16 Apr 2023 08:31:36 +0200Links
https://vertexwahn.de/page/links/
Sun, 16 Apr 2023 08:31:36 +0200https://vertexwahn.de/page/links/Some other places where you can find me:
Mastodon Medium Ray Tracing 101: Naive diffuse path tracing
https://vertexwahn.de/2023/02/20/naivediffusepathtracing/
Mon, 20 Feb 2023 00:05:52 +0200https://vertexwahn.de/2023/02/20/naivediffusepathtracing/Overview In this post, I want to describe how naive diffuse path tracing works. The goal of this post is to give you an understanding of how the following scene can be rendered:
The scene shows the Cornell Box. Furthermore, it shows some nice effects such as soft shadows and light bleeding (the tall block receives “red light” from the red wall - the short block gets “green light” from the green wall).Bazel: Bazelizing {fmt}
https://vertexwahn.de/2022/09/27/bazelizingfmtlib/
Tue, 27 Sep 2022 00:05:52 +0200https://vertexwahn.de/2022/09/27/bazelizingfmtlib/bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
This blog post is about bazelizing {fmt}. The public GitHub repository of {fmt} can be found here. In this blog post, I want to describe different approaches on how to use {fmt} with Bazel.
First approach: Inject a BUILD file In your WORKSPACE.bazel file you can do something like this:Live at head metric: A software aging measurement
https://vertexwahn.de/2022/04/24/live_at_head/
Sun, 24 Apr 2022 00:05:52 +0200https://vertexwahn.de/2022/04/24/live_at_head/Live at head means that instead of pinning your third party libraries to a specific versions (e.g. GoogleTest v1.11.0) you always use the newest and greatest commit of the main branch (e.g. commit hash bf66935e07825318ae519675d73d0f3e313b3ec6 of GoogleTest which is at least 1 year “newer” then the last release). One strategy could be to use always the newest commit of the main branch of a Git respository. The problem here is that this does not give reporducable builds, since for every rebuild can use a complete different (newer) set of third party libraries, which can be espacially annoying if you want to run old code an have breaking changes.Ray tracing 101: Chi-squared test applied to sampling
https://vertexwahn.de/2022/04/04/chisquaredtest/
Mon, 04 Apr 2022 00:05:52 +0200https://vertexwahn.de/2022/04/04/chisquaredtest/Some notation A random variable $X$ has a probability density function (PDF) $p$ and a probability distribution function (cumulative distribution function or CDF) $P$. $\xi$ refers to a canonical uniform random variable (uniform distributed variable in the domain [0,1)).
Random number generators There are many ways to implement random number generators (RNGs). One of the most basic ones is a linear congruential generator. Of course, there are more advanced ones.Ray Tracing 101: Octrees for faster intersection
https://vertexwahn.de/2022/03/12/octree/
Sat, 12 Mar 2022 00:05:52 +0200https://vertexwahn.de/2022/03/12/octree/Efficient intersection between rays and objects can be achieved by using acceleration structures such as octrees. The idea of an octree is to split the space into $8$ equal-sized octants (hence the name). The 2D variant of an octree is a quadtree. Analogous a binary tree can be considered to be the 1D variant of an octree and a quadtree. I use quadtrees in the case where considering an octree does not bring any additional value over the quadtree and where the mapping of the concepts from quadtrees to octrees is straightforward.Bazel: Bazelizing Qt5 for macOS
https://vertexwahn.de/2022/02/13/bazelizeqtmacos/
Sun, 13 Feb 2022 00:05:52 +0200https://vertexwahn.de/2022/02/13/bazelizeqtmacos/bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
Introduction I tried to build and run a Qt5 (5.15.2) application on macOS (10.15.7) using Bazel 5.0.0. Unfortunately, I run into some problems. The building part seems to work, but not the run part. In this post, I want to describe what I did and what are possible future directions and steps for this endeavor.Open Source
https://vertexwahn.de/page/open_source/
Sat, 01 Jan 2022 08:31:36 +0200https://vertexwahn.de/page/open_source/Bazel & Bazelization of libraries abseil/abseil-cpp (Commits)
AcademySoftwareFoundation/Imath (Commits) AcademySoftwareFoundation/openexr (Commits) bazelbuild/bazel-skylib (Commits) bazelbuild/bazel (Commits) bazelbuild/bazelisk (Commits) bazelbuild/rules_k8s (Commits) catchorg/Catch2 (Commits) fmtlib/fmt (Commits) google/googletest (Commits) jin/awesome-bazel (Commits) justbuchanan/bazel_rules_qt (Commits) nelhage/rules_boost (Commits) nlohmann/json (Commits) oneapi-src/oneTBB (Commits) ProdriveTechnologies/bazel-latex (Commits) pytorch/cpuinfo (Commits) stackb/rules_hugo (Commits) tensorflow/tensorflow (Commits) Vertexwahn/BazelDemos (Commits) Vertexwahn/rules_embree (Commits) Vertexwahn/rules_ispc (Commits) Vertexwahn/rules_oidn (Commits) Vertexwahn/rules_qt6 (Commits) zaucy/rules_blender (Commits) zaucy/rules_vulkan (Commits) FlatlandRT FlatlandRT is a 2D ray tracer visualization tool.Render time KPI reveals unexpected negative effect of Bazel BUILD file refactoring
https://vertexwahn.de/2021/09/10/howbazelperformance/
Fri, 10 Sep 2021 00:05:58 +0200https://vertexwahn.de/2021/09/10/howbazelperformance/Render time KPI A good key performance indicator (KPI) for a renderer is render time. Everyone who waited for a few hours for rendering to get finished knows that render time is important. As a user and even as a developer you always hope for short render times. The worst thing that can happen is that more and more features are added to a renderer software that makes the whole rendering process slow and slower over time.Bazel: Bazelizing Embree 3.13.0
https://vertexwahn.de/2021/07/30/bazelizingembre3.13.0/
Fri, 30 Jul 2021 00:05:52 +0200https://vertexwahn.de/2021/07/30/bazelizingembre3.13.0/Introduction bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
Embree is middleware for ray tracing that computes intersections points between rays and different shape types. The source code of Embree is under the Apache 2.0 license and hosted on GitHub. Embree targets CPU ray tracing and contains special code to make use of SSE, AVX, AVX2, and AVX-512 instructions if the target CPU supports it.Bazel: Bazelizing Qt5 & Qt6
https://vertexwahn.de/2021/06/06/bazelizeqt/
Sun, 06 Jun 2021 00:05:52 +0200https://vertexwahn.de/2021/06/06/bazelizeqt/bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
Why Qt? Qt is the defacto standard for cross-platform user interfaces for desktop applications using C++. It found its way also into some other areas such as embedded devices in cars or medical devices. Of course, someone can argue that it is heavy to deploy, carries around a lot of legacy stuff, etc.Ray Tracing 101: Ray Triangle Intersection
https://vertexwahn.de/2021/05/29/raytriangleintersection/
Sat, 29 May 2021 00:05:52 +0200https://vertexwahn.de/2021/05/29/raytriangleintersection/Möller, Trumbore triangle intersection Tomas Möller and Ben Trumbore wrote a tiny paper with the title “Fast, Minimum Storage Ray/Triangle Intersection”. It describes an algorithm that can compute the intersection of a ray with a triangle. The paper was published in 1997. It contains one sentence that should draw your attention to this paper: “…, we believe it is the fastest ray/triangle intersection routine for triangles …”. I call the paper tiny because it consists only of 7 pages.Okapi Renderer
https://vertexwahn.de/page/okapi/
Thu, 13 May 2021 08:31:36 +0200https://vertexwahn.de/page/okapi/Okapi Renderer is a toy renderer developed by me.
Gallery Scene rendered with Okapi Renderer (Cornell Box scene provided by Cornell University) Scene rendered with Okapi Renderer (Kitchen scene provided by Jay-Artist) Scene rendered with Okapi Renderer (Harley Davidson XR1200x scene provided by Timofei Shcheglov) Scene rendered with Okapi Renderer (BMW 315 DA2 scene provided by Maciej Ptaszyńsk) Download Alpha 1.Bazel: Handling external dependencies in OpenEXR
https://vertexwahn.de/2021/04/02/externaldependenciesbazelopenexr/
Fri, 02 Apr 2021 00:05:58 +0200https://vertexwahn.de/2021/04/02/externaldependenciesbazelopenexr/I spend some time in adding support for Bazel to OpenEXR. OpenEXR v3.0.1 comes now with support for Bazel. OpenEXR has a dependencies to zlib and to Imath. If you want to build OpenEXR you also need to build some state of zlib and Imath.
If you do not have a monorepo you have always the dilemma of how to combining different repositories. A focus of Bazel is to have reproducible builds.Bazel: Offical support for OpenEXR
https://vertexwahn.de/2021/03/14/officialbazelsupportopenexr/
Sun, 14 Mar 2021 00:05:52 +0200https://vertexwahn.de/2021/03/14/officialbazelsupportopenexr/I wrote a blog post about Bazelizing OpenEXR already. In the meanwhile, my pull request was accepted. OpenEXR has official support for Bazel now.
Here is an example that shows how to OpenEXR with Bazel (in case you want to give Bazel a try download it and follow the install instructions):
Create a WORKSPACE.bazel file:
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenEXR Project. load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") git_repository( name = "openexr", # branch = "master", commit = "28fa44d5c24dbed3f05c38b81d75ae08d72c0cf9", remote = "https://github.Ray Tracing 101: Image sampling and reconstruction
https://vertexwahn.de/2021/02/28/imagereconstruction/
Sun, 28 Feb 2021 00:05:53 +0200https://vertexwahn.de/2021/02/28/imagereconstruction/Pixel positions Integer coordinates can be used to address different positions on a discrete pixel image grid. Usually, the top left pixel has the coorinates $(0,0)$ and the bottom right one $(width-1,height-1)$. This is space is called the raster space. This was already described in an earlier blog post.
When sampling an image plane we use floating-point coordinates. One important question is how to convert from discrete coordinates to continuous ones and vice versa.Bazel: Bazelizing OpenEXR
https://vertexwahn.de/2021/01/24/bazelizeopenexr/
Sun, 24 Jan 2021 00:05:52 +0200https://vertexwahn.de/2021/01/24/bazelizeopenexr/Introduction bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
OpenEXR is a library to store high-dynamic-range (HDR) image files. Usually, the extension .exr is chosen for such files. For instance, an HRD image can store 32-Bits per color channel instead of only 8-Bits. For viewing HDR images you need either an HDR screen or proper tone mapping on an LDR screen.Bazel: Bazelizing Embree 3.12.1
https://vertexwahn.de/2021/01/12/bazelizingembree3.12.1/
Tue, 12 Jan 2021 00:05:52 +0200https://vertexwahn.de/2021/01/12/bazelizingembree3.12.1/Introduction bazelizing, bazelization, to bazelize, bazelized: The act of converting some existing software artifact to be easily consumed by the Bazel build tool
Embree is middleware for ray tracing that computes intersections points between rays and different shape types. The source code of Embree is under the Apache 2.0 license and hosted on GitHub. Embree targets CPU ray tracing and contains special code to make use of SSE, AVX, AVX2, and AVX-512 instructions if the target CPU supports it.Ray Tracing 101: Shooting rays
https://vertexwahn.de/2021/01/03/shootingrays/
Sun, 03 Jan 2021 00:05:53 +0200https://vertexwahn.de/2021/01/03/shootingrays/How do we shoot a rays into our scene given a perspective matrix?
Assume that our virtual film plane is $800$ by $600$ pixel in size. This means that raster coordinates range from $[0,800] \times [0,600]$. The positive x-axis goes form left to right and the positive y-axis goes from top to bottom. The top left corner has the raster coordinates $(0,0)$ and the right bottom has the raster coordinates $(800,600)$.Ray tracing 101: Perspective projection
https://vertexwahn.de/2020/12/27/perspectiveprojection/
Sun, 27 Dec 2020 00:05:52 +0200https://vertexwahn.de/2020/12/27/perspectiveprojection/Perspective projection To get the gist of perspective projection consider the following image:
Given the Point $P(p_x, p_y, p_z)$ what is are the coordinates of the projected point $P’(p’_x,p’_y,p’_z)$?
$$ p'_x = d \frac{p_x}{p_z} $$ $$ p'_y = d \frac{p_y}{p_z} $$ $$ p'_z = d $$ If $d = 1$ then the problem simplifies to just dividing by the z-coordinate. And this is what the whole magic about perspective projection is all about.Ray Tracing 101: How does a look-at transform work?
https://vertexwahn.de/2020/12/21/lookat/
Mon, 21 Dec 2020 00:05:52 +0200https://vertexwahn.de/2020/12/21/lookat/Ray Tracing 101: How does a look at transform work? The matrix that transforms world space coordinates to view space is called the view matrix. A look at matrix is a view matrix that is constructed from an eye point, a look at direction or target point and an up vector.
If you take a look at the source code of pbrt-v3 and figure out how a camera spans a ray you will recognize that the ray is first described in camera space, which means that the start of a ray is always at the point (0,0,0).Ray tracing 101: Matrices and Coordinate Systems
https://vertexwahn.de/2020/12/20/coordinatesystemsandmatrices/
Sun, 20 Dec 2020 00:05:52 +0200https://vertexwahn.de/2020/12/20/coordinatesystemsandmatrices/Row-major vs. column-major matrices There are row-major and column-major matrices.
A translation matrix defined in column-major fashion looks like this:
$$ T(t_x,t_y,t_z) = \begin{pmatrix} 1 & 0 & 0 & t_x \\ 0 & 1 & 0 & t_y \\ 0 & 0 & 1 & t_z \\ 0 & 0 & 0 & 1 \end{pmatrix} $$ A translation matrix defined in row-major fashion looks like this:
$$ T(t_x,t_y,t_z) = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ t_x & t_y & t_z & 1 \end{pmatrix} $$ I stick here to column-major matrices.Ray tracing 101: Refraction of Light
https://vertexwahn.de/2020/12/19/refraction/
Sat, 19 Dec 2020 00:05:52 +0200https://vertexwahn.de/2020/12/19/refraction/I think a good way to get started with ray tracing is to begin with refraction. This is a basic operation that happens in almost every ray tracer. Refraction happens when a light ray hits another medium as shown in the following image:
Of course, this is just a simplified model of how light travels through space and how light is modeled, but this is fine enough to render some pleasant pictures.Publications
https://vertexwahn.de/page/publications/
Tue, 04 Jul 2017 08:43:54 +0200https://vertexwahn.de/page/publications/Please check my Google Scholar profile for my publications.
Here you will find only an incomplete and not up to date list of some selected publications:
Watch: A Validation Framework and Language for Tool Qualification Luiz Cordeiro¹, Christian Becker¹, Markus Pielmeier¹ & Julian Amann¹, In: Trapp, M., Schoitsch, E., Guiochet, J., Bitsch, F. (eds) Computer Safety, Reliability, and Security. SAFECOMP 2022 Workshops.
¹BMW Group
Abstract ISO 26262:2018 is one of the most important standards for functional safety within the automotive domain.Imprint
https://vertexwahn.de/page/imprint/
Tue, 04 Jul 2017 08:31:36 +0200https://vertexwahn.de/page/imprint/Imprint according to german law Dr. rer. nat. Julian Amann
Lindenstraße 41
84030 Ergolding
Germany
Telefon: 017621175946
E-Mail: dev@vertexwahn.de
Verantwortlicher für journalistisch-redaktionelle gestaltete Inhalte:
Dr. rer. nat. Julian Amann
Lindenstraße 41
84030 Ergolding
E-Mail: dev@vertexwahn.de
Datenschutzerklärung according to german law Datenschutzerklärung Verantwortlicher im Sinne der Datenschutzgesetze, insbesondere der EU-Datenschutzgrundverordnung (DSGVO), ist:
Julian Amann Ihre Betroffenenrechte Unter den angegebenen Kontaktdaten unseres Datenschutzbeauftragten können Sie jederzeit folgende Rechte ausüben: Auskunft über Ihre bei uns gespeicherten Daten und deren Verarbeitung (Art.