First Pendant

For our first foray into learning ShapeJS, we’re going to start by using 2D Images. Millions of people already know how to use 2D image tools, so if we can leverage those skills for 3D modeling we’re in business.

The advantages I see in using 2D source material are:

  • Millions of 2D capable artists compared to much fewer 3D artists
  • Easy to source free material on the internet
  • Easy to purchase high-quality assets
  • Sketching interfaces are fun and intuitive for many

 

Image Popping

The basic concept is to use a 2D image as the source to create 3D data. You specify the physical dimensions of the base and the 2D image is extruded into the Z direction. The image of the letter R on the left creates the 3D object on the right. This is the basics of what I call Image Popping. You pop the image up into the third dimension.

Image to 3D

The complete docs for the Image3D datasource are available here: See Image3D.

So now that you can use imagery in ShapeJS let’s think about what can be made with it. The first object that came to mind for me was a pendant. By simply adding a loop or a bail/connector to the top of a 2D image, you have a quick and easy 3D jewelry project. This is the basis for the Pendant Creator, one of our 2D-friendly design apps, which is a popular first creator for those new to 3D printing. You can use our pendant creator here: Pendant Creator


My First Pendant

 

That project went well, so I decided to try my hand at something dear to my heart: books! This time I conned a friend into sketching some crystal-like patterns and used that as the source material to pop up a bookmark.

 

Transformations

That was fun, but my friends rightly pointed out that I could have done that project with a laser cutter. Now I’m sad. Looks like I need to up my making game. The next level of image popping is to transform the image in some way. All ShapeJS datasources can take a Transform via the setTransform() method. A transform is a function which maps an object to a new version of itself and can significantly change a datasource. A simple transform, called a Translation, is used to move and object around in space, i.e. to move an object one unit to the right, you say new Translation (1,0,0). Other transforms can rotate and scale (change size of) an object. A more advanced transform that I commonly use is the RingWrap transform which wraps the image around a cylinder. This allows us to easily use an image to create a ring or bracelet. We used this in our Ring Popper Creator. Here are some printed examples we’ve done using that technique. The top is the printed object and the bottom is the source image used.

 

It’s pretty simple to make. You just load an image and then use the RingWrap transformation to bend it around a cylinder the size of your finger. This technique is good for making rings. If you want to make a bracelet out of it then you might want to use another transform called Scale. A scale transform changes the dimensions of an object in any direction. For your wrist you’ll notice that it’s really a squashed shape not an exact cylinder. This example takes the ring example and resizes it for your wrist with a slight scale to make it fit better: Bracelet Popper

Tiling and Symmetry

Our final example for image popping will takes us into some interesting places. Perhaps you’ve seen the cool art done by Arabic artists. Think of Alhambra, or more modern, the work of Escher. These all use tiling and symmetry patterns to make complex and pleasing patterns. Personally I’m not a great 2D artist so I find it difficult to fill an entire canvas with interesting designs. One way to get around this is to take a simple element and then transform it around your space. ShapeJS has an extensive set of support for tiling and symmetry. A later blog post will go into much greater depth but I wanted to end this post with an example that I hope inspires you. Using a single image we can tile that around a sphere. This is called an Icosahedral Symmetry and it looks like this:

Icosahedral Reflections
By Tomruen at en.wikipedia

 

The lower corner of your image is reflected around the sphere. You get 120 copies of your image rotated into different orientations. This makes for some really cool patterns from simple images. Here is an example I made into a tea light:

Tealight

You can try out this example here: Tealight.js

Using this same technique we can also make something like a candy dish. The dish is made by keeping the lower quarter of the sphere and then a base is added to make it stable.

Soap Dish

You can try out the Candy Dish example here: Candy Dish Example

2D Images make a powerful starting point for creating 3D models. ShapeJS makes it easy to use images as the source material for some fun projects. Hopefully this blog post has inspired you to create your own objects using the Image3D datasource and some simple transformations. If you have questions about ShapeJS please join us in the forums: ShapeJS Forum