Download

Online

Gallery

Blog

Sweet Home 3D Blog

This blog presents news and tips about Sweet Home 3D.

How to change the colors of a texture

Do you want to change some colors in your textures? This tip is for you.
Sweet Home 3D lets you change the colors and the textures of any 3D model, among the furniture proposed by the default catalog as well as the models you can import: once an object is added to the plan, display its modification dialog with the Furniture > Modify menu item or simply double-click on it. If the model has more than one texture or color, you can click on the Modify button beside Materials label to modify them separately.

If needed, you may also import your own textures as explained in the tip How to add a scenery around your home to customize your drawing.
But you may have noticed that you can't change the colors of the complex textures used by some objects. It is mainly the case of most characters available on sweethome3d.com, and two-tone / multicolored textures. This tip shows you how to use the colors you prefer even for these textures.

Customizing a character

Let's try for example to change the clothes color of a character proposed in the free 3D models page. Choose the character you want to change, then click on the link shown below its icon to download it. In our example, we selected the second female shown in the list.

Once downloaded, unzip the female02.zip file if your system didn't unzip it by itself. This zip file contains the following files.

Among the JPEG images it contains, choose the one to modify: in our case, we're going to change the color of the dress shown in the female02_1.jpg file. The two others .jpg files are used for her face (female02_2.jpg) and her hair (female02_10.jpg).

Sweet Home 3D doesn't contain the tools to perform this change, that's why you should use an image editor like Gimp (Gnu Image Manipulation Program). It's free and open source software like Sweet Home 3D (about the open source community, you can read this article in French). Gimp is not so easy to use because it's an old and very complete software, and in this tip, we only explain how to change a color and keep the various shades in the dress as nice as possible. Download and install Gimp, and once launched, drag and drop the female02_1.jpg file in its grey main screen to open it as shown in the following capture.

Choose the Tools > Selection Tools > Rectangle Select menu item or click on the first tool in the toolbar, then select the zone of the image where you want to replace a color by an other one. In this example, it will be only the rectangle where the dress appears (not the shoes which are dark grey too). Don't worry if the rectangle contains some parts with a very different color like the skin color of the neck and the arm of this female.

Select the Tools > Color Picker menu item or its matching icon in the toolbar as shown in the following screen capture, and pick the average color you want to change in the image. The selected color then appears in the rectangle shown at the bottom of the toolbar.

Select the Colors > Map > Color exchange menu item that will display a dialog box to help you choose the replacement color. Click on the button below the To color label and select the replacement color in the color dialog box.

Adjust carefully the Red, Green and Blue thresholds to ensure that the whole dress will be colored with the color of your choice, but not the neck.

Confirm your choice and check in the selected rectangle whether the replacement looks correct.

Finally, select the menu item File > Export as, save the image and import the female02.obj file in Sweet Home 3D with its Furniture > Import furniture menu item or a drag-and-drop in the plan.
If you already use this model in your plan, you may also replace its original texture with the updated image: display its Materials dialog box, select the material you want to change, click on the button beside Texture and in the Material texture dialog box, drag-and-drop the image you created in the zone under Chosen texture label (or click on the Import button). Giving a size to the texture is useless in this case of use. When you import a texture, you also don't have to worry about keeping the same name to the female02_1.jpg file.

Congratulations! Here is the brand new red dress with all its shades rendered by the photo creation tool.

Yellow, pink, blue, green,... now, you can dress this woman with as many images as you want!

Customizing a character further

Following the same steps, you can also change the skin or the hair of the female, editing the two other files female02_2.jpg which shows her face, and female02_10.jpg which shows her hair. Her body is in the file female02_1.jpg modified in the previous step. Doesn't she look great?

 

Customizing a pattern

Maybe you like the pattern of a wallpaper but you would have preferred it with other colors.
You may also use Gimp and its Color exchange tool for this task. If you want to change the color of a wallpaper proposed at the Textures page (like the one shown in the previous image), just follow these steps to retrieve the image you want to edit:

  1. Download the Textures-eTeksScopia-1.1.zip file.
  2. Unzip if necessary. Its content will show a folder containing the eTeksScopia.sh3t textures library.
  3. Change the .sh3t of this file to .zip

  4. Unzip the eTeksScopia.zip renamed file to get all the texture images it contains.

Some images are at JPEG format, some other ones at PNG format, which can be both imported in Gimp. If you can't access to the Color exchange menu item on a PNG file, just change first its mode to RGB with the Image > Mode > RGB menu item.
Then follow the same instructions as previously in Gimp: select the Color Picker, pick the average color you want to change, choose the Colors > Map > Color exchange menu item, change the destination color and adjust the color thresolds. For example, you can change the colors of the classic-red-wallpaper.jpg wallpaper used in the previous scene to the following ones.

Once your new wallpaper image is ready and saved, go back to Sweet Home 3D, import it with the Texture import wizard displayed by the Furniture > Import texture menu item and choose a right size for the pattern. Finally, change the texture of the walls. How do you like it?

If you're interested, the scene created in this tip is available in the file ChangeTextureColors.sh3d (1.5 MB).



Avatar: okh

Re: How to change the colors of a texture

Nice and instructive blog-post! And nice job on the catwalk. Thanks for emphasising this, texture editing is very useful when working with SH3D. You explain (well) quite an advanced example, though. Editing simple textures - like tiles on a wall - can make a huge difference in the lifelikeness of a SH3D home. There are simpler alternatives, and it is true that Gimp requires some learning, but as you say, very complete. For any half ambitious SH3D project, the Gimp is, in many ways, a perfect supplement to SH3D. For the first time user all the options and details in the Gimp can be a bit frustrating. But the Gimp is well worth spending some time learning; not only for editing textures, but for all sorts of image editing like modifying the images rendered by SH3D (sunflow). Not to mention the usefulness to anyone with a camera or anyone needing textures for webpages or presentations. Like SH3D, the Gimp is a very good example of open-source software that can truly compete with (expensive) proprietary packages. The Gimp has for many years been one of the first software packages I install on a new computer and hard to live without. And, once you master the basics, the options are limitless. Practically every texture I use for SH3D, have been created or edited with the Gimp. ok

Re: How to change the colors of a texture

 Another good free tool is the Pixlr photo editor, available at pixlr.com, now owned by Autodesk. It's an in-the-browser graphics editor that probably covers about 80% of what I normally use Photoshop for. It especially comes in handy when working from a friend's PC and a quick fix is needed, but I ended up using it exclusively during a couple of months I spent at my mother's (and working from her seriously underpowered machine) and rarely found it lacking.

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved