discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

OpenSCAD in Blender

E
emogenet@gmail.com
Sun, Apr 24, 2022 7:38 AM

Hi folks,

Long time user of OpenSCAD here, which - as someone with a coder background - is my favorite tool for creating quick CAD-like objects.

However, I am also a very long time Blender user, which IMO is unparalleled in the FOSS world for many things, but specifically for 3D navigation and interacting with 3D geometry in general.

So, I’ve had an itch I wanted to scratch for a very long time: the power and quickness of OpenSCAD for modeling, married with the power and depth of Blender for 3D navigation (and many other things).

I’ve started experimenting with the idea, and while there is still a lot to do and a lot to figure out and optimize in terms of workflow, I have built something that has reached usability level.

If you guys want to take a look, here’s what that looks like:

https://www.youtube.com/watch?v=aZq8ZlmqHJo  (watch in 2160p if you can)

There are a lot more that needs to be done to make it as (or even more) usable as the native OpenSCAD GUI, but I plan to get there in the coming month.

Would love feedback / ideas.

Hi folks, Long time user of OpenSCAD here, which - as someone with a coder background - is my favorite tool for creating quick CAD-like objects. However, I am also a very long time Blender user, which IMO is unparalleled in the FOSS world for many things, but specifically for 3D navigation and interacting with 3D geometry in general. So, I’ve had an itch I wanted to scratch for a very long time: the power and quickness of OpenSCAD for modeling, married with the power and depth of Blender for 3D navigation (and many other things). I’ve started experimenting with the idea, and while there is still a lot to do and a lot to figure out and optimize in terms of workflow, I have built something that has reached usability level. If you guys want to take a look, here’s what that looks like: https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can) There are a lot more that needs to be done to make it as (or even more) usable as the native OpenSCAD GUI, but I plan to get there in the coming month. Would love feedback / ideas.
SP
Sanjeev Prabhakar
Sun, Apr 24, 2022 4:00 PM

very good work.
your voice is not very clear in the video.
Can you please list down the benefits of working in blender as I have
almost no experience in blender.
Is it possible to modify the openscad model through blender tools?

On Sun, 24 Apr 2022 at 13:08, emogenet@gmail.com wrote:

Hi folks,

Long time user of OpenSCAD here, which - as someone with a coder
background - is my favorite tool for creating quick CAD-like objects.

However, I am also a very long time Blender user, which IMO is
unparalleled in the FOSS world for many things, but specifically for 3D
navigation and interacting with 3D geometry in general.

So, I’ve had an itch I wanted to scratch for a very long time: the power
and quickness of OpenSCAD for modeling, married with the power and depth of
Blender for 3D navigation (and many other things).

I’ve started experimenting with the idea, and while there is still a lot
to do and a lot to figure out and optimize in terms of workflow, I have
built something that has reached usability level.

If you guys want to take a look, here’s what that looks like:

https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can)

There are a lot more that needs to be done to make it as (or even more)
usable as the native OpenSCAD GUI, but I plan to get there in the coming
month.

Would love feedback / ideas.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

very good work. your voice is not very clear in the video. Can you please list down the benefits of working in blender as I have almost no experience in blender. Is it possible to modify the openscad model through blender tools? On Sun, 24 Apr 2022 at 13:08, <emogenet@gmail.com> wrote: > Hi folks, > > Long time user of OpenSCAD here, which - as someone with a coder > background - is my favorite tool for creating quick CAD-like objects. > > However, I am also a very long time Blender user, which IMO is > unparalleled in the FOSS world for many things, but specifically for 3D > navigation and interacting with 3D geometry in general. > > So, I’ve had an itch I wanted to scratch for a very long time: the power > and quickness of OpenSCAD for modeling, married with the power and depth of > Blender for 3D navigation (and many other things). > > I’ve started experimenting with the idea, and while there is still a lot > to do and a lot to figure out and optimize in terms of workflow, I have > built something that has reached usability level. > > If you guys want to take a look, here’s what that looks like: > > https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can) > > There are a lot more that needs to be done to make it as (or even more) > usable as the native OpenSCAD GUI, but I plan to get there in the coming > month. > > Would love feedback / ideas. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
EM
Emmanuel Mogenet
Sun, Apr 24, 2022 4:50 PM

On Sun, Apr 24, 2022 at 6:01 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

very good work.

Thank you!

your voice is not very clear in the video.

My apologies, last week was my first time recording videos, it'll get
better :)

Can you please list down the benefits of working in blender as I have
almost no experience in blender.

Blender is a free, very complete 3D environment: modeling, animation,
texturing, shading, rendering, compositing, etc ... it's all there under
one roof.

It was originally designed for special effects work, but it is now very
general and its 3D navigation, mesh manipulation and rendering is top notch.

People use it nowadays for far more then SFX: CAD, Archi, design, painting,
etc ...

Here's a very recent example of a non SFX use:
https://www.youtube.com/watch?v=92QmjS-xDaI

Plus the feature list is essentially bottomless (I think it's 30 years old
software and it has plugins for everything).

I personally find its GUI vastly more powerful than the native OpenSCAD UI
for manipulating 3D meshes.

Is it possible to modify the openscad model through blender tools?

Yes.

More precisely, Blender has two work modes:
- destructive (direct mesh edition)
- non-destructive (geometry nodes).

In the destructive mode, all changes you make to an OpenSCAD mesh will
disappear if you change the OpenSCAD code and re-generate the mesh.
So, in that mode, you "bake" the OpenSCAD model once and for all and then
edit it further with Blender.

In the non-destructive mode (geometry nodes) you work in a setup similar to
OpenSCAD: every time you change the OpenSCAD code, everything gets
recomputed: the OpenSCAD mesh and all the geometry nodes you applied to it
subsequently.

The one downside to Blender: the initial learning curve is a little steep.

However:
- once you start to master it it's amazing
- there are tons of tutorial videos on YT

My personal take: once I finish this, I will make all my parametric CAD
models exclusively within Blender.

Hope this helps,

- Emmanuel

On Sun, 24 Apr 2022 at 13:08, emogenet@gmail.com wrote:

Hi folks,

Long time user of OpenSCAD here, which - as someone with a coder
background - is my favorite tool for creating quick CAD-like objects.

However, I am also a very long time Blender user, which IMO is
unparalleled in the FOSS world for many things, but specifically for 3D
navigation and interacting with 3D geometry in general.

So, I’ve had an itch I wanted to scratch for a very long time: the power
and quickness of OpenSCAD for modeling, married with the power and depth of
Blender for 3D navigation (and many other things).

I’ve started experimenting with the idea, and while there is still a lot
to do and a lot to figure out and optimize in terms of workflow, I have
built something that has reached usability level.

If you guys want to take a look, here’s what that looks like:

https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can)

There are a lot more that needs to be done to make it as (or even more)
usable as the native OpenSCAD GUI, but I plan to get there in the coming
month.

Would love feedback / ideas.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

On Sun, Apr 24, 2022 at 6:01 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > very good work. > Thank you! > your voice is not very clear in the video. > My apologies, last week was my first time recording videos, it'll get better :) > Can you please list down the benefits of working in blender as I have > almost no experience in blender. > Blender is a free, *very* complete 3D environment: modeling, animation, texturing, shading, rendering, compositing, etc ... it's all there under one roof. It was originally designed for special effects work, but it is now very general and its 3D navigation, mesh manipulation and rendering is top notch. People use it nowadays for far more then SFX: CAD, Archi, design, painting, etc ... Here's a very recent example of a non SFX use: https://www.youtube.com/watch?v=92QmjS-xDaI Plus the feature list is essentially bottomless (I think it's 30 years old software and it has plugins for everything). I personally find its GUI vastly more powerful than the native OpenSCAD UI for manipulating 3D meshes. > Is it possible to modify the openscad model through blender tools? > Yes. More precisely, Blender has two work modes: - destructive (direct mesh edition) - non-destructive (geometry nodes). In the destructive mode, all changes you make to an OpenSCAD mesh will disappear if you change the OpenSCAD code and re-generate the mesh. So, in that mode, you "bake" the OpenSCAD model once and for all and then edit it further with Blender. In the non-destructive mode (geometry nodes) you work in a setup similar to OpenSCAD: every time you change the OpenSCAD code, everything gets recomputed: the OpenSCAD mesh and all the geometry nodes you applied to it subsequently. The one downside to Blender: the initial learning curve is a little steep. However: - once you start to master it it's amazing - there are *tons* of tutorial videos on YT My personal take: once I finish this, I will make all my parametric CAD models exclusively within Blender. Hope this helps, - Emmanuel > > On Sun, 24 Apr 2022 at 13:08, <emogenet@gmail.com> wrote: > >> Hi folks, >> >> Long time user of OpenSCAD here, which - as someone with a coder >> background - is my favorite tool for creating quick CAD-like objects. >> >> However, I am also a very long time Blender user, which IMO is >> unparalleled in the FOSS world for many things, but specifically for 3D >> navigation and interacting with 3D geometry in general. >> >> So, I’ve had an itch I wanted to scratch for a very long time: the power >> and quickness of OpenSCAD for modeling, married with the power and depth of >> Blender for 3D navigation (and many other things). >> >> I’ve started experimenting with the idea, and while there is still a lot >> to do and a lot to figure out and optimize in terms of workflow, I have >> built something that has reached usability level. >> >> If you guys want to take a look, here’s what that looks like: >> >> https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can) >> >> There are a lot more that needs to be done to make it as (or even more) >> usable as the native OpenSCAD GUI, but I plan to get there in the coming >> month. >> >> Would love feedback / ideas. >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
J
jon
Sun, Apr 24, 2022 6:52 PM

I watched the video, and I am unclear how this offers any advantage over
developing the geometry in OpenSCAD, generating an STL file, and then
opening the STL file inside Blender.

You say that Blender has better "3D navigating": can you provide an
example?  I've not had any problems with 3D navigation in OpenSCAD itself.

On 4/24/2022 3:38 AM, emogenet@gmail.com wrote:

Hi folks,

Long time user of OpenSCAD here, which - as someone with a coder
background - is my favorite tool for creating quick CAD-like objects.

However, I am also a very long time Blender user, which IMO is
unparalleled in the FOSS world for many things, but specifically for
3D navigation and interacting with 3D geometry in general.

So, I’ve had an itch I wanted to scratch for a very long time: the
power and quickness of OpenSCAD for modeling, married with the power
and depth of Blender for 3D navigation (and many other things).

I’ve started experimenting with the idea, and while there is still a
lot to do and a lot to figure out and optimize in terms of workflow, I
have built something that has reached usability level.

If you guys want to take a look, here’s what that looks like:

https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can)

There are a lot more that needs to be done to make it as (or even
more) usable as the native OpenSCAD GUI, but I plan to get there in
the coming month.

Would love feedback / ideas.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I watched the video, and I am unclear how this offers any advantage over developing the geometry in OpenSCAD, generating an STL file, and then opening the STL file inside Blender. You say that Blender has better "3D navigating": can you provide an example?  I've not had any problems with 3D navigation in OpenSCAD itself. On 4/24/2022 3:38 AM, emogenet@gmail.com wrote: > > Hi folks, > > Long time user of OpenSCAD here, which - as someone with a coder > background - is my favorite tool for creating quick CAD-like objects. > > However, I am also a very long time Blender user, which IMO is > unparalleled in the FOSS world for many things, but specifically for > 3D navigation and interacting with 3D geometry in general. > > So, I’ve had an itch I wanted to scratch for a very long time: the > power and quickness of OpenSCAD for modeling, married with the power > and depth of Blender for 3D navigation (and many other things). > > I’ve started experimenting with the idea, and while there is still a > lot to do and a lot to figure out and optimize in terms of workflow, I > have built something that has reached usability level. > > If you guys want to take a look, here’s what that looks like: > > https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can) > > There are a lot more that needs to be done to make it as (or even > more) usable as the native OpenSCAD GUI, but I plan to get there in > the coming month. > > Would love feedback / ideas. > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
J
jon
Sun, Apr 24, 2022 6:54 PM

I believe that the correct answer is "no".  It is possible to modify the
OpenSCAD mesh using Blender tools, but nothing that you do in Blender
can modify the OpenSCAD model (source code).

On 4/24/2022 12:50 PM, Emmanuel Mogenet wrote:

 Is it possible to modify the openscad model through blender tools?

Yes.

I believe that the correct answer is "no".  It is possible to modify the OpenSCAD mesh using Blender tools, but nothing that you do in Blender can modify the OpenSCAD model (source code). On 4/24/2022 12:50 PM, Emmanuel Mogenet wrote: > > Is it possible to modify the openscad model through blender tools? > > > Yes.
EM
Emmanuel Mogenet
Sun, Apr 24, 2022 8:00 PM

On Sun, Apr 24, 2022 at 8:52 PM jon jon@jonbondy.com wrote:

I watched the video, and I am unclear how this offers any advantage over
developing the geometry in OpenSCAD, generating an STL file, and then
opening the STL file inside Blender.

To answer your question directly, the workflow you describe is slower than
having everything within the same software, especially if you have to
iterate.

Specifically, the workflow you describe makes the "change code" -> "see
object" -> "figure out what to change" -> "change code" -> ... etc very
slow, especially when the "figure out what to change" involves measuring
anything on the resulting geometry.

As discussed in another post on this thread, OpenSCAD sorely lacks
introspection features (you can't compute things like the centroid or the
bounding box of an object programmatically and use the result as a
parameter controlling the behavior of other objects).

For example: placing a sphere at the center of mass of a complex assembly
is very hard to do in OpenSCAD.

Or more simply, placing four spheres at the corners of a cube that has been
rotated and scaled at the bottom of a piece of code that's in a library is
almost impossible to do in OpenSCAD.

There are many more examples, but here is where I find the current SCAD UI
very limiting:
- you can't measure the dimensions of anything
- you can't compute the area / volume of things
- you can't compute the centroid of an object or a set of vertices
- it is very hard to display parts of the objects (cross sections for
example), you are obliged to do it with CSG ops in the scad code itself.
It's a PITN because these "visualization cuts" are typically ephemeral,
only needed to look briefly at hidden things.
- you can't visualize details of the computed geometry with the same
level of details you can in Blender (normals, x-ray mode, shading, matcap
shading, etc...)

Blender comes with all of these features built-in.

You say that Blender has better "3D navigating": can you provide an
example?

Sure, and this what follows is just a bunch of very simple examples

In Blender, when you want to focus the camera on a very specific part of an
object, here's the sequence:
- Press 'Tab' (got to edit mode)
- Press '1' (vertex select mode)
- Drag a small selection square around the set of vertices you want to
focus on
- Press 'NumPad 1' (center viewport camera + zoom on selection)
I don't know how to do that in SCAD.

Here's another: say you want to view a cross-section of a complex object.
In Blender:
- Move the camera to a desired position
- Press 'Alt+B'
- Draw the cross-section box
- All subsequent workflow displays only the part of the object within
the clipping frustum you just defined
Same thing: AFAIK, no equivalent feature in SCAD UI.

Navigate to different "special" views:
- Press 'Numpad 1' : Front view
- Press 'Numpad 7' : Top view
- Press 'Numpad 4,6,8,2' : rotate resp. left, right, up, down by 45
degrees
etc ...
- Press 'Z' then Press '8' : fully lighted / rendered scene with lights
/ shadows / shaders
- Press 'Z' then Press '6' : standard unshaded solid mode (but with
possibility of making parts of the object transparent)
- Press 'Z' then Press '2' : wireframe mode
SCAD does offer some keyboard shortcuts for changing to special views,
but far less than Blender.

Hide / Show parts of the object
- 'Tab' : Edit mode
- '3'  : Facet mode
- Click + Drag: select a bunch of facets
- H : Hide facets

AFAIK, OpenSCAD UI doesn't know about facets of an object, much less how to
hide them

The two UI's simply aren't in the same league when it comes to 3D
navigation.

When I am finished with adding features to this project, I'll try to make a
video to demonstrate some of the above visually by building an object from
scratch with OpenSCAD-in-Blender.

Hope this clarifies,

  • Emmanuel
On Sun, Apr 24, 2022 at 8:52 PM jon <jon@jonbondy.com> wrote: > I watched the video, and I am unclear how this offers any advantage over > developing the geometry in OpenSCAD, generating an STL file, and then > opening the STL file inside Blender. > To answer your question directly, the workflow you describe is slower than having everything within the same software, especially if you have to iterate. Specifically, the workflow you describe makes the "change code" -> "see object" -> "figure out what to change" -> "change code" -> ... etc very slow, especially when the "figure out what to change" involves measuring anything on the resulting geometry. As discussed in another post on this thread, OpenSCAD sorely lacks introspection features (you can't compute things like the centroid or the bounding box of an object programmatically and use the result as a parameter controlling the behavior of other objects). For example: placing a sphere at the center of mass of a complex assembly is very hard to do in OpenSCAD. Or more simply, placing four spheres at the corners of a cube that has been rotated and scaled at the bottom of a piece of code that's in a library is almost impossible to do in OpenSCAD. There are many more examples, but here is where I find the current SCAD UI very limiting: - you can't measure the dimensions of anything - you can't compute the area / volume of things - you can't compute the centroid of an object or a set of vertices - it is very hard to display parts of the objects (cross sections for example), you are obliged to do it with CSG ops in the scad code itself. It's a PITN because these "visualization cuts" are typically ephemeral, only needed to look briefly at hidden things. - you can't visualize details of the computed geometry with the same level of details you can in Blender (normals, x-ray mode, shading, matcap shading, etc...) Blender comes with all of these features built-in. > You say that Blender has better "3D navigating": can you provide an > example? Sure, and this what follows is just a bunch of very simple examples In Blender, when you want to focus the camera on a very specific part of an object, here's the sequence: - Press 'Tab' (got to edit mode) - Press '1' (vertex select mode) - Drag a small selection square around the set of vertices you want to focus on - Press 'NumPad 1' (center viewport camera + zoom on selection) I don't know how to do that in SCAD. Here's another: say you want to view a cross-section of a complex object. In Blender: - Move the camera to a desired position - Press 'Alt+B' - Draw the cross-section box - All subsequent workflow displays only the part of the object within the clipping frustum you just defined Same thing: AFAIK, no equivalent feature in SCAD UI. Navigate to different "special" views: - Press 'Numpad 1' : Front view - Press 'Numpad 7' : Top view - Press 'Numpad 4,6,8,2' : rotate resp. left, right, up, down by 45 degrees etc ... - Press 'Z' then Press '8' : fully lighted / rendered scene with lights / shadows / shaders - Press 'Z' then Press '6' : standard unshaded solid mode (but with possibility of making parts of the object transparent) - Press 'Z' then Press '2' : wireframe mode SCAD does offer *some* keyboard shortcuts for changing to special views, but far less than Blender. Hide / Show parts of the object - 'Tab' : Edit mode - '3' : Facet mode - Click + Drag: select a bunch of facets - H : Hide facets AFAIK, OpenSCAD UI doesn't know about facets of an object, much less how to hide them The two UI's simply aren't in the same league when it comes to 3D navigation. When I am finished with adding features to this project, I'll try to make a video to demonstrate some of the above visually by building an object from scratch with OpenSCAD-in-Blender. Hope this clarifies, - Emmanuel
EM
Emmanuel Mogenet
Sun, Apr 24, 2022 8:06 PM

To try and answer your question:

a) the whole point of this project is to be able to modify the OpenSCAD
code directly in Blender, using Blender's built-in text editor and seeing
the result in the quickest possible way (by pressing Alt-U). But I don't
think that's what you meant.

b) No, indeed you are correct, if you apply changes to the mesh produced
by OpenSCAD using Blender native mesh editing tools, these can't be
retrofitted into the OpenSCAD source code. This would be really tricky to
do :)

However: if you apply a bunch of Blender's geometry nodes to your OpenSCAD
mesh, these are essentially a succession of transforms and mesh edits
applied non-destructively (they are remembered), and any change to the
OpenSCAD code will trigger the recompute of the entire chain, so you get
the best of both worlds.

On Sun, Apr 24, 2022 at 8:54 PM jon jon@jonbondy.com wrote:

I believe that the correct answer is "no".  It is possible to modify the
OpenSCAD mesh using Blender tools, but nothing that you do in Blender can
modify the OpenSCAD model (source code).

On 4/24/2022 12:50 PM, Emmanuel Mogenet wrote:

Is it possible to modify the openscad model through blender tools?

Yes.

To try and answer your question: a) the whole point of this project is to be able to modify the OpenSCAD code directly in Blender, using Blender's built-in text editor and seeing the result in the quickest possible way (by pressing Alt-U). But I don't think that's what you meant. b) No, indeed you are correct, if you apply changes to the mesh produced by OpenSCAD using Blender native mesh editing tools, these can't be retrofitted into the OpenSCAD source code. This would be really tricky to do :) However: if you apply a bunch of Blender's geometry nodes to your OpenSCAD mesh, these are essentially a succession of transforms and mesh edits applied non-destructively (they are remembered), and any change to the OpenSCAD code will trigger the recompute of the entire chain, so you get the best of both worlds. On Sun, Apr 24, 2022 at 8:54 PM jon <jon@jonbondy.com> wrote: > I believe that the correct answer is "no". It is possible to modify the > OpenSCAD mesh using Blender tools, but nothing that you do in Blender can > modify the OpenSCAD model (source code). > > > On 4/24/2022 12:50 PM, Emmanuel Mogenet wrote: > > > >> Is it possible to modify the openscad model through blender tools? >> > > Yes. > > > >