Home » Support » 3D Applications » Textured Models with SketchUp and MeshLab
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
Textured Models with SketchUp and MeshLab [message #8838] Sat, 09 January 2010 04:58 UTC Go to next message
avatar aeron203  is currently offline aeron203
Messages: 449
Registered: July 2008
Go to my shop
Senior Member
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.
http://img63.imageshack.us/img63/7900/fig11.png

1.2 - Click on the Push/Pull tool. Click and drag the rectangle to extrude it upward to 3mm thickness.
http://img63.imageshack.us/img63/3478/fig12.png

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.
http://img63.imageshack.us/img63/4642/fig13.png

1.4 - Click on the Push/Pull tool. Click and drag the frame upward to 4-6mm thickness.
http://img23.imageshack.us/img23/3172/fig14o.png

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.
http://img23.imageshack.us/img23/7905/fig15.png

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.
http://img23.imageshack.us/img23/3300/fig16.png

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.
http://img23.imageshack.us/img23/6576/fig17.png

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.
http://img23.imageshack.us/img23/8310/fig18.png

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.
http://img197.imageshack.us/img197/7942/fig23d.png

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.
http://img23.imageshack.us/img23/993/fig25.png

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.

  • Attachment: PicFrame.zip
    (Size: 167.24KB, Downloaded 290 time(s))


Aaron - 40westdesigns.com/blog
Re: Textured Models with SketchUp and MeshLab [message #8867 is a reply to message #8838 ] Mon, 11 January 2010 13:38 UTC Go to previous messageGo to next message
avatar Youknowwho4eva  is currently offline Youknowwho4eva
Messages: 5428
Registered: September 2008
Go to my shop
Shapie Expert
I work here
Wonderful tutorial. Thank you.


I learned a long time ago the wisest thing I can do is be on my own side, be an advocate for myself and others like me. -Maya Angelou
michael@shapeways.com Community Advocate
Re: Textured Models with SketchUp and MeshLab [message #8877 is a reply to message #8867 ] Mon, 11 January 2010 21:04 UTC Go to previous messageGo to next message
avatar pete  is currently offline pete
Messages: 403
Registered: February 2008
Go to all my models
Senior Member
Co-Founder
Hi aeron203,

we blogged about your tutorial!
Can we add it to our tutorial section?

Thanks alot!

Peter
Re: Textured Models with SketchUp and MeshLab [message #8885 is a reply to message #8877 ] Tue, 12 January 2010 01:52 UTC Go to previous messageGo to next message
avatar aeron203  is currently offline aeron203
Messages: 449
Registered: July 2008
Go to my shop
Senior Member
Of course you can add it to the tutorials.

I'll add more later.


Aaron - 40westdesigns.com/blog
Re: Textured Models with SketchUp and MeshLab [message #10016 is a reply to message #8838 ] Thu, 18 February 2010 08:31 UTC Go to previous messageGo to next message
avatar ArnoudV  is currently offline ArnoudV
Messages: 41
Registered: October 2009
Go to all my models
Member
Thanks! I placed this tutorial in our tutorials section.
Re: Textured Models with SketchUp and MeshLab [message #10512 is a reply to message #8838 ] Sat, 06 March 2010 20:58 UTC Go to previous message
avatar jimfoltz  is currently offline jimfoltz
Messages: 8
Registered: February 2010
Go to all my models
Junior Member
No Message Body

[Updated on: Sat, 06 March 2010 23:10 UTC]


 
   
Previous Topic:Shelling 3D models
Next Topic:extremely large size model?

Logo

Hello.

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.