Search the Community
Showing results for tags 'voxelization'.
Found 1 result
Is it possible, analytically to voxalize a surface by displacing P along N to floored P planes? Analytically meaning not using Ray or intersect() but in shading for example. Basic flooring: Attempted point projection to floored planes: On a simple circle/sphere, I would need to iterate over neighbouring cells (a'la vornoi loop) and check if P is above or below the plane? Then there is a question of tight bends where the normal doesn't intersect any floored planes. Currently I'm stuck at projections being clipped by voxel size in all directions. The script belwo is as far as I got (also included HIP). Initially I had a feeling that there is a elegant/simple solution but now I suspect there is a simple proof/example that its impossible. VEX Wrangler prototype: vector P = v@P; vector N = -v@N; // tangent in case of a curve vector floorX = set(floor(P.x), P.y, 0); vector floorY = set(P.x, floor(P.y), 0); // adjacent vector dirX = floorX - P; vector dirY = floorY - P; // theta float tX = dot(normalize(dirX), N); float tY = dot(normalize(dirY), N); // hypotenuse length float lX = length(dirX) / tX; float lY = length(dirY) / tY; float planesMin = min(lX, lY); v@P = v@P + (N * planesMin); scene: voxelisation.hipnc