Stealing a Label for use in Keyshot

Today we see how to "steal" a realistic looking part marking (stamp) for use in a Keyshot rendering. This should apply to other rendering applications too.

  1. Step 1: Find a Source

    An aircraft hinge would normally be marked by the manufacturer with a part number and other information.

    The CAD model can be downloaded here

    An online image search provided this image:

    The stamped serial number, part number, and cage code are perfect for this rendering application. And the image has a high enough resolution to be useful. If the image is too small the end results will look bad.

  2. Step 2: Edit CAD Data

    The CAD model already has text cut into it. This is a great detail, but in this case it is too perfect. I want the text to look stamped, not professionally engraved.

    A simple extrusion in SOLIDWORKS removes the existing text from the Step file.

    Now the model is ready to have a decal applied in Keyshot

  3. Step 3: PhotoShop (or other editor)

    Fire up your favorite photo editor an open the image with the stamping on it. Zoom in on the desired text, then select an area around the text to work in, or crop the image:

    The difference in contrast and color between the desired text and unwanted background is great. That makes this job easier. I just used the "Magic Wand" to select the black text.

    I set the Tolerance value to 50 so most of the text would be selected with few clicks.

    I also turned off the Contiguous option so the wand will select from the entire image and not just a small area near the selected point.

    Copy the selection, create a new transparent layer, paste the selected text to the new layer, hide the background layer. The image should look something like this:

    It's not bad, but I want the letters to be black and not have that gold color near the centers.

    To remove the color there must be half a dozen different options. I used the Levels tool to make everything black. Adjusting Saturation would do the same:

    It's better. Next I fill in the letters a little.

    Clear any selections. With the Magic Wand select a transparent area. Now invert the selection. Used a large Brush tool with black the desired color to fill in the letters. Remember, we're not after perfection, this is supposed to look stamped:

    Note the perspective is off a little because the part/camera was tilted when the picture was taken. This could be fixed with Perspective tools, but the effect is slight, and lends itself to looking less than perfect. Exactly what I'm looking for.

    Save the above image as a PNG file. PNG maintains the transparency.

    Transparent images to use in your projects:

  4. Step 4: Keyshot

    I don't use decals very often in Keyshot. If you have better ways to apply/edit a decal, please share.

    I apply decals last. Before applying decals I:

    • Set the environment
    • Position the camera
    • Apply materials
    • Edit lighting
    • Modify textures/colors

    Next I create a a new camera. This allows me to retain the setup I did above, and still easily apply decals by looking directly at the part as the decal is applied. You can do the same in an isometric view, but I find looking at the part in an orthographic view is easier.

    Above the decal comes in and is too large. This is a good thing. I want to shrink the decal. If I need to increase the size of the decal that means the resolution is too low and it is going to look terrible.

    Resize/rotate the label as needed with the move tool, or use the dialog boxes and type values in manually.

    In this case I set the label type to Paint instead of the default of Plastic. You can also get fancy and use another copy of the decal to define a bump map. This can be used to simulate the thickness of a decal, paint, ink etc... I doubt anyone is going to see that I don't have thickness on this stamp so I skipped a bump map.

    The location and rotation look good, but I don't want the label repeated on the inside of the part.

    The decal is also bleeding through the part. If the above image were rotated 180° we'd see two backwards copies of the label. One on the outside, and another on the opposite inside face.

    Fixing the first issue (the duplicate inside label seen above) is fixed by setting a label depth. Depth is set to 0 by default. In my mind 0 should be zero depth, but I guess Keyshot sees 0 as infinite? Set it to a number larger than 0. 1" or 1mm will work in this case.

    The second issue (the decal appearing on backwards on the inside of the part) does not need to be fixed in this case since I'm only making a single image and the model and that interior face is hidden. But the fix is easy. Just turn off the option for Two Sided.

  5. Step 5: Finish the Render

    Go back to the desired camera view and finish the rendering.

    Be sure to practice a bit with labels before you actually need to use them. Labels are a lot easier to apply in newer versions of Keyshot (8, 9). I had a lot of trouble with labels in earlier versions (5, 6).