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
// test.rhai
fn sdBox(x, y, z, xlen, ylen, zlen) {
let qx = abs(x) - xlen;
let qy = abs(y) - ylen;
let qz = abs(z) - zlen;
let qxm = max(qx, 0.0);
let qym = max(qy, 0.0);
let qzm = max(qz, 0.0);
let qlen = sqrt(square(qxm) + square(qym) + square(qzm));
qlen + min(max(qy, max(qx, qz)), 0.0)
}
let mybox = sdBox(x, y, z, 0.5, 0.5, 0.5);
draw(mybox);
rendering this script with the viewer demo in 3D heightmap and 2D SDF mode works as expected, but the 3D color mode produces no output. Running fidget-cli mesh -i test.rhai -o test.stl -d 6 also produces no useable output. This is probably a stupid error on my part; if not, let me know what other info to provide for debugging.
Thanks!
The text was updated successfully, but these errors were encountered:
This shape does not have well-defined partial derivatives near the surface, which is necessary to render normals. Specifically, it takes sqrt(0.0), whose partial derivatives are undefined and return NaN.
fidget-viewer test.rhai
rendering this script with the viewer demo in 3D heightmap and 2D SDF mode works as expected, but the 3D color mode produces no output. Running
fidget-cli mesh -i test.rhai -o test.stl -d 6
also produces no useable output. This is probably a stupid error on my part; if not, let me know what other info to provide for debugging.Thanks!
The text was updated successfully, but these errors were encountered: