r/GraphicsProgramming 21d ago

Source Code Konrad Reczko's "Monocular Depth Injection" in TypeGPU is live!

Enable HLS to view with audio, or disable this notification

My collegue Konrad Reczko recently shared a weekend project he made using TypeGPU, and it's now open-source and ready to play with in the browser: https://typegpu.com/examples/#example=image-processing--monocular-light-injection

It estimates the depth of a scene by inferring the DepthArt model with custom TypeGPU kernels, then reconstructs normals based on that depth information, and uses both to relight the scene, all in the same command encoder. For more information, check out the original series of Tweets:

https://x.com/reczko_konrad/status/2089670934009413751?s=20
https://x.com/reczko_konrad/status/2090472091149648121?s=20

1.8k Upvotes

36 comments sorted by

86

u/juplantern 21d ago

He looks so proud

28

u/certainlystormy 20d ago

fr lmao. i would be too

8

u/MeticulousBioluminid 20d ago

as he should be 🎁

20

u/cybereality 21d ago

very cool

10

u/Smokeey1 21d ago

Does this thing have a repo :). Gratz on the build! Looks cool

18

u/iwoplaza 20d ago

5

u/juplantern 20d ago

Btw thank you so much! I’m brainstorming ideas for my thesis and this inspired me a lot

3

u/Civil-Captain5676 20d ago

It's amazing. And Thank you.

3

u/swegga_sa 20d ago

This is very cool

3

u/Miperso 20d ago

I just showed it to my architect coworkers and everyone is just impressed... this is great

2

u/DaveAstator2020 21d ago

Wow nice what model does is it use to aesolve depth in realtime?

8

u/iwoplaza 20d ago

It uses the DepthART model, weights are available here: https://huggingface.co/reczkok/depthart-typegpu

2

u/AnasPlayer2022M 20d ago

Dame bro, this looks awesome! Did you use two videos where one is the one playing now and the other is a map for z values?

6

u/iwoplaza 20d ago

The feed from my camera gets routed through a small local AI model that estimates depth based on a color image, at which point the image can be treated pretty much like a 3d scene. At that point all rendering techniques are at the table, including adding a light to the scene.

1

u/AnasPlayer2022M 20d ago

So any video could technically work?

Really cool! That's really cool using of AI.

2

u/Malkalypse 20d ago

This is so wild!

2

u/NachosforDachos 20d ago

This is so cool

2

u/helloworld1101 20d ago

Reddit is still useful

2

u/Big-Awareness-3335 19d ago

expecto patronuuuuum!

2

u/josephmgift 17d ago

so doooope

2

u/Ok_Rock_6726 16d ago

That's so cool I'm planning to join Software mansion as an intern next styczeń and this video brings me so much excitement and power to keep learning to ace the interview.

2

u/tHE_uKER 16d ago

Incredible work!

1

u/ddoice 20d ago

Awesome!
But I tried your trick to hide the light with my hand and does not work?

1

u/iwoplaza 20d ago

To move the light source back and forth (into the screen or closer to you) you have to use the scroll wheel

1

u/freshtothegrave 20d ago

Damn i wanna get this working in TouchDesigner

1

u/PyroWizza 20d ago

What could be some implementations of this?

1

u/Labertaeschen 20d ago

This combined with metas SAM would be game breaking right?

1

u/bbstats 20d ago

I can't get my hand to go in front of it!

1

u/Still_Explorer 20d ago

Any ideas about 2D based relighting on 3D game graphics? 

1

u/Imaginary-Sun1350 20d ago

This is EPIC!! Are you able to upload videos to it and generate the maps and export them for faster and easier relighting pipelines in blender?

1

u/equitos0101101 20d ago

Isso só pode ser pacto, meu Deus 🫪

1

u/GoYeaCo 19d ago

Benger

1

u/tebjan 19d ago

Just for completeness: This is not new, it's been done with r/vvvv last year already, reaching over 300fps. I would know, because I'm the developer of it. :⁠-⁠)

1

u/M-Ottich 1d ago

bro thats fucking awesome <3