Hi.
Then I must be doing something wrong, or I have not understood your explanation. Should the addon work with default cube with triangulated faces?
I get this error:
Traceback (most recent call last):
File "/home/yafu/.config/blender/2.79/scripts/addons/vdb_remesh.py", line 165, in execute
self.adaptivity, self.only_quads, self.voxel_size, self.blur)
File "/home/yafu/.config/blender/2.79/scripts/addons/vdb_remesh.py", line 72, in vdb_remesh
grid = vdb.FloatGrid.createLevelSetFromPolygons(verts, tris=tris, transform=vtransform)
Boost.Python.ArgumentError: Python argument types in
FloatGrid.createLevelSetFromPolygons(numpy.ndarray)
did not match C++ signature:
createLevelSetFromPolygons(boost::python::api::object points, boost::python::api::object triangles=None, boost::python::api::object quads=None, boost::python::api::object transform=None, boost::python::api::object halfWidth=3.0)
location: <unknown location>:-1
The same with dyntopo meshes.
Addon works with default cube.
Edit:
Ok, I’m stupid . I have missed “Pure triangle mesh” part you said. So now I’m trying to figure out what exactly “make faces” is, to see if I can make the addon work with dyntopo meshes
@YAFU: Alt-J, tris to quads. The mesh needs to have some tris and some quads and no ngons. It’s just a quality of life issue once I get to it it should be easy to fix.
@brother: You don’t have to use the included PyOpenVDB binary if you don’t want to (delete pyopenvdb.so in the modules folder). You just need to have a version of PyOpenVDB that has all the functionality the addon uses and one that is compiled with Numpy support turned on. It also needs to be somewhere Python can find it.
UPDATE: Added project to surface option to project the remeshed object back to the original surface. Bugfix: All meshes should be now remeshable (including those with ngons).
I’m trying to make it on Os X, and it’s really bloody. I’ve thought using brew would give advantages, but I’ll get back to compile everything on place. That accounts for boost, boost_python, and so on directly from source…
By the way, Blender can be built with openvdb support if you enable the cmake option while you build from source; but it doesn’t have boost-python…
About numpy: what version you used, exactly? I’m not sure if use the one who is in Blender or else…
I have to check the docs again.
@kabu: On Linux I just focused on building OpenVDB and PyOpenVDB first using the system provided libraries for Python 3. When the pyopenvdb.so was built I went to that folder and ran Python 3 and typed “import pyopenvdb”. Once that started working, I simply copied the pyopenvdb.so to the Blender addon folder. Also on Windows I’m not using any of the Blender libraries, as they are not really compiled with right flags and have some things missing.
Really I do not know how to compare addon vs modifier speed. Also I guess that Modifier has the advantage to be written in C and be better integrated with blender. But in case using OpenVDB for this have many advantages, How complicated would it be to use this for a new modifier and write this in C for Blender?
UPDATE:Got it working on Windows 64-bit. Instructions on Gumroad. Also price change as it required a lot of hard work to get it working. I’ll fix all the minor things later. I need some rest right now. :spin:
@YAFU: It’s wouldn’t be that much faster as most of the processing is inside OpenVDB and the data is transferred through Numpy arrays.
edit: There’s currently a bug that you need to apply transform (rotation, translation, etc) for the project to surface feature work properly. I’ll fix it tomorrow.
I would think that you are familiar with this Houdini sneak peek https://vimeo.com/239828144,
just in case not, around 01:50 min they show their polygon reduction tool with UV conservation,
pretty neat as the all the other tools they show.
@kabu: Yeah, on Windows I pretty much compiled everything from source (except Python) using cmake. Dependencies -> OpenVDB shared libs -> OpenVDB Python module -> PyOpenVDB with Numpy 1.13, in order of milestones. A lot of tweaking configuration files and source code to get it running. Boost 1.66, c-blosc-1.14.3, glew-2.1.0, ilmbase-2.2.1, openexr-2.2.1, tbb2017, zlib-1.2.11.
On Linux it was 100x easier. Just configure it to run Python module with Numpy and make -j8.