Closed codri closed 3 years ago
It should be possible to pass floats into most inputs; it might be necessary to disable caching, refresh the page, or open it in a new tab, however (some backend instabilities still remain). Can you paste a link to the model that you find to give you the error?
I’ll modify the fog based on the bounding box of the model so it’s always visible.
I'm trying to understand if I'm doing something wrong. In openscad the units are arbitrary(within the float value range), I used to choose 1mm as the base unit. I assumed it was the same here. But the fog it makes it seem like there is a limit on size. In the example there is a 400mmx400mm frame.
Great project btw, it fixes almost all the problems I had with openscad, and it strongly makes me abandon my own in progress lua based openscad version. I was planning to add PBR materials, maybe native bom support, all in a lua DSL that renders natively, all a whole bunch of other plans.
But we'll see, maybe I'll steal your viewer style, since Phong shadings seems good enough for now along with the nice plane and maybe even the fog.
You've done nothing wrong 👍 ; I've only used Cascade Studio for small 3D printing projects, so I never ran into any of the issues associated with dimensionally large objects. I just added some logic that will push the fog back according to the bounding box of the exported parts, so the part in your link can be seen clearly now. I'm also not seeing any issues with floating-point numbers, so I assume it was just a bad session state.
For what it's worth, CascadeStudio uses a Matcap Material to do its shading. It's a cheap trick where you simply sample a texture according to a fragment's screen-space normals (without any regard to lighting calculations). Someday it would be nice to blend it with an Envmap and add some SSAO to achieve a prettier preview (ala Fusion 360). Heck, maybe we'll even get WebRTX at some point xD
Hi,
I assume the system is made for arbitrary units, like openscad. When I assume the units to be mm, and I make a 15mmx15mmx400mm prism the fog hides most of the model. If I try and scale the units down, ex: instead of passing 15, 400, I'm passing 1.4 and 40, I get this error:
It looks like not all the functions accept both floats and ints, or it's not possible to mix argument types.
Is this intentional? I see that the fog is added in the three.js scene, I assume it's some sort of a standard scene type. Maybe it's worth allowing adjusting the fog intensity? Or add the ability to toggle it?
Thanks