ChatGPT by OpenAI is an AI language model which allows conversational input to directly convert to functional code output. There are many applications, from writing poems, creating recipes, and even critically analyzing famous texts and works of art. However, the language model also has an understanding of several programming languages and syntaxes. This makes it possible to generate 3D printable models, executable code scripts, and more, using only a text prompt. While ChatGPT isn’t quite ready to create a functional model of a complex engine, it is capable of making simple shapes and also creating programs that can be used to make 3D models.
This Guide Covers
- What is ChatGPT?
- Best Practices when using ChatGPT
- How to Directly Generate STL Files
- How to Generate Scripts for 3D Modeling
- Printing Models Made with ChatGPT
- How to Access ChatGPT
What is ChatGPT?
ChatGPT stands for Chat Generative Pre-Trained Transformer
We’ve trained a model called ChatGPT which interacts in a conversational way. The dialogue format makes it possible for ChatGPT to answer followup questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests. ChatGPT is a sibling model to InstructGPT, which is trained to follow an instruction in a prompt and provide a detailed response. Source: OpenAI
With generative AI art tools like Dall-E (also made by OpenAI) becoming progressively more common, it was only a matter of time before this technology made it to the 3D world. If you’re interested in learning more, keep reading to see how you can use ChatGPT to make 3D printable models today.
ChatGPT uses a form of input called a “prompt”, which is the input from the user directed at the AI. Because the quality of the output is dependent on the input, companies like OpenAI have developed Best Practices guides to help increase the odds of success. Generally, adding additional context or information to the initial prompt will result in a more optimal answer, specifically when asking ChatGPT to create 3D models.
If directly asked to make a 3D model, ChatGPT will typically respond with the above prompt, and occasionally give instructions on how to use these programs to create a model. While these steps are typically not very helpful, they do show that ChatGPT should not be taken at face value when providing responses as it can, in fact, create a 3D model. Simple primitive shapes like cylinders, cubes, and pyramids are usually fairly easy to generate, but asking for organic or complex models will usually result in the above denial.
Using ChatGPT to Directly Generate STL Files
3D geometry can be represented via the triangulated .STL file format, a universal standard across virtually all manufacturers and file repositories. This is also a human-readable file format if generated as ASCII .STL, which makes debugging and interpreting the output of ChatGPT a little easier.
To successfully generate an .STL file, it usually takes a few attempts that each add progressively more information to the mesh. From the above triangle example, I asked ChatGPT to use this same format to generate a cube.
It then generated six faces, which is six triangles short of a fully triangulated cube. ChatGPT will abruptly stop after a certain point when generating a large file, but adding “Continue” as a prompt will allow it to continue from where it stopped. Using the free 3D modeling program Blender, I added in the missing geometry and fixed the flipped faces (shown in red above).
Using ChatGPT to Generate Scripts for 3D Modeling
By incrementally increasing the requested complexity, the script can create gradually more complex outputs. For example, here the cube has been replaced with a sphere, and a slider has been added that controls the number of segments on the sphere, giving it a progressively more Low Poly / decimated appearance.
By also adding an “.STL Export” function, the final geometry can be exported in the ASCII .STL file format for 3D printing. The full code can be found on GitHub, and there is also a live build available if you want to try it yourself.
Featured cube model 3D printed in tri-color PLA on Elegoo Neptune 3 Pro.
Printing Models Made with ChatGPT
Programs like Blender can be used to clean and prepare these mesh files for 3D printing, as seen in the video I made covering this topic. Issues like missing triangles, flipped normals, and other mesh-related problems are common, so some manual clean-up will likely be required if the intent is to 3D print any models generated with ChatGPT. Models like the 3D printed cube are generated using arbitrary units with each side measuring one unit long, which corresponds to a single mm when imported into a slicer like PrusaSlicer.
How to Access
ChatGPT is currently available for public use and accessible directly through the OpenAI site. Use of the ChatGPT system requires an OpenAI account, which you can create using your email address. Creating an account allows users to access their full prompt history, which is a helpful way to reflect on which prompt strategies work and which don’t. While access can be limited and the service tends to have periods of interruptions, it’s still an exciting tool with a great deal of potential.
Read More: How to Use AI Art Generator for 3D Print Design
In this article, I’ll cover how to get started with AI art and text-to-image generators from the perspective of gathering references for 3D Printable products.