asny / tri-mesh

A triangle mesh data structure including basic operations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Mesh visualisation crate?

dfsp-spirit opened this issue · comments

Dear Asger,

thanks heaps for the tri-mesh crate. I had a hard time finding a mesh visualization crate for Rust and wondered whether you can recommend something?

My background is computational neuroimaging and I would like to draw something like this image from a brain mesh and per-vertex data (by applying a colormap).

Is there maybe a plotting library that supports mesh visualization in Rust? Something like Python's matplotlib, R's rgl or Julia's GLMakie?

All the best,

Tim

Dear Tim.

No problem and great to hear that you found tri-mesh useful.

I haven't looked for a data visualisation tool like matplotlib but if you just want to visualise a 3d model with per vertex colors you can use three-d. Note that it is shameless self promotion since I created three-d, but I did originally create three-d as a way to visualise the meshes from tri-mesh so it do make sense. You can take a look at the triangle example, it should do exactly what you need, except maybe camera control which you can take from one of the other examples. There are of course also other options, either high level options like the amethyst game engine (which is probably overkill but it will work) or more low-level options like gfx. There are also data plotter libraries but I don’t know if they can visualise a 3d model.

Hope it helped 💪

  • Asger.

Thanks for all these suggestions. I browsed through your repos already and noticed three-d. I will give it a try, a game engine is definitely overkill.

I am writing a crate that supports reading neuroimaging file formats and all I want is to visually inspect the loaded mesh and data in Rust to see that everything worked. A renderer should be enough for that.

Thanks once more,

Tim

No problem! Sounds like a really interesting project 👍 It also sounds like three-d is a valid solution and I will be happy to help if you have problems or questions.

Best regards, Asger.