question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Voxellization produces totally inaccurate result

See original GitHub issue

TRIMESH VERSION: 2.14.17

STL FILE

https://drive.google.com/file/d/0B18jNduc8kjldzFuTVRaTFBsLTA/view?usp=sharing

CODE TO REPRODUCE

m = trimesh.load_mesh("the_above_mesh.stl")
vox = trimesh.voxel.Voxel(m,.25,size_max=1e10)
showin = vox.mesh + m
showin.show()

PRODUCES RESULT: screen shot 2017-09-11 at 11 24 17 am screen shot 2017-09-11 at 11 24 12 am

NOTES

The provided mesh is shown to have no problems that Netfabb can detect. Despite this, the underside of the funnel surface looks a little… fishy to me? I’m not sure what problem, if any, this corkscrew pattern of triangles could cause. But that’s where I’m starting my search on this one.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mikedhcommented, Sep 12, 2017

Ah yeah, the voxel module isn’t very well thought out or particularly well implemented. My general though is that I’d like to switch to using something like openVDB and just do a thin wrapper. Unfortunately that is a royal PITA to install (although if you want to package it for conda-forge that would be sweet 😃.

As a quick thing to try, slicing meshes using mesh.section and then rasterizing using trimesh.path.polygons.rasterize_polygon might do a better job then the ray thing there now.

The data structure is also not great. Maybe it would be better as an octree (pyoctree looked interesting) or as one of the scipy.sparse encodings.

0reactions
jonnymaseraticommented, Dec 18, 2020

I see that FCL implements octree and appears to initiate an octree object when creating a collision object. Is it possible to use this for creating voxels?

I’m interested since I’d like to get the node coordinates of the empty voxels in a scene but I’m after the sparsely sized voxels (i.e. large voxels where there’s no occupancy). Is there a way of doing this already with trimesh?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How distributed processing produces false negatives in voxel ...
The goal of the current paper is to disclose and characterise how false negative results can arise in univariate voxel-based lesion-deficit mapping even...
Read more >
Influence of voxelization on finite difference time domain ...
Numerical simulations show that the voxelization process induces both random error and algorithm-dependent bias in the simulated HRTF spectral features.
Read more >
A Comparison of Optimal Scanline Voxelization Algorithms
This thesis presents a comparison between different algorithms for optimal scan- line voxelization of 3D models. As the optimal scanline relies on line ......
Read more >
Simplification and repair of polygonal models using volumetric ...
Our simplification method produces results that are everywhere manifold. ... a voxel that is entirely interior to our model. Values.
Read more >
Voxel - Wikipedia
Instead, rendering systems infer the position of a voxel based upon its position relative to other voxels (i.e., its position in the data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found