Yes, you can use OpenAI’s GPT AI to Create Geometry in SketchUp

Yes, you can use OpenAI’s GPT AI to Create Geometry in SketchUp

AI can create a box from a text prompt and even show a completion message Just like everyone else these days I have been trying out OpenAI's ChatGPT and Microsoft's Bing (which now also uses the same AI - artificial intelligence - engine). One of my lines of exploration (beyond "what does this thing know about me?") was the question whether it can auto-generate SketchUp Ruby code with AI. And - as it turns out - it can do that. Albeit with some caveats. As a start, you can go to ChatGPT and (after signing up) ask a reasonably specific question like "Which Ruby code would draw a box in SketchUp?". That would spit out somewhat appropriate code that you can just paste into e.g. the Ruby Code Editor. Apparently the SketchUp API is part of its knowledge base and generating SketchUp-specific Ruby code is thus well within its grasp. You could even refine the query with a comment like "Isn't there...
Read More
Intro to Coding in SketchUp with the Ruby Code Editor

Intro to Coding in SketchUp with the Ruby Code Editor

This video provides an introduction to Ruby scripting with the Ruby Code Editor extension in SketchUp. Scripting in SketchUp is also a good "intro to coding" exercise because you not only learn a usable scripting language (Ruby), you can even use it to create 3D models that you can manufacture (e.g. 3D print) afterwards. Tutorial Video https://www.youtube.com/watch?v=cKz6m7sR-uw&feature=youtu.be This is a free sample instructional video from the book "Architectural Design with SketchUp: 3D Modeling, Extensions, BIM, Rendering, Making, and Scripting" (2nd Edition). I discuss this topic more in detail in that book's Chapter 7. Want more of these videos? If you own the book, use the password from the inside cover to gain access to all of my remaining videos on Wiley's website: http://www.wiley.com/go/schreyer2e. If you don't yet have your own copy, follow the links in the sidebar to get one. It is a great reference for SketchUp! ...
Read More
Fun with Coding in SketchUp (for All Ages)

Fun with Coding in SketchUp (for All Ages)

In this video tutorial I show how you can use Ruby coding in SketchUp to have some fun: Create 3D geometry, draw with code, bend the software to your will... No need for previous coding experience. This can even serve as an introductory "learn to code" curriculum. Tutorial Video https://youtu.be/BlC7eerfS1U?list=PLxUo4IvucruefSR-dwEs7pHAjQZgoOhw0 This is a free sample instructional video from the book "Architectural Design with SketchUp: 3D Modeling, Extensions, BIM, Rendering, Making, and Scripting" (2nd Edition). I discuss this topic more in detail in that book's Chapter 7. Want more of these videos? If you own the book, use the password from the inside cover to gain access to all of my remaining videos on Wiley's website: http://www.wiley.com/go/schreyer2e. If you don't yet have your own copy, follow the links in the sidebar to get one. It is a great reference for SketchUp! ...
Read More
Just Published: Two New SketchUp Extensions (Random Tools & Scale By Tools)

Just Published: Two New SketchUp Extensions (Random Tools & Scale By Tools)

I just published two new SketchUp extensions that were both based on Ruby code that was either previously posted on this site or in my book, Architectural Design with SketchUp". Random Tools Ever wanted to place large swaths of randomly-arranged grass in SketchUp as shown in the image above? Have you been frustrated by textures that repeat a bit too much on copied wood boards? Do I have an extension for you... Read the announcement Scale By Tools Using the provided tools, you can scale, move or rotate objects based on an image or a mathematical equation. For the equation, you can choose between a trigonometric function or a power function. It is also possible to use image data to push/pull faces or move vertices, which can be useful to create ripples on water or a heightfield topography. Read the announcement...
Read More
Creating Variation in Textures for Rendering (Ruby Snippet)

Creating Variation in Textures for Rendering (Ruby Snippet)

This post follows a theme that I explored in several other of my script examples as well: Copied objects in SketchUp don't appear overly realistic if they represent natural items; their geometry is simply too perfect. This is true for landscape items (trees, shrubs) but also for things like wooden boards (see left side in the image above): On a collection of real boards, the knots would be distributed somewhat randomly, not as shown here. Textures before (left) and after (right) Turns out, we can fix this easily with a few lines of code. Just select textured objects, run the code snippet below, and your textures are randomized enough to look realistic (as can be seen in the right side of the image above). TIP:Want to use this without coding? This script is also in one of the tools of my Random Tools extension. Drag the slider to see the result of this code Let's Explore the Code, Step by Step The following steps reference the...
Read More