Exploring the Potential of Voice-to-3D Modeling

By on April 15th, 2024 in models, news

Tags: , , , , ,

OpenSCAD generating a 3D model from AI-created code [Source: Fabbaloo]

Could you use voice commands to generate 3D models? It turns out you can – for free!

I watched a fascinating video posted by Reddit contributor bharms27. In the video, bharms27 requires a half dozen cylindrical spacers for a project. His workflow is astonishing:

  • He speaks aloud a description of the parts required into ChatGPT
  • ChatGPT generates some code to create the required models
  • The code is pasted into software for execution
  • The 3D models are generated and exported
  • The 3D models are imported to a slicer for 3D printing

This all happens in only 45 SECONDS!

The ChatGPT prompt used was:

ā€œGenerate code to create a cylinder with a diameter of one inch, a height of half an inch, and an interior diameter of half an inch. Create six of them and put them on a grid.ā€

How is this possible? Letā€™s look at the steps involved.

The AI used was said to be ChatGPT 3.5, the free version. bharms27 speaks into the mobile app, as the voice feature now seems to be available without a subscription. Speaking into the app results in a conversation thatā€™s echoed in your ChatGPT history, where the code can be found.

[Aside: If you havenā€™t tried the speak feature on ChatGPT, it is quite incredible: you can literally have conversations with the AI in voice. Ideal for long car trips.]

The next step was to ā€œrun the codeā€. It turns out the code is for Grasshopper, the popular plugin for Rhino3D CAD software. Grasshopper provides a way to make a kind of flowchart that represents the steps to design a 3D object. Instead of doing these actions by hand, Grasshopper documents them. And documents can be made externally and imported, as is done here.

Rhino3D then executes the Grasshopper script and created the 3D models, which are then exported as STL using the Lunchbox plugin to Rhino3D.

However, thereā€™s a big catch here: you have to have a paid license for Rhino3D (which includes Grasshopper). Currently, the price of Rhino3D is US$995 for a single user, which is more than many can afford, particularly when there are many lower priced 3D tools available, some even free.

Could this workflow be modified to become an entirely free sequence? I think it can.

The first part of the sequence is almost identical: speak the prompt into ChatGPTā€™s voice feature. However, specify that you want the code made for OpenSCAD, a free programmatic 3D modeling tool. Hereā€™s the prompt I used:

ā€Generate OpenSCAD code to generate a cylinder with a diameter of one inch, a height of half an inch, and an interior diameter of half an inch. Create six of them and put them on a grid.ā€

ChatGPT immediately responds with not only the entire code sequence, but also a detailed explanation of the requirements it derived from the prompt, an explanation of how the code works and even advice on how to use it.

Note that the code is not actually spoken out, as it is long and boring. ChatGPT said you can find it in your chat history, which I did.

I then pasted the code into the OpenSCAD app, which can then execute the code. I got this in the preview, shown at top.

With a render and export as STL I was then able to import this into PrusaSlicer for job prep:

3D models ready for 3D printing, all made from voice! [Source: Fabbaloo]

This is quite amazing, and extremely easy to do. It does take only a few seconds to do this, although you have to be very clear in your prompt describing the object.

Itā€™s likely this approach is usable only for relatively simple objects, as it would be increasingly more difficult to describe complex objects. However, getting models like this made in only seconds is still faster than me doing this by hand.

Iā€™m hoping someone can integrate OpenSCAD and ChatGPT together into some kind of ā€œvoice-to-3Dā€ system that would make this even easier. Perhaps it can even be integrated directly into the slicing software itself!

As they say, try it, youā€™ll like it.

Via Reddit, OpenAI and OpenSCAD

By Kerry Stevenson

Kerry Stevenson, aka "General Fabb" has written over 8,000 stories on 3D printing at Fabbaloo since he launched the venture in 2007, with an intention to promote and grow the incredible technology of 3D printing across the world. So far, it seems to be working!

Leave a comment

Your email address will not be published. Required fields are marked *