PDA

View Full Version : Creating a suitable WallMask for your custom windows and doors


Numenor
1st May 2006, 12:07 PM
WaalMasks are special images, included in every window and door, used by the game to "cut a hole" in the wall. The wallmask must obviously match your custom window, otherwise it will look ugly in your game.

Here is a simple method to create a WallMask matching your custom window; this method is especially useful for oddly-shaped windows, even multi-tiles ones.


Clone a Maxis window (be sure to set ON the option "Pull Wallmasks") and re-mesh it at will.
Start the game and build a 2-storey wall as showed in the screenshots; put your custom window on it (I've used a Maxis one only for teaching purpose):
http://thumbs.modthesims2.com/getimage.php?file=286119&thumbs=1 (http://thumbs.modthesims2.com/getimage.php?file=286119)

Press TAB to switch to first-person camera, zoom in to max pressing Z, and position the camera exactly at the center of the window; take a screenshot by hitting C:
http://thumbs.modthesims2.com/getimage.php?file=286118&thumbs=1 (http://thumbs.modthesims2.com/getimage.php?file=286118)

Open your screenshot in a paint program and crop the image along the borders of one wall section (include the whole wall section, and only one section):
http://thumbs.modthesims2.com/getimage.php?file=286117&thumbs=1 (http://thumbs.modthesims2.com/getimage.php?file=286117)

Resize the cropped image to 256x128 pixels;

Following the picture as a guideline, select the part that should be transparent and paint it in pure black; al the remaining part of the image (the solid part) must be painted in pure white:
http://thumbs.modthesims2.com/getimage.php?file=286116&thumbs=1 (http://thumbs.modthesims2.com/getimage.php?file=286116)

Save the image, open SimPE, select the corresponding wallmask image, right click on it and select "Import Alpha" (not just "Import"!); load your image: you should see your new shape in the preview.

Right-click again on the image, choose "Update all sizes".

Commit and save.

repeat for every other wallmask in the package.





----------
Tutorials:Creating_a_suitable_WallMask_for_your_custom_windows_and_doors

xanathon
1st May 2006, 12:43 PM
Thanks for this, Numenor!

One question, though: What graphics-filetype should be set after importing the alphatexture? DXT3 I guess?

Numenor
1st May 2006, 3:27 PM
When you import the Alpha only you can't set the image format: the one already set for the "main" image is always used.

You don't have to use the option "Build DXT", nor the "Import" one. If you follow this tutorial, you only have to import the Alpha, using the option "Import Alpha".

But - in general - yes, the main image with its embedded Alpha is in DXT3 format.

moonlight_muse
7th May 2006, 11:00 AM
Thank you :)

atomic_hamsters
8th May 2006, 1:34 AM
This will help alot now that i've started making windows, thanks! :anime:

xrax
31st Dec 2006, 7:18 AM
Wonderfully-explained and illustrated. Thank you for this cool and very useful tutorial. :)

Ailias
11th Apr 2007, 12:27 PM
Finally! The wall mask always was a damm thing when I wanted to create a window or door ;)

mininessie
26th Apr 2007, 2:17 PM
wow
thanks so much !
i had problems with this in my first window.
now i can do it better .
thanks again

wndy26
4th Oct 2007, 8:03 AM
Numenor -could it be possible to create a something like a ticket booth window where actions can happen through the window - My thoughts are similar to a bar counter top with a window shape-part glass/part open where a transaction can still take place - like at movie theaters?

Would I need to utilize the wallmask to make something like this happen?

Also - when following this tutorial - do you save your cropped image as a jpeg or bmp file type?

soloyo
6th Oct 2007, 12:28 AM
one question Numenor, I want to clone the small window privacy, I only want to make it a bit higher not larger not square, simply a little bit higher on the wall,How I do that with this process you splain here?

Numenor
6th Oct 2007, 3:32 AM
Wndy26 - A ticket counter licke that can't be created starting from a window; windows don't allow any movement through the hole in the wall. I suggest to clone a counter and create a fake wall with a fake window over it.

As for the image format, the very best one is the .png, if your editor allows it; if not, the .bmp is perfect. Avoid the .jpg format: it's no good for SimPE.


Soloyo - Moving a Maxis window in a different position is not different (as for this tutorial) from creating a new one.
When you have cloned the window and edited the mesh, place the new window on a wall as explained in the tut, and then take a picture, etc...

soloyo
6th Oct 2007, 11:20 PM
Numenor thanks for taking the time to answer

soloyo
8th Oct 2007, 6:19 AM
Another question please be kind
I was making the window and I got the part of the wallmask right is in the place where the window suposes to be, but the actual window is not, because the mesh is two sides,I keep on moving the wrong side away from the wall, what I can do, to know which is the outside and wich is the inside sides of the window?
Thanks

ViVie
12th Sep 2008, 6:46 PM
Thank you numeror :)

Inge Jones
5th Feb 2009, 7:16 PM
How big should the image for a diagonal wall mask be?

leesester
5th Feb 2009, 7:23 PM
Hi Inge - wall mask size is as in the txtr file so:

for a 1 tile window = 128* 256
for a 2 tile window = 128 * 256 each side

Leesester

Inge Jones
5th Feb 2009, 9:59 PM
But the diagonals are squished or something, and the cutout is narrower in proportion than it is in the game.

leesester
5th Feb 2009, 10:21 PM
I use this method all the time, and it does work, just like it says on the box. :)

Numenor
6th Feb 2009, 4:50 PM
How big should the image for a diagonal wall mask be?

If the diagonal mesh is identical to the straight one, I'd say that the black part of the diagonal mask should be equal to:
[size of the straight black part] / SQR(2)
i.e. about 70.71% of the straight one.

Of course, we are talking of the width only (the height of the diagonal is the same as the straight).

From a practical point of view, I suggest to pick the entire image of the straight mask, resize it (horizontally only) to 70.71%, and then add a white area to the left and to the right, so to increase again the texture width to the original size.

Inge Jones
6th Feb 2009, 4:59 PM
Ah! I just couldn't work out what equation I needed. School was a long time ago :D

leesester
6th Feb 2009, 5:03 PM
hi
I usually put the diagonal window on a diagonal wall, scroll round so the wall is facing the camera full on and follow the tutorial - as I am very bad at maths I am glad that this method requires no resizing of the wallmask using % thingies. The mask fits already.

IndycentSimCreations
20th Jul 2010, 4:17 AM
Oh cool. So just a question, how should the object look on the wall before the wallmask?

adinda1987
9th Aug 2010, 12:45 PM
hi, I made a few pillows but I can't get my alpha texture to work proper. I got a big shadow around my pillow the same size as the placement-square or how you might call it. Can somebody help me out with this? thanks