You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I am not very familiar with paralell.js. However, since the actual voxelizer engine doesn’t use any GPU calculations, it should be quite possible to run several voxelization processes in parallel. I took a very quick look at the library, and from what I can tell you should be able to voxelize multiple OBJ files with it 👌
Upon running it with parallel.js the binvox do not get generated, also i did not observe error message. I created a function to export voxels from obj file paths. The function exportBinvox takes the source and desitnation paths stored in paths and exports the binvox.
Can you please guide what could be the possible cause for it ?
function exportBinvox(paths){
var manager = new THREE.LoadingManager();
var loader = new THREE.OBJLoader( manager );
loader.load(paths[0],
function(object){
const sampler = new Sampler('raycast', options);
const resolution = 512;
let data = sampler.sample(object, resolution);
const fs = require('fs');
const binexporter = new BINVOXExporter();
binexporter.parse(data, function (binvox) {
fs.writeFile(paths[1], Buffer.from(binvox), function(err){
if (err) return console.log(err);
});
});
},function ( xhr ) {
// console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
},
// called when loading has errors
function ( error ) {
console.log( 'An error happened : ' + paths[0]);
console.log(error);
}
)
}
var Parallel = require('paralleljs');
var p = new Parallel(paths);
log = function () { console.log('done'); };
p.map(exportBinvox).then(log)
console.log('done');
Activity
andstor commentedon Dec 21, 2020
Hi!
I am not very familiar with paralell.js. However, since the actual voxelizer engine doesn’t use any GPU calculations, it should be quite possible to run several voxelization processes in parallel. I took a very quick look at the library, and from what I can tell you should be able to voxelize multiple OBJ files with it 👌
aradhyamathur commentedon Dec 22, 2020
Upon running it with parallel.js the binvox do not get generated, also i did not observe error message. I created a function to export voxels from obj file paths. The function
exportBinvoxtakes the source and desitnation paths stored inpathsand exports the binvox.Can you please guide what could be the possible cause for it ?