<div id="cookie_notice" class="sw-row sw--padding-2 sw--padding-bottom-1-force sw--text-center sw--bg-grey" > <div class="col-1-2 col-1-1--tab col--no-padding sw--display-inline-block sw--float-none sw--text-left sw--vertical-align__middle"> <p class="col-1-2 col--no-padding small">We use cookies to offer you a better browsing experience. By continuing to use the site you agree to their use. You can find out more about our cookies and read our privacy policy <a href="/legal/privacy-statement" target="_blank">here.</a></p> <div class="col-1-2 col--no-padding sw--text-center"> <div class="col-1-2 col--no-padding sw--display-inline-block sw--float-none"> <a class="btn-white small noty_close col-1-1 col--no-padding" data-sw-set-cookie="euCookie">OK</a> </div> </div> </div> </div>

HelpTutorialsTextured Models with SketchUp and MeshLab

Textured Models with SketchUp and MeshLab

This tutorial was made by Shapeways Community member aeron203

This step-by-step tutorial shows how to use Google Sketchup, MeshLab and VRML to add image textures to your 3d models.

Part 1: Create a textured 3D model.

In this example, you will use Sketchup to create a simple 3D picture frame with an image.

1.1 - In SketchUp, click on rectangle and draw a rectangle with a proportion of 4 x 3 units. Make the rectangle about 200mmx150mm or less. This will be small on the screen, so click Zoom-extents to focus in on the shape.

1.2 - Click on the Push/Pull tool. Click and drag the rectangle to extrude it upward to 3mm thickness.

1.3 - Click on the Offset tool. Click and drag near the edge of the rectangle to bring a line about 10mm from the sides.

1.4 - Click on the Push/Pull tool. Click and drag the frame upward to 4-6mm thickness.

1.5 - Click the Paint Bucket tool to bring up the Materials window, then click the Create Material button on the upper right, second from the top.

1.6 - In the Texture section, click the icon to "Browse for Material Image File". Navigate to your image and click Open. You must click OK to close the Create Material window before applying the material to the model.

1.7 - You can now apply your texture to parts of the model by clicking on them. Click the center of the picture frame to fill it with your image. The image is applied to the model, but it isn't the right size.

1.8 - Click the Edit tab of the Materials window. In the Texture section you will see the dimensions listed. change one dimension to match that of the rectangle you created, and the picture will line up with the frame.

1.9 - Click on File/Export/3D Model, and export a Collada file of your model. You will import this into MeshLab and export to VRML for uploading to Shapeways.

Part 2: Exporting your models to VRML for color printing.

This is already covered in another Shapeways tutorial, but I'd like to quickly summarize the process and additional detail.

Any model you can get cleanly into MeshLab with it's UV coordinates intact can be converted in a VRML97 file by MeshLab. The resulting file needs a quick modification in a text editor in order to work. Here are the details of how to do that.

2.1 - Open the already-textured model in MeshLab. You may not see the texture in some cases, but that will be fixed later.

2.2 - If your units are not in meters, your object must be re-scaled. Click on Filters/Normals, Curvature and Orientation/Apply Transform.

2.3 - In the Apply Transform window, click the Scale radio-button, then click the Uniform check-box. In this case a value of 0.015 typed next to the X value would scale the object to the size I wanted. You can get an idea of the size of your object from the bounding box information in this window.

2.4 Go to File/Save-As, and save your model as a VRML file with a WRL extension (e.g. test.wrl). MeshLab might display an incorrect name or path for the texture while saving. It offers you an opportunity to rename the file path, but this crashes the program in the version 1.2.3b that I have. Next we will fix the image path by manually entering the correct one in the .wrl file.

2.5 Open the .wrl file in a text editor like Notepad. Scroll to the end of the file and you will see a line like this:

texture ImageTexture { url " folder/texture0.jpg " }

You have to edit the line to remove the spaces between the quotes and rename the file to whatever image you want to use. Now the line looks like this:

texture ImageTexture { url "yourimage.jpg" }

Save the .wrl file. Make sure the image is in the same folder.

You should now be able to check your work by opening the .wrl file in MeshLab and seeing the texture. The VRML files exported by MeshLab contain only one texture per file, so if you must combine objects with different textures you are going to have to do it manually in VRML.

Add the VRML file (.wrl) and image file (.jpg or .png) to a Zip archive and upload it to Shapeways. The frame should cost about $20-30 to print in Full Color Sandstone.

Get more help in our Forums



We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.