5 ms·
When I create a simple curved object in Blender or OpenSCAD, I see a mesh of triangles. When I create a simple curved object in Fusion 360, I see a smooth objec
by hathawsh 7y ago
When I create a simple curved object in Blender or OpenSCAD, I see a mesh of triangles. When I create a simple curved object in Fusion 360, I see a smooth object with no apparent triangles. Is Fusion 360 rendering a triangle mesh or is it doing something else?
- pcstl 7y agoAs far as I can tell, it's rendering a triangle mesh using a shader in order to create the illusion that there are no triangles. There are algorithms for rendering smooth surfaces, but for a series of reasons they tend not to be used for real-time rendering.
- Jasper_ 7y agoCAD tools can use special adaptive algorithms to triangulate NURBS curves into meshes for rendering, so there is still a mesh there as far as I know. Beyond this, there is also the property of how the material responds to light. You can have multiple triangles appear smooth because they respond to lighting in a way that does not produce seams. "Smooth" rendering will use interpolated surface normals, and "flat" rendering uses per-face normals.
- jononor 7y agoFusion 360 (or FreeCAD) renders a triangle mesh on-demand at display time from the underlying model. But that underlying model is based on solids with perfect platonic shapes like arcs, spheres etc. In Blender and OpenSCAD the underlying model is also based on triangle meshes, so they cannot do the same.
- TomVDB 7y agoAre you sure about OpenSCAD? I thought it used constructive solid geometry?
- jononor 7y agoKinda, but I primarily have a user perspective. For instance even though most of the OpenSCAD language operators are classic CSG ones, there are variables to specify the number of facets on circles etc (which does not make much sense in a pure solids world). This can be controlled globally using the $fa/$fs/$fn variable (assuming a well-behaved model). Changing these variable seems to require the entire geometry to be rebuilt. Rebuilding the model itself is slow, and it gets slower the more facets you have - indicating that this is not just a 'display' feature. I believe this is because the underlying geometry kernel, CGAL, operates on meshes. Note that OpenSCAD can also export a CSG datastructure of a model. The OpenSCAD module in FreeCAD module uses this generate B-rep based solid models using their OpenCascade kernel. This raises the point of difference between OpenSCAD and Blender. In OpenSCAD the mesh is mostly a secondary thing, an artifact of how the internals are implemented - the "primary" model the user modifies is the code itself. Where as in Blender, the mesh is the primary model being modified by user. Although the distinction is a bit blurred, as Blender has some support for NURBS these days. And one can have non-destructive operators ("modifiers") such as subdivide/array/mirror etc.
- knolan 7y agoIn Blender you can simply use smooth shading to achieve this effect. Flat shading simply shades each face while smooth shading interpolates between vertices. Try it on a cylinder and you will see the effect fall over on the sharp edge. That’s why people use the edge split modifier to get around this and keep poly count low. Of course you can also define surfaces using Bézier curves in Blender.