Replies: 35 (Who?), Viewed: 27329 times.
Page 1 of 2
Lab Assistant
Original Poster
#1 Old 13th Jun 2009 at 3:47 PM Last edited by MetalKat0642 : 19th Aug 2009 at 12:20 PM.
Tutorial: A Fast Way to Create Patterns
A Fast Way to Make Patterns for The Sims 3


You will need:
1.GIMP (downloadable for free at http://gimp.org )
2.DDS plugins for GIMP ( http://registry.gimp.org/node/70 )
3.Delphy's Pattern Packager ( http://www.modthesims.info/d/342998 )

NOTE: I use GIMP for this tutorial, though you can also use Photoshop.
For instructions on separating the image into channels using Photoshop, see the excellent tutorial by HystericalParoxysm: http://www.sims2wiki.info/wiki.php?...Custom_Patterns.

NOTE 2: For the most part of the tutorial, I used the Linux version of GIMP. This shouldn't scare you, GIMP is the same for both systems.


How Patterns Work

In TS2, when you exported a texture out of BodyShop, you had two files: the coloured texture itself and the “alpha” - a black & white image that determined which parts of the texture were visible.
In TS3, each pattern can have up to 4 recolourable areas. The pattern itself contains no colours (which will be defined in-game), it only defines which parts of the pattern are coloured. So the pattern actually contains up to four “alphas” (or masks), one for each colour. These are placed into the Red, Green, Blue and Alpha channels of the file.


Step 0:
Find a nice texture you'd like to import into TS3. For the tutorial, I used this texture from pixelbrush.ru:



Step 1: Preparation
Open the texture in GIMP. Resize to 256x256. Save as an .xcf file (*.psd if you're using Photoshop).

Our texture has 3 colours: the background (colour 1), the dark flowery pattern (colour 2), and the light thing in the centre (colour 3). So we'll theoretically need to create three masks. However, the texture will look better if the background mask is just 100% white. No need to bother about it now.


Step 2: Creating a Mask

So, we'll start with creating a mask for Color 2. This means we'll have to transform the image so that the flowery pattern becomes all white, and the rest black. Like this:



This is how to do it:
1. Clone the background layer (Layer → Duplicate Layer).
2. Desaturate the layer (Color → Desaturate). You will have 3 options, any of which will do.
3. Since our pattern is dark & we want it to be white, invert it (Color → Invert).
4. Using the Curves tool (Color → Curves), edit the image so that you have a white pattern on a black background. You shouldn't have a lot of artefacts, if you have any remove them manually.

Step 3: Creating Another Mask
Clone the background again. Using Desaturate and Curves, create something like this:
(This time, Colour 3 becomes white, and the rest black).



Now you have three layers: the untouched coloured layer containing the original pattern, the mask for colour 2 and the mask for colour 3.



Step 4: Placing the Masks into the Channels
1. Create a new image (256x256 pixels).
2. Now, select Colors → Components → Decompose. In the window, choose RGB. (RGBA if working with a 4-colour pattern).
3. A new image, titled “red”, will be created. It will have 3 layers: red, green, blue.

IMPORTANT: the order of the layers MUST be like this: (if you have 4 channels, alpha must be on top)



4. Now paste the mask for Colour 2 into the green layer and the mask for Colour 3 into the blue layer. Leave the red layer white.




Step 5: Recompose

Color → Components → Recompose. The image you created at the beginning of Step 4 will look like this:



Alternative Step 5
Color -> Components -> Compose. Unlike Recompose, this will give you a dialog window where you can choose:
  • the colour mode (RGBA for 4-colour patterns, RGB for the rest)
  • the images that will become the channels of the composed image. These can be separate files or decomposed layers.
This may be more convenient because it gives you more control over the process. Also it may work where Recompose doesn't (thanks to Gangreless for pointing this out!)


Step 6: Save as *.DDS


Save the file with the .dds extension. You will see a dialog window, select RGBA8 in the “Format” field and hit OK.



Step 7: Delphy's Pattern Packager

I suggest you just read this:

http://www.sims2wiki.info/wiki.php?...attern_Packager


Step 8: In-Game Testing


Start the game and apply your pattern to some large flat surface.
Experiment with colour options.
Feel proud.


Yesterday is history,
Tomorrow is a mystery,
Today is a gift, that is why
We call it the Present.
Advertisement
Alchemist
#2 Old 13th Jun 2009 at 5:12 PM
How do you paste the mask for colour 2 into the green layer? When I try, it becomes "floating selection (pasted layer)". And how do I make that "layers, channels, paths, undo" window you're using come up on Gimp?

Thanks!
Lab Assistant
Original Poster
#3 Old 13th Jun 2009 at 5:44 PM
Pasting is a bit weird in GIMP. The only solution I know is switching to the Select tool and clicking anywhere inside the image window, but outside the image. This will paste the selection into the active layer. For some reason, pasting it as a new layer & then renaming it makes the Recompose command impossible.

To create a Layers, Channels, Paths & Undo window, go to Dialog -> Create New Dock -> Layers, Channels, Paths.

Yesterday is history,
Tomorrow is a mystery,
Today is a gift, that is why
We call it the Present.
Alchemist
#4 Old 13th Jun 2009 at 6:12 PM
OK, got that, thanks! Yeah, copy/paste was weird. What I did was paste, then it would paste as a floating layer and lock, then I would unlock and paste again to get the layer on the channel then just delete the floating one. Weird.

Now I have a new question...

Here's the image I made

I didn't take any time with it because it was a test. That's why it looks horrible. But notice the texture is rough like bricks should be. As soon as I alter the colour...





The colours change fine but the brick texture goes away and it just becomes flat.

Is there something I'm missing that will help to avoid this?
Test Subject
#5 Old 13th Jun 2009 at 9:16 PM
Quote:
Originally Posted by coltraz
How do you paste the mask for colour 2 into the green layer? When I try, it becomes "floating selection (pasted layer)".
Thanks!


Right click on the floating pasted layer and click on anchor layer. It will merge/paste it to the layer you originally had selected.
Lab Assistant
Original Poster
#6 Old 14th Jun 2009 at 8:29 AM
Quote:
Originally Posted by coltraz
Now I have a new question...


Thank you for the question. It made me rethink some aspects of pattern-making (I never tried to make textured patterns before).

I used to think that grey semitones on a layer mask made the colour darker, now I'm sure that they just make the layer transparent (like TS2 alphas)

If you made the mask of the mortar layer 100% white, the colour will be visible in places where the bricks mask is grey. So, when you assign a dark colour to the mortar, dark pixels appear on the bricks, creating a rough texture. When you make the mortar yellow, the bricks are just covered in yellowish pixels.

Three solutions:

1: always assign a black or dark grey colour to the mortar.

2: create a mask for the mortar which would be transparent under the bricks. Then, in Delphy's Pattern Packager, make sure that the "background filler" is black.

3: create a mask for the mortar that would be transparent under the bricks. Add another layer with a 100% white mask, make it the very bottom (red) layer and, in Pattern Packager, assign a black or near-black colour to it. So you will have 3 layers: a 100% dark layer, the mortar and the bricks. The dark layer will peep through the bricks and the mortar, and by fiddling with the colour of this layer you can change the overall contrast of the pattern in-game.

This is pretty difficult to understand without pictures, so I will probably write another tutorial on how to manipulate transparency.

Yesterday is history,
Tomorrow is a mystery,
Today is a gift, that is why
We call it the Present.
Lab Assistant
#7 Old 14th Jun 2009 at 1:01 PM Last edited by red_dragons : 14th Jun 2009 at 1:58 PM.
I stuck at
2. Desaturate the layer (Color → Desaturate). You will have 3 options, any of which will do.

Gimp says 'desaturate does only operate on RGB colours'.

Could it be because i using a gif image? How do i convert it to RGB colours?

*EDIT:

Using another file now, but i was also stuck on paste into green layer. It just pastes it into another floating selection. I tried paste > paste into but that dont work, I tried paste> paste as new layer, then right clicked on the new layer called 'clipboard' & chose merge down, making sure the green layer was below & that seemed to work ok....
Did the blue layer same way, however i have a new problem when it comes to recompose. Gimp says, 'specified layer 9 not found'.......
Umm, i didnt create a layer 9 lol!

I like work, it fascinates me.
I could sit & watch it all day!


Simmodders UK
Test Subject
#8 Old 14th Jun 2009 at 2:36 PM
I am having a lot of trouble doing this. Understand that I am new to Gimp, but I can usually pick up on thing pretty quickly.

Here is the pattern I am starting with.



The problem I am having is that when I go to create the masks, I am not able to get a 100% saturation of the background because there are muliple levels of gray scale.

I am either doing something very wrong, or this is not really a great pattern to start with. Can someone give me some pointers. I have both Gimp and Paint Shop Pro and I have figured out how to use the channels, I just can't figure out how to get a clean set of masks for the the channels.
Alchemist
#9 Old 14th Jun 2009 at 2:53 PM
Quote:
Originally Posted by MetalKat0642

This is pretty difficult to understand without pictures, so I will probably write another tutorial on how to manipulate transparency.


Beautiful! Thanks so much! Can't wait...
Lab Assistant
Original Poster
#10 Old 14th Jun 2009 at 5:53 PM
red_dragons, you must have been working on a GIF image. These have the "indexed" colour mode - change to RGB in the Image menu.

Pasting is perhaps the strangest thing in the GIMP. Here's another workaround:

1. Select All in the layer you want to paste from
2. Copy to clipboard
3. Take the Paint Bucket tool, select Pattern Fill in the options and the contents of the clipboard will be among the patterns.
4. Fill the target layer with the Paint Bucket.

msarobix, the pattern is good except for it isn't square (resize it a bit). But the Curves tool is quite intimidating for beginners, so I suggest you read/watch some of these (they are for Photoshop, but the curves tool is the same):

http://mgreerphoto.blogspot.com/200...yer-curves.html
http://www.cambridgeincolour.com/tu...shop-curves.htm
http://www.thegoldenmean.com/technique/curves2.html
http://www.youtube.com/watch?v=ORM6AZY19pw

In your case, the curve should look approximately like this (pic taken from one of the tutorials):


If you are uncomfortable with Curves, you can use the Levels tool (which is much simpler but less flexible).

Yesterday is history,
Tomorrow is a mystery,
Today is a gift, that is why
We call it the Present.
Test Subject
#11 Old 14th Jun 2009 at 9:36 PM
Quote:
Originally Posted by MetalKat0642
red_dragons, you must have been working on a GIF image. These have the "indexed" colour mode - change to RGB in the Image menu.

Pasting is perhaps the strangest thing in the GIMP. Here's another workaround:

1. Select All in the layer you want to paste from
2. Copy to clipboard
3. Take the Paint Bucket tool, select Pattern Fill in the options and the contents of the clipboard will be among the patterns.
4. Fill the target layer with the Paint Bucket.

msarobix, the pattern is good except for it isn't square (resize it a bit). But the Curves tool is quite intimidating for beginners, so I suggest you read/watch some of these (they are for Photoshop, but the curves tool is the same):

http://mgreerphoto.blogspot.com/200...yer-curves.html
http://www.cambridgeincolour.com/tu...shop-curves.htm
http://www.thegoldenmean.com/technique/curves2.html
http://www.youtube.com/watch?v=ORM6AZY19pw

In your case, the curve should look approximately like this (pic taken from one of the tutorials):


If you are uncomfortable with Curves, you can use the Levels tool (which is much simpler but less flexible).



Thanks for the help. After looking over some of these tutorials and playing around with it some more I was able to get it to black and white.

The problem I am having know is that the pattern I was working with is very pixilated so when I try to isolate each color I am having a hard time with one color not having a lot of extra pixels scattered about.

Any tips on this.

Here is what I am getting.







The first image isn't too bad but the other two are horrible.

Here is what it looks like once I combine the layers again.



Can anyone tell me what I am doing wrong? Is there a way to get a better result?

Thanks for all your help.
Lab Assistant
#12 Old 14th Jun 2009 at 9:52 PM
You can zoom right in on the image, use color picker tool to choose black (or whatever color u want to), then select paintbrush and then in paint brush tool options box, bring the size down to about 20 or even less (depending on how big an area you want to 'clear up'. Doing it this way can be tedious, but it depends on how many 'artifacts' are left over. It works for me!


Note: I use PSP, but i should think it's a similiar process in Gimp

I like work, it fascinates me.
I could sit & watch it all day!


Simmodders UK
Test Subject
#13 Old 15th Jun 2009 at 12:55 AM
Quote:
Originally Posted by red_dragons
You can zoom right in on the image, use color picker tool to choose black (or whatever color u want to), then select paintbrush and then in paint brush tool options box, bring the size down to about 20 or even less (depending on how big an area you want to 'clear up'. Doing it this way can be tedious, but it depends on how many 'artifacts' are left over. It works for me!


Note: I use PSP, but i should think it's a similiar process in Gimp


Thanks, I was hoping there was a simpler way to do this, but I guess not. So I suppose I have some work ahead of me.

Thanks again for your help.
Test Subject
#14 Old 16th Jun 2009 at 9:43 PM
It worked wonderfully!! Thank you so much for your time in making this!

Live, love, learn, make mistakes and try again, do what you say your going to do and don't be afraid to fail.
Test Subject
#15 Old 18th Jun 2009 at 8:54 PM
Please, sorry for my english, I'm living in Belgium and speak french.

Is it normal than the pattern looks in black/white into the game ?
I use a DXTbmp program to separate the channel and save in DDS format after having made a bmp file with Gimp.

Perhaps have I choose a wrong format to save in DDS ?

Somebody can help me ?

Thanks
Khany
Field Researcher
#16 Old 24th Jun 2009 at 12:22 AM
I'm lost when it comes to placing the masks into channels. Can someone help me please?
Lab Assistant
Original Poster
#17 Old 24th Jun 2009 at 7:01 AM
Khanyoko, it shouldn't be black and white. I haven't tried DXTBmp because the GIMP DDS plugin works fine for this. But the dds should look weirdly coloured in pink/yellow/white/blue/red etc (there's a picture in Step 5), the colours depend on how many channels you have.

Erica152, you can try another graphics program. GIMP is pretty hard to understand, but I don't have anything else. I primarily use Linux, and Linux uses GIMP. I've tried explaining how to paste in GIMP in this thread, but it's probably an unexplicable phenomenon.

Yesterday is history,
Tomorrow is a mystery,
Today is a gift, that is why
We call it the Present.
Field Researcher
#18 Old 24th Jun 2009 at 4:05 PM
Yeah I only have Gimp too do you know of any other free programs?
Test Subject
#19 Old 8th Jul 2009 at 1:56 AM
Thank you so much for this tutorial, MetalKat0642!

First, I'm sorry about my English, as it is not my first language.

After a long night of reading, installing programs, errors, reading and trying again, I just had the pleasure of seeing my first pattern in game. And it has 3 channels of colors and I can change them all.

I was a long time trying to paste the masks I had done into each RGB layer of the new 256x256 image, after a while I learned I could paste them above each layer and merge, but them when I tried to recompose I had an error saying "specified layer [some number, always a different one] not found".

Then I decided to try this tutorial with no image from the internet but drawing a silly image, white in black background, for each green and blue layers (for an image of 3, leaving red empty). Like this, I was able to recompose a first image with correct red, green and blue channels.

Went back to my image from the internet, followed every step on this tutorial until the "specified layer" error and in that point I started trying things out.

What worked for me was to paste my masks in the layers of the decomposed new image, deleting layers green and blue, changing the attributes of the layers with my masks by renaming them green and blue, leaving red white, and in the end using "compose" option instead of "recompose". Don't know why, but it worked.

After that, as an absolute beginner, I had to solve mysteries pattern creator and how to install

I'm going to be so addicted and have so much fun doing this

My pattern in one of the biggest tiles in game (the default combination is the last one):


The original jpg I was like this:


Thank you again!
Test Subject
#20 Old 20th Jul 2009 at 9:46 PM
If copying into color channels gets annoying, you can avoid that by selecting Image → Mode → Grayscale followed by Colors → Components → Compose. On the Compose dialog, you just have to select which layer is for the red channel, which is for the blue, etc....

This is slightly faster for me than decomposing, copying, recomposing. Other than that, great tutorial.
Test Subject
#21 Old 23rd Jul 2009 at 1:37 AM Last edited by Srikandi : 23rd Jul 2009 at 2:17 AM.
Default images not showing up
I would like to try this out can you get the pictures for your tutorial to show up again some of them are missing.

[Edited by Srikandi -- there is really no need to quote the entire tutorial to comment on it]
Eminence Grise
#22 Old 23rd Jul 2009 at 2:18 AM
I see all the pictures, robin.u.
Test Subject
#23 Old 25th Jul 2009 at 5:08 PM Last edited by danieeel31 : 25th Jul 2009 at 5:24 PM.
Didn't work..
I get an error message when I try to save the dds file..
Eminence Grise
#24 Old 26th Jul 2009 at 11:13 AM
Quote:
Originally Posted by danieeel31
Didn't work..
I get an error message when I try to save the dds file..


You might get some help if you told us what the error message said, and which app / DDS plugin you're using
Field Researcher
#25 Old 16th Aug 2009 at 5:05 PM
Okay, I tried this, and in gimp it's coming up with the error "Specified layer 26 not found" when I try to recompose.
The "Compose" function, however, works. Is it safe to use the image produced with that?
Thanks muchly :D
Page 1 of 2
Back to top