“`vector @cdir; matrix camMatrix = optransform(chs(“camera”)); @cdir = cracktransform(0,0,0, {0,0,0}, camMatrix); float distance_to_cam = distance(@P, @cdir); float cam_aperture = chf(“camera_aperture”); float cam_xres = chf(“camera_xres”); float focal_length = chf(“focal_length”);
f@voxel_size = chf(“coverage”) * (cam_aperture / cam_xres) * (distance_to_cam / focal_length);“`
this is the base code in the voxel res tool I made
which is in the SYD HUG hip file
it’s in the same wheelhouse
was actually originally used to do the particle scale control hehe