@lisyarus@mastodon.gamedev.place
@lisyarus@mastodon.gamedev.place avatar

lisyarus

@lisyarus@mastodon.gamedev.place

He/him

I live in a totalitarian state, teach computer graphics, and make videogames

Check out my cozy traffic simulator: https://store.steampowered.com/app/2403100/Costa_Verde_Transport_Department/

This profile is from a federated server and may be incomplete. Browse more on the original instance.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I'm slowly returning to the development of my village building game, and what's a better way to do that other than making a new devlog! :3

https://www.youtube.com/watch?v=iE3p30PfiVI

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was casually re-deriving some stuff from the VNDF sampling paper, and stumbled upon the humble "Jacobian of the reflection operator", tried computing it, and how I'm in a deep rabbit hole. Anyone got any ideas? :)

https://math.stackexchange.com/questions/4912592/jacobian-of-the-vector-reflection-operator

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

It seems that most of my problems with transparent BSDF were due to poor sampling strategy (I used uniform spherical sampling, as a baseline). After nudging VNDF to work with transmission, and using a more sane material description, I finally have a thin-glass orb :)

Though it gets darker with high roughness, so it needs some more work.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Still trying to implement proper transparent bsdf in my raytracer (instead of hard-coding the refraction ray). Multiple sources and implementations use different formulas and neither of them works πŸ˜†

Also I have no idea what's happening on the screenshot

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Another weird raytracing bug! The black patches on the border are expected - these are artifacts due to having an extremely low-poly metallic surface with interpolated normals.

The white circles, however, are probably some funny floating-point business

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Implemented a proper brdf (Cook-Torrance + GGX) and vndf sampling, now I can do some nicer materials! Here's a shiny ball and a golden dragon:

image/png

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Oh no, there's some weird bug in the raytracer (this should be a fully smooth diffuse sphere)

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I managed to fix the GPU hanging issues but the "optimized" BVH traversal in compute shader still works slower than the unoptimized one 😭

In other news, I tried the MΓΆller–Trumbore ray-triangle intersection algorithm, and it too turned out to be a bit slower than my extremely direct algorithm that just solves a linear system:

image/png

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Third day debugging GPU workgroup atomics to squeeze more perfomance from my raytracer, but it still hangs :(

Here's a cool debug visualization though :)

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Made quite a few optimizations to my WebGPU pathtracer:

Ordered BVH traversal: 15 -> 19 FPS
Store vertex indices instead of triangle ID's in BVH: 19 -> 20 FPS
Don't use indexed geometry: 20 -> 24 FPS
Separate vertex positions from other attributes: 24 -> 27 FPS

Not bad

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was accumulating Monte Carlo samples using good old blending here, now I've switched to a compute shader explicitly blending into a storage texture and it is ~10x slower, interesting

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Managed to hack together a BVH and render this 10k-vertex Stanford bunny. At 1k resolution it takes several seconds per sample, so I guess I'll focus on optimizing that.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

GPU Monte Carlo path tracing goes brrrrrrr

This looks much smoother in reality, I had to massage vsync to prevent tearing when recording this

video/mp4

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Soooooo guess what project I've decided to do next

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

GPU folks, say I'm writing a bare-bones non-realtime GPU raytracer (in compute, w/o rtx kernels). Does it make sense to store geometry as non-indexed, to skip fetching triangle data and fetch vertices directly?

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

New blog post: Demystifying multiple importance sampling

It is a simple thing that turns out to be confusing to a lot of us rendering engineers. I try to explain it in detail here with path-tracing examples!

https://lisyarus.github.io/blog/posts/multiple-importance-sampling.html

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Quite a lot of people asked me to add an RSS feed to my blog, so here it is: https://lisyarus.github.io/blog/feed.xml

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I've completely remade my blog! Changed the design, improved the look of formulas, fixed broken links and typos, etc.

I was thinking of making a thread with my favourite articles, but that would be about a dozen of them, so I'll just drop the blog link here :)

https://lisyarus.github.io/blog/index.html

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I'm in the process of completely redesigning my blog. I used Jekyll and tbh I never liked it - I often needed to use raw html for some stuff anyway. Now transitioning to a pure html+css+js site, like some caveman :)

image/png
image/png

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So apparently my student and I found two separate errors in the glTF reference BRDF specification, yikes.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I was reading about resource/asset packing file formats game engines use, and it seems that the answer always is "ad-hoc engine-specific binary format".

I'm starting to think that I'll just slap a zip file in here and be happy.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I was really confused that the original Veach 97 paper that introduced multiple importance sampling describes something not directly applicable to pathtracing, with some unclear-how-to-use heuristics

I ended up re-deriving MIS myself and verifying it in several other sources

Now it turns out the pathtracing-relevant part is in the very end of the section, and only needs the simplest heuristic, and is equivalent to what I've derived earlier

That's a relief :)

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Another raytracing test: the Sibenik cathedral!

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Another cute raytracing test - a room from @morgan3d's archive (https://casual-effects.com/data):

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

My next (and final) lecture in the raytracing course will be about adding textures, so my plan for today is to slap some colors on this bad boi

  • All
  • Subscribed
  • Moderated
  • Favorites
  • β€’
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cisconetworking
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • cubers
  • vwfavf
  • normalnudes
  • tacticalgear
  • tester
  • ethstaker
  • khanakhh
  • modclub
  • Leos
  • anitta
  • JUstTest
  • All magazines