Live data from Hacker News

Show HN: 3D model file thumbnails for Windows Explorer

github.com

21–28 of 28 posts

Re: Show HN: 3D model file thumbnails for Windows Explorer

#23

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...

Re: Show HN: 3D model file thumbnails for Windows Explorer

#25
post #24

Entering a new era when something written in rust can be on HN without saying "written in Rust".

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.

Re: Show HN: 3D model file thumbnails for Windows Explorer

#26
post #25
post #24

Earlier quoted context omitted.

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…

So you're saying this could only properly be done with Rust. Hear, hear.

Re: Show HN: 3D model file thumbnails for Windows Explorer

#27
post #20

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

Re: Show HN: 3D model file thumbnails for Windows Explorer

#28

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(++)!

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.

Post reply on HN