TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Add Depth of Field to Screenshots

259 pointsby s16habout 1 year ago

20 comments

probabletrainabout 1 year ago
Oh hey, I made this a couple of days ago!<p>I initially made this to experiment with &#x27;faking&#x27; depth of field in CSS (check out my penultimate tweet for the demo vid and inspiration from shuding_, link at the bottom of the site).<p>But last night I remembered that ThreeJS exists, so rewrote it using react-three-fiber. This was my first time playing around with it and I&#x27;m super impressed, it&#x27;s incredibly ergonomic.<p>Edit: not documented, but right-click drag to pan
评论 #40087827 未加载
评论 #40087753 未加载
derefrabout 1 year ago
Here I was hoping this would be something that works with the OS to take pre-window-compositor “3D screenshots” of a desktop, and then assigns the windows Z depths so that they’re floating above the desktop + each-other. Looking at the rendering of such a “3D screenshot” (in orthogonal projection) would look exactly like a regular screenshot… until you added a depth-of-field effect.<p>But, of course, you could also look at it in other projections; tilting it around in 3D space (as done here); applying fog to shadow “distant” windows; lighting the scene from a point-source so as to make the windows cast real shadows on one-another (with more light let through translucent areas!); etc. I would imagine that the (ideally HTML5 embeddable) viewer for this “3D screenshot” format would do all those things.<p>(I do hope someone <i>does</i> try creating such a “3D screenshot” format and viewer, as IMHO it would have a fairly-obvious use-case: reproducing static “look-around-able” snapshots of the already-depth-mapped AR window layouts in visionOS. Being able to tack arbitrary depth-maps onto windows from a 2D desktop OS would just be a bonus.)
评论 #40088140 未加载
评论 #40090682 未加载
tempaway3345751about 1 year ago
Thats great I&#x27;ve often thought that screenshots aren&#x27;t blurry enough these days
评论 #40087426 未加载
评论 #40088655 未加载
评论 #40087461 未加载
mprovostabout 1 year ago
Looks like Screenstab [0] which was a previous Show HN [1].<p>[0] <a href="https:&#x2F;&#x2F;www.screenstab.com&#x2F;editor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.screenstab.com&#x2F;editor&#x2F;</a> [1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34729849">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34729849</a>
评论 #40088479 未加载
daxaxelrodabout 1 year ago
Just to answer some questions I&#x27;m seeing from other comments, this is built with three.js. Think of it as a 3d scene with an image rendered on a 2d plane and the camera has certain gaussian blur applied to a section of it. He&#x27;s using orbit controls for the zoom in&#x2F;out and for the ability to pivot the image.
jandreseabout 1 year ago
This is just a fancy way of saying &quot;blur out everything else&quot; in the screenshot? Personally I prefer to crop the unnecessary content out of the screenshot.
评论 #40090291 未加载
评论 #40087202 未加载
mastermedoabout 1 year ago
Looks interesting. In the beginning I thought it would blur the part of the screenshot farthest away from you and keep the closest thing in focus. But that&#x27;s not how it works.<p>I guess it could be useful for focusing on a particular part of the screenshot if you one could mark what the important part is.
评论 #40087093 未加载
评论 #40087463 未加载
ei23about 1 year ago
You may add some RGB pixels for even more realism like i have done in Blender some years ago: <a href="https:&#x2F;&#x2F;blenderartists.org&#x2F;t&#x2F;rgb-display-shader&#x2F;684533" rel="nofollow">https:&#x2F;&#x2F;blenderartists.org&#x2F;t&#x2F;rgb-display-shader&#x2F;684533</a>
mondobeabout 1 year ago
This would be fun to use in the background of the thumbnail for a YouTube video (or something like that), although I certainly wouldn&#x27;t want to see it used to convey actual information. It gets enough across, I think, to figure out what application is being used.
nightpoolabout 1 year ago
Please please please support pasting images! Any form field where I have to select a file from my filesystem instead of using my paste buffer increases the friction of using it like, 5x. (This applies to every image upload button I&#x27;ve ever used)
splatzoneabout 1 year ago
Very cool! Did you create this? What was the motivation? I&#x27;m just wondering if this is a common enough task that it&#x27;s easier than doing it in Photoshop
评论 #40087250 未加载
lacooljabout 1 year ago
This is absolutely awesome. I wonder if this is the same concept that phones use to focus&#x2F;blur elements of the photo in post
mdrznabout 1 year ago
Fun to use, not sure where I would post a tilted screenshot with a grey background. Maybe if you can export it as .png?
aquirabout 1 year ago
I need this to be integrated w&#x2F; Shottr! That would be very cool! Is there an API for this?
DHPersonalabout 1 year ago
Oh, and zooming works, too!
评论 #40087179 未加载
评论 #40087193 未加载
StephTsimisabout 1 year ago
Very cool!
poulpy123about 1 year ago
But why ?
Shindiabout 1 year ago
This is super cool! Huge upgrade to my product screenshots. Wondering if you&#x27;re offering this as a react component - something I can embbed with a lead magnet or on a site.
评论 #40087047 未加载
评论 #40087050 未加载
评论 #40087187 未加载
siadhalabout 1 year ago
Holy f*ck! Is this AI?
评论 #40087258 未加载
account42about 1 year ago
&gt; Application error: a client-side exception has occurred (see the browser console for more information).<p>And this is why you write your websites HTML instead of javascript.
评论 #40087587 未加载