Comparison of OpenSCAD and Cadmium in an CSG-only design

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

Comparison of OpenSCAD and Cadmium in an CSG-only design

Baxsie
I have never been sad about OpenSCAD, it is a great program and the only 3d program I use.

But it would be nice to allow it to render more complex models much faster and without the risk of the "thrown together" "F4" bug.

What do programs like Thingiview (the browser based viewer on Thingiverse) or the 3-d viewer in RepG use? Those seem to be super fast compared to OpenSCAD.

Solidworks free e-viewer http://www.edrawingsviewer.com/ also seems to be pretty much instant.

Those only show STL, is STL viewing somehow  simple and fast compared to what OpenSCAD is doing? What makes them so fast?

Is there any way that the "F4" and "F6" times of OpenSCAD could be sped up by 10x to 100x?


Reply | Threaded
Open this post in threaded view
|

Re: Comparison of OpenSCAD and Cadmium in an CSG-only design

Whosawhatsis
The difference between OpenSCAD's renders and those is that OpenSCAD's
renders involve CSG calculations (or in the case of OpenCSG, using
z-index hacks to emulate them) to generate polygons before throwing
them up on the screen. Thingiview and RepG only have to parse an STL
file to generate the same polygons, because the CSG rendering
(assuming that is the source of the model) has already been done. It's
like the difference between generating the Mandelbrot Set and opening
a jpeg of it.

BTW, you can significantly speed up your renderings by not trying to
render your curves with such absurdly high numbers of facets, at least
until you are ready to output an STL. I use this method with my Portal
turret (http://www.thingiverse.com/thing:8277) to visualize the
placement of things with $fn = 18, then add a zero when I'm ready to
render the smoothed curves. Also, when there's a sub-assembly that is
finished and you don't need to mess with its parts, you can enclose it
in a render() statement and openSCAD will cache its mesh, so that
those CSG functions don't need to be recalculated every time you
render. The first render might take longer, but it can dramatically
speed up subsequent rendering.

On Sun, Jul 24, 2011 at 10:40 AM, Brent Crosby <[hidden email]> wrote:

> I have never been sad about OpenSCAD, it is a great program and the only 3d
> program I use.
> But it would be nice to allow it to render more complex models much faster
> and without the risk of the "thrown together" "F4" bug.
> What do programs like Thingiview (the browser based viewer on Thingiverse)
> or the 3-d viewer in RepG use? Those seem to be super fast compared to
> OpenSCAD.
> Solidworks free e-viewer http://www.edrawingsviewer.com/ also seems to be
> pretty much instant.
> Those only show STL, is STL viewing somehow  simple and fast compared to
> what OpenSCAD is doing? What makes them so fast?
> Is there any way that the "F4" and "F6" times of OpenSCAD could be sped up
> by 10x to 100x?
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>
>

Reply | Threaded
Open this post in threaded view
|

Use of render (...)

Ian Shumsky
Based on the following quote (by Whosawhatsis in the ' Re: [OpenSCAD] Comparison of OpenSCAD and Cadmium in an CSG-only design ' thread') I'm quite interested by the use of the Render (...) statement

"Also, when there's a sub-assembly that is finished and you don't need to mess with its parts, you can enclose it in a render() statement and openSCAD will cache its mesh, so that those CSG functions don't need to be recalculated every time you render. The first render might take longer, but it can dramatically speed up subsequent rendering."

Would someone be able to post a small example of how to use this? The docs are not too clear...

Many thanks,
Ian


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Use of render (...)

Giles Bathgate-2
On 27 July 2011 14:06, Ian Shumsky <[hidden email]> wrote:
> Based on the following quote (by Whosawhatsis in the ' Re: [OpenSCAD] Comparison of OpenSCAD and Cadmium in an CSG-only design ' thread') I'm quite interested by the use of the Render (...) statement
>
> "Also, when there's a sub-assembly that is finished and you don't need to mess with its parts, you can enclose it in a render() statement and openSCAD will cache its mesh, so that those CSG functions don't need to be recalculated every time you render. The first render might take longer, but it can dramatically speed up subsequent rendering."

Well I think what Whosawhatsis wrote is misleading. Firstly, every
time you render using CGAL (F6) *ALL* the objects are cached, so that
if you don't modify a sub assembly it will just fetch it from the
cache.

All render() actually does is force rendering for the child nodes via
CGAL even when you press Preview (F5) (Usually it would just render
the whole thing using openCSG) So it kind of speeds things up in
preview mode a bit, but doesn't make any difference for render using
CGAL.

Regards

Giles.
Giles

Reply | Threaded
Open this post in threaded view
|

Re: Use of render (...)

Whosawhatsis
True. I was talking about OpenCSG renders. CGAL renders are cached and
reused when possible, but an OpenCSG render must start from scratch
each time unless you use a render() statement to force a cacheable
CGAL rendering.

It DOES make a difference for CGAL rendering in that it will pre-cache
and assembly when you do an OpenCSG preview, so it will already be
cached when you are ready to do your CGAL render to export. Proper use
of render() allows you to quickly display the sub-assemblies that are
not changing by caching a mesh AND use OpenCSG to quickly display the
parts of the model that you are actively changing.

On Wed, Jul 27, 2011 at 7:02 AM, Giles Bathgate
<[hidden email]> wrote:

> On 27 July 2011 14:06, Ian Shumsky <[hidden email]> wrote:
>> Based on the following quote (by Whosawhatsis in the ' Re: [OpenSCAD] Comparison of OpenSCAD and Cadmium in an CSG-only design ' thread') I'm quite interested by the use of the Render (...) statement
>>
>> "Also, when there's a sub-assembly that is finished and you don't need to mess with its parts, you can enclose it in a render() statement and openSCAD will cache its mesh, so that those CSG functions don't need to be recalculated every time you render. The first render might take longer, but it can dramatically speed up subsequent rendering."
>
> Well I think what Whosawhatsis wrote is misleading. Firstly, every
> time you render using CGAL (F6) *ALL* the objects are cached, so that
> if you don't modify a sub assembly it will just fetch it from the
> cache.
>
> All render() actually does is force rendering for the child nodes via
> CGAL even when you press Preview (F5) (Usually it would just render
> the whole thing using openCSG) So it kind of speeds things up in
> preview mode a bit, but doesn't make any difference for render using
> CGAL.
>
> Regards
>
> Giles.
> Giles
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>

Reply | Threaded
Open this post in threaded view
|

Re: Use of render (...)

Ian Shumsky
Thanks for the feedback!

Cheers,
Ian



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________