How to 3D Print in Full Color (Part 3): Clear + Texture Together
This is the third in a series of tutorials to help printer operators who are NOT graphic artists get the absolute most out of their multi-color, multi-material 3D printers, like the Stratasys J750.
We will cover how to create models with semi-transparent textures wrapped around curved, transparent bodies (taking advantage of a new slicer from Stratasys), and how to fix UV-mapping problems when wrapping 2D textures around 3D bodies goes wrong.
Step 1: Overview
Okay readers. Today we're going to tackle what I described in my first tutorial as the HARDEST type of full-color thing to print: semi-transparent textures wrapped around curved, transparent shapes.
This is a vital skill for anyone 3D printing consumer goods (sports or perfume bottles with logos over clear parts), electronics mock-ups (full-color displays over or under clear screens) and even mementos or figurines (3D printed sports trophies, miniatures, or museum reproductions encased in a block of clear plastic).
Be warned, however, that printing with clear+textures in the same model does require the new Advanced Slicer capability for Stratasys J750 printers, currently in beta. (You can sign up for that software beta and others here.) So if you don't have a J750, don't want to be on that beta, or are just here to learn about UV mapping, consider skipping to Step 5.
If you're still with me, here's the general workflow we're going to go through to put these semi-transparent textures over transparent bodies:
Let's get started.
Step 2: Making areas of your texture image transparent
For this example I'm using a satellite image of Earth that I'm going to wrap around a sphere to make a semi-transparent globe:
If I didn't do anything to make parts of that image see-through, we'd just end up with that map wrapped around the entire globe, with no way of seeing that the interior of the globe was clear. We could have done that in Photoshop, after reading just Part 1 of this series.
So what I'm going to do is open that image in Photoshop and use the magic wand to select the color of the ocean:
And after I hit "Cut" (or CTRL-X or 'Delete') to remove the selected oceans, then the white parts of my image are transparent, right?
Not yet. In Photoshop, transparency is denoted by a small gray and white checkerboard pattern in an area, not white. Here's what it looks like on a different world map I cut the oceans out of (kind of):
This is pretty easy to check another way – if you export both images as PNGs and put them over any shape in PowerPoint, it's simple to see what's transparent and what's not:
That's a good check to do early on, to make sure your texture image will let the rest of your transparent 3D printed model shine through. So how do we get that checkerboard?
I'm not a Photoshop expert, so here's the simplest way I've found:
- Open your image in Photoshop. It will be the background layer.
- Right click on that image layer and make a duplicate of it (because background layers can't be transparent).
- Add another empty layer and drag it BELOW your duplicate, it doesn't matter what it's called (this will be a transparent checkerboard background).
- Delete your original background layer.
- Only THEN start magic-wanding and removing areas of the top layer you don't want.
Again, I'm not an expert, but that saves me from having to change the size of my original image, or do anything else weird, and it gives me a transparent checkerboard layer at bottom to see if it's working (photoshop experts can suggest simpler ways in the comments).
(Edit 5/7/18: One of our Photoshop experts in the office, Mikk Olli informed me you can also right click on a background layer and use the command "Layer from Background" to more easily accomplish steps 2-4 above. The more you know...)
What you're looking for is to have your desired image on one layer, with an empty, transparent layer below it:
I did that with my original satellite image, and after a lot more magic wanding (who knew there were so many lakes visible from space?) I was ready to export my PNG:
Why export a PNG, and not a JPEG or a bitmap?
Because PNG's have what's called an 'Alpha Channel', or a designation that certain areas of the picture will be transparent or not. In fact, you can see the difference right in the Photoshop Export dialog:
Save your image as a PNG only for the next steps to work.
So now we've got an alpha-channel-enabled texture, that's opaque in parts and transparent in parts, ready to lay over your 3D shape. Let's see how to do that next.
Step 3: Mapping your 2D texture over a 3D shape
So now you've got a 2D (probably rectangular) image ready to map over a curved 3D shape.
If we try to do the simple steps we did in part 1 of this tutorial series ("make the part parallel to the screen, embed image, and merge layers") you'll get a bad mapping:
So we've got to go deeper, to find a way to tell the image how to wrap around our entire shape, and that's called UV Mapping. I'll go over the practical steps first, and we'll talk about theory later in Step 5.
After you have your sphere (or other complex shape) in Photoshop, to find Photoshop's secret UV map for your shape, click on the name of the texture inside your 3D layer:
Another window will open in Photoshop to show you your UV map:
Now that we've got a 2D representation of our 3D object, I can use my 2D world map image I created earlier.
Embed your image into THIS new window (as we learned in the first tutorial), and resize it to fit the UV map best you can (it will never fit perfectly):
After hitting that checkbox, your image is now part of the UV map.
VERY IMPORTANT: hit "File...Save" while in the UV map window or you won't see the results in your main 3D part window!
Your 3D part image in the other window will update the moment you hit "File...Save" in the UV map window:
And just to point out the difference between the two windows more clearly:
Now you've got a decently textured solid, and that texture is transparent in certain parts.
But if you want the solid areas of your model to actually print transparent in the final physical result, you have to do one more, counter-intuitive step: make everything transparent.
Step 4: Importing semi-transparent models into GrabCAD Print
In Photoshop, you've now got a 3D model where you can see the texture all around it:
That image is transparent in parts (which is why you can see the white STL tessellation where the oceans should be).
But for GrabCAD Print's new Advanced Slicer to register that you want the body of your model to print in clear under your image, you have to make the entire part transparent in Photoshop, including the texture.
Weird, I know.
But that's what the Advanced Slicer needs to read the VRMLs in right now. (For those of you on the Advanced Slicer beta, give us feedback on how you feel about this, and maybe we can change it.)
To do make your solid transparent, go to the 3D toolbox on the lower right and single click on the material:
Then turn the Opacity slider all the way down:
Now, on your screen, you should see nothing. But your 3D shape is still there, I promise!
Now, just as in part 1 of this series, save your 3D layer out as a VRML to get it into GrabCAD Print. But this time, you can only choose PNG as your type of texture format:
This is a change from part 1 of this series (where JPG or BMP texture format VRMLs were also acceptable). Only PNG VRMLs seem to work with transparent printing. (I don't know the exact computer science behind this, but I'm guessing it has to do with that alpha channel PNGs have.)
And finally, when you import those VRMLs into GrabCAD Print, they will show up as clear bodies with texture wrapped around the outside of them as you intended:
Those models look really good on the tray (try rotating your view) and print out the same way (I stopped this print 75% of the way through so you could see the insides):
If you CAN'T see the transparency of your models on the tray and you're SURE you've done all the previous steps correctly, check that you have the Advanced Slicer turned on under GrabCAD Print's "File... Preferences... Advanced Features":
(And again, if you want to be considered for the Advanced Slicer beta, sign up here.)
With a bit of hand-polishing and wet-sanding with 400 grit sandpaper (which I haven't done enough of yet) those clear parts start to shine, and you can even see right through the globes:
After that image I did about 10 more minutes of wet sanding and then finally learned why experienced operators always recommend spraying clear coat on PolyJet models:
Pretty amazing, huh?
Before the Advanced Slicer, you could only print models like that solid white globe with the solid blue core, or assemblies of STLs where each STL was only a single, solid color. But now we can combine Transparency + Texture for the first time. I can't wait to see the models our customers come up with using these new features!
So we did a simple rectangular texture mapped around a simple 3D shape (a sphere).
What happens if you have to wrap textures around something more complex? And they get all stretched out or disjointed?
Step 5: Repairing bad UV maps
So why is it called UV Mapping?
U and V are axes in the direction you could walk, if you were an ant standing on a surface of your model, and they chose those letters because the directions X,Y and Z were already taken:
(There are a lot more pictures in the Wikipedia article, if you're interested.)
Doing a full tutorial about UV mapping would be out of scope here, (and there are many great videos already on Youtube), so for today we'll just cover two parts:
- How to tell if you have a bad UV map
- How to automatically make a new, hopefully better, UV map.
The program I use to check my UV maps is Photoshop (as we saw in Step 3), since SOLIDWORKS can't do it and it's pretty easy to reveal the secret UV maps in PS once you know where to double click:
Both those good and bad examples are from the same CAD file, saved out as an STL from SOLIDWORKS on two different days. Why did I get a bad map one time and not the other? I don't know, there must have been some STL export setting, but I couldn't repeat the error. We just have to deal with it now.
Unfortunately, Photoshop doesn't seem to have an easy way to repair bad UV maps. I found a help article which implies that it could but couldn't get that to work for me. (Experts, sound off in the comments and I'll update this paragraph as we learn.)
So to show you how to do the actual repair, I'm going to use an 'artistic' CAD system called Maya. SOLIDWORKS, Inventor, ProE, CATIA don't usually deal in UV maps or repairing them very well, but that's bread-and-butter for programs like Maya.
The thing I couldn't get to work in Photoshop seems to be just a few clicks in Maya:
I mean, seriously, look how perfect that last image is. You can totally see where each piece comes from my 3D model, it's all lined up and nested (remember how off-kilter even the 'good' mapping was in Photoshop?). You can't ASK for a better unwrapping than that!
Of course, you can't save VRMLs out of Maya (as of Maya 2016) and my install was having issues saving out STLs, so I just saved out an .OBJ file (which we mentioned in Tutorial 1).
I brought that OBJ into Photoshop like any other 3D file, and look at the UV mapping I've got now:
That's a thing of beauty.
Of course, not everyone has Maya (I'm using a trial license with 6 days left myself) but it's good to know that there's at least ONE program out there that can do nearly perfect, effortless UV unwrapping of damaged 3D CAD files out there. If you hit this issue a lot, consider a Maya license.
(And if you have a industrial design department or a graphics artist team at your company, chances are you already have a Maya license onsite.)
To recap, here's the workflow I followed:
Most times you won't have to do that, but now you know, just in case.
Let's move on to final thoughts.
Step 6: Final thoughts
We've come a long way in these 3 tutorials.
From perhaps not even knowing what a VRML file was, now you know how to lay and merge simple flat textures onto them (in Photoshop), how to open and scan them for common errors (in Microsoft Word), and even, how to wrap textures around complex surfaces, repairing UV maps if needed (in Maya and then Photoshop again).
(Edit 5/31/18: And if you're specifically a SOLIDWORKS user, there's a better texture mapping software right inside your CAD system called Visualize, which I talk about in this other tutorial here.)
If anyone reading these tutorials needs help doing the above steps, don't be afraid to email me at firstname.lastname@example.org. This offer applies to all Stratasys customers, resellers around the world, and yes, even our competitors.
I hope this series has helped you climb the skill ladder of 3D color printing. To learn even more about the possibilities of clear and texture combinations and color 3D printing check out this helpful guide.