mesh and rendering questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mesh and rendering questions

Tom Hawkins
Hi,

I just found OpenSCAD this morning.  What a great solid modeler!  I've
been looking for something like this for a while.  Thanks!

A few questions:

Why are polygons not rendered with the real surface normals?  Is there
an option to control this?

Also, is there an automatic way to control the mesh density based on
the actual size of a primitive?  For example, the following two
spheres are the same size, but the mesh density is different.

sphere(100);      // Looks nice.

scale([100, 100, 100]) {
        sphere(1);  // Looks blocky.
}

Thanks again!

-Tom

Reply | Threaded
Open this post in threaded view
|

Re: mesh and rendering questions

Whosawhatsis
There is not an option to render surface normals, but you can tell
which side is the front face because the back faces are not rendered.
Because it's a solid modeler, the back faces of polygons should always
be obscured by the front face of another one, though there are
sometimes errors in OpenCSG renders that make this not the case.

You can't set the resolution of the sphere based on the final scaled
size because the sphere is created in a tessellated form before it is
scaled, and the CSG functions do not have the ability to look ahead to
see how big it will end up. You can, however, use the $fa, $fs and $fn
special variables to change the number of facets.

On Wed, Jun 8, 2011 at 9:30 AM, Tom Hawkins <[hidden email]> wrote:

> Hi,
>
> I just found OpenSCAD this morning.  What a great solid modeler!  I've
> been looking for something like this for a while.  Thanks!
>
> A few questions:
>
> Why are polygons not rendered with the real surface normals?  Is there
> an option to control this?
>
> Also, is there an automatic way to control the mesh density based on
> the actual size of a primitive?  For example, the following two
> spheres are the same size, but the mesh density is different.
>
> sphere(100);      // Looks nice.
>
> scale([100, 100, 100]) {
>        sphere(1);  // Looks blocky.
> }
>
> Thanks again!
>
> -Tom
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>