Hacker News new | ask | show | jobs
Show HN: 3D model file thumbnails for Windows Explorer (github.com)
77 points by eyhn 1535 days ago
12 comments

I don't really have a lot of 3D models to view, but I did find it interesting to see how well the Windows API crate for Rust integrates with the COM stuff that Microsoft likes to use for these APIs. It's farf from trivial, but it's quite clear code to read and doesn't require too much language hacking. I've never thought it would be this easy to extend the Windows shell with anything other than C(++)!
Enabling multiple languages to consume the Windows API was the whole motivation behind COM.

https://docs.microsoft.com/en-us/windows/win32/com/the-compo...

I tried to use sharpshell and C# to do this at first, but the tools for sharpshell are too old and not maintained for years.

Then I found microsoft/windows-rs and it was very easy to implement the COM interface using Rust, all thanks to the work of microsoft/windows-rs, but there is not a lot of documentation about this and you need to read a lot of code.

Entering a new era when something written in rust can be on HN without saying "written in Rust".
You're not wrong, but every time someone omits "written in Rust", someone comments about how great it is that people don't add that to the title anymore.
I’m glad you commented so I can know it’s written in Rust :D
Honestly, 3D model file thumbnails would require some sweet performant code so we all just assumed this was written in Rust anyway ;)
well, not really. you load the data and pass it to the GPU. There's no real work to do on the CPU. I'm not saying it's trivial to write a viewer but to doesn't require performant code.

I've written a GLTF viewer in JavaScript. You parse the JSON, pass the data to the GPU, apply shaders. It requires knowledge of how to render 3D and PBR but it's a day or 2 project to get working if you know the topic and no part of it requires any perf.

So you're saying this could only properly be done with Rust. Hear, hear.
It’s nice ! I don’t do 3D but I miss all those little life enhancements I feel we have lost during the past decades.

The nowadays version of this would be an explorer dedicated to 3D projects.

Well done !

You might want to add "Show HN:" to the title, as this is your creation.
You are right, thanks for reminding
Oh nice. Sometimes when I'm iterating on a model really fast I'll have a whole list of model(1), model(2), etc files and having thumbnails would be a great help in differentiating them.
FWIW it would be nice for the README to link to both Filament and Assimp, since they're doing quite a bit of the heavy lifting here.

Also because, in the case of Assimp, it supports a lot more formats than you list. However even for the listed formats, it has several issues. Especially for reverse engineered formats, which might not be an intuitive thought for many users who don't know what's backing this.

You are definitely right, I have added them to the readme
I wanted something like this. it's really cool but unfortunately it freezes explorer & crashes for most of my folders...
Sorry, it is a preview version, it may get stuck when large models or error files, I will try to fix this issue in next version.
This is cool, a lot of Linux filemanagers do this and it's great for dealing with big "Blender/" folders.
Looks like this supports a lot more than Microsoft PowerToys which can do a couple formats https://docs.microsoft.com/en-gb/windows/powertoys/file-expl...
Looks great. It would be great if you could continue to develop this project.
That's cool!

Related question: is there a straightforward way to generate a preview image (PNG or JPG or whatever) from a 3D model (e.g. GLTF file)?

Yes, there is a command line program in the repository https://github.com/EYHN/space-thumbnails/tree/main/crates/cl...

USAGE: space-thumbnails-cli.exe [OPTIONS] --input <INPUT> <OUTPUT>

Currently it is not released in github release, you need to build it manually. It is written in rust, if you don't know much about rust, let me know I can help you.

Hope it’s fast. I’m using a similar plugin which really is fast, but so many others are not!
can you share which fast plugin are you using?
In fact, this is just a preview version, there is still a lot of room for speed optimization, such as the current re-initialization of rendering contexts for each generation, caching contexts can save a lot of time