Home | Download | Discussion | Help | Site Map | New Posts | Sign in
Replies: 35 (Who?), Viewed: 38972 times.
Page 1 of 2
Administrator of Loverat's Tea and Underpants
Original Poster
#1 Old 13th Jan 2005 at 4:21 PM Last edited by Echo : 10th Sep 2008 at 1:38 PM. Reason: Added wiki link
Default Tutorial: Transparency in Floor Tiles (Updated 16 Apr)
This is based on what I know so far, which is pretty limited. Others are welcome to add what they learn as they experiment, and I will as well. This isn’t a comprehensive tutorial, just a place to start.

Anyone wishing to republish this information may, so long as the section of your site that it is published in does not require a fee of any kind to view it. Please be aware that this information may change with time, though.

This tutorial has been updated to reflect changes in SimPE version 0.33 and later.

So far I have used 2 different kids of transparent effect in floor tiles:
1) A single-color translucent tile and
2) A textured tile where some parts are transparent (a metal grate)

There are disadvantages with both. The translucent tile can only be a single color, not a pattern. Also if anyone tries to clone the transparent tile in Homecrafter Plus, it will crash the program. The image with transparency is only binary transparency... that means parts of the image are either fully visible or fully invisible, and when you look at the image up close it will have jagged edges where the textured part and the invisible part meet. If anyone can figure out how to put an image with full 8-bit transparency onto a floor tile, please let me know.

To create either type of transparent tile:

Create a new floor tile in Homecrafter Plus. You can clone an existing tile or create a new one. It doesn’t matter what it looks like.

Give it the name, description, and cost that you want your final tile to have. Also make sure that it is in an appropriate group... you wouldn’t want a glass tile to be listed under “carpet”. And make sure it has an appropriate sound effect. I have put mine under “Tile” and given them the “marble” sound effect.

Click the “Import to game” button in Homecrafter Plus, and then close that program.

The new floor package will be in your downloads folder. If you sort the files by the date they were created, it will be the most recent (they don’t have a meaningful file name, so you have to find the files that way).

Open the new floor file in SimPE. You’ll find 5 files there:
Texture Image
Material Description
Object XML
Text Lists
Directory of Compressed Files

You only need to worry about the 2 of them.

If you are making a single-color translucent tile, go to part 2.
If you are making a textured partially transparent tile, go to part 3.



----------
Tutorials:Transparency_in_Floor_Tileswiki
12 users say thanks for this. (Who?)
Advertisement
Administrator of Loverat's Tea and Underpants
Original Poster
#2 Old 13th Jan 2005 at 4:23 PM Last edited by RGiles : 16th Apr 2005 at 7:16 PM.
Part 2
If you are making a single-color translucent tile:

Known issues:
If you place these tiles on directly on the ground, they will reflect a bright blue color and show shadows as bright blue.
Shadows cast on these tiles will cause the color of the tile to vanish in the shadow.
If you try to clone these tiles in HCP, the program will crash since there is no texture for it to clone.


Right click on the Texture Image file in the “Packed Files” list on the upper right side and delete it. Now you only have one file to worry about. Yay!

Download this file and extract it. Remember where you put it. It contains one Material Description file.

In SimPE, right click on an empty space in the list of “Packed Files”. On the pop-up menu, click “Add”. In the Open File dialog, browse to the file you just unzipped. Select it and then click Open.

In the list of “Packed Files”, select the original Material Description that was already there before you added mine. You’ll see “Filename” at the top, and then the same name repeated in 2 lines. You can only select the text in the second line. Select it all and copy it (Ctrl+C).

Now in “Packed Files” select the new Material Description that you imported, select the Filename “##0x7ffe9d3a!floor_8ed7d0bb_txmt” and paste (Ctrl+V) the filename that you just copied.

The next line down is called “Description”. Select the text in that box and paste the same value in that box, and then delete the letters “_txmt” from the end of it.

Now all you need to do is set the color for your tile and how transparent you want it to be.

Pick a color that you like in your graphics program, and get the RGB (Red, Green, Blue) values for it. A very bright purple has the RGB value 200, 103, 255. For each of the 3 numbers, divide them by 255. So:
200/255 = 0.78
103/255 = 0.4
255/255 = 1

Write down or somehow keep track of the numbers you get in your calculation. (Round them off to 2 decimal places like I have.)

Back in SimPE, find the line in the new Material Description (Plugin View, in the Properties tab... this should already be visible) called “stdMatDiffCoef” and click on it.

To the right, you’ll see
Name: stdMatDiffCoef
Value: 1,0,0

Change the Value to the numbers you got in your calculations, in the order Red,Green,Blue with no spaces between them. So for my bright purple, the new Value would be 0.78,0.4,1

Now in the same list, find the line called “stdMatUntexturedDiffAlpha” and click on it. You will see that it has the Value 0.3. You can change that value to anything between 0 (completely transparent) and 1 (no transparency). This is a matter of preference and some trial and error, so you’ll just have to play with it a bit to get the number you like best.

When you’re done with that, click the Commit button in Plugin View.

Back up in the list of “Packed Files” right click on the original Material Description and delete it. You have replaced it and don’t need it anymore. On the main menu, click File and then Save.

Select one the Object XML file in the “Packed Files” list. In the lower part of the screen, click the “Packed File” tab. You’ll see a list of numbers and letters.

Select the value of the one called “Group”. In the “Packed Files” list, click on the new Material Description file. Select the value for Group here, and paste the one you just copied to replace it. Click the blue text that says “commit”.

In the main menu, click Tools and then "Global Fix TGI". Then on the File menu, click Save again, and you’re done. Test out the new tile in the game.

You might want to reopen the package file and change the values for color and transparency level a bit. If you do that, you only need to remember to click “Commit” in the Plugin View for the Material Description and then save the file. Nothing else needs to be changed.
Download - please read all instructions before downloading any files!
File Type: zip MATD-transparent-floor-untextured.zip (1.1 KB, 1280 downloads) - View custom content
Administrator of Loverat's Tea and Underpants
Original Poster
#3 Old 13th Jan 2005 at 4:48 PM Last edited by RGiles : 16th Apr 2005 at 7:17 PM.
Part 3
If you are making a textured tile with some transparent parts:

Known issues:
If you place these tiles on directly on the ground, they will reflect a bright blue color and show shadows as bright blue.
If you clone these tiles in HCP, the transparency will be lost in the clone.


You will need to have the Nvidia DDS Utilities installed, and the correct path set to them in SimPE’s options. Saving as a DDS file from Photoshop or PSP will not work in this instance.

Make your image in your graphics program. It should be 256 x 256 pixels. Try to keep the lines between transparent and visible very sharp. Fading between visible and invisible won’t work. Please do not ask me how to use your graphics program. It came with a help file, and I probably don’t know anyway.

Save the file as a PNG. If you are asked whether to use interlacing when you save the file, choose no.

In SimPE, select the Texture Image file in the “Packed Files” list on the upper right. In the lower part of the screen, select the tab for “Plugin View”.

Right click on the image preview, and on the popup menu, click “Build DXT…”

A new dialog box will pop up. Click the word “open” (it’s in blue text and underlined). That will give you an Open File dialog where you can browse to the image you just made and open it.

The rest of the settings in this dialog should be corrected automatically, but you can double check the important ones...
Levels: 1
Size: 256 x 256
Format: DXT3Format

Click the “Build” button. You’ll see a DOS window open briefly and then close itself. That’s the Nvidia DDS Utilities running. When it closes, your image should be visible in the preview.

Click the Commit button, and then save your package (File menu, and then Save).

Download this file and extract it. Remember where you put it. It contains one Material Description file.

In SimPE, right click on an empty space in the list of “Packed Files”. On the pop-up menu, click “Add”. In the Open File dialog, browse to the file you just unzipped. Select it and then click Open.

In the list of “Packed Files”, select the original Material Description that was already there before you added mine. You’ll see “Filename” at the top, and then the same name repeated in 2 lines. You can only select the text in the second line. Select it all and copy it (Ctrl+C).

Now in “Packed Files” select the new Material Description that you imported, select the Filename “##0x7fa6a1b3!floor_eeda5bd2_txmt” and paste (Ctrl+V) the filename that you just copied.

The next line down is called “Description”. Select the text in that box and paste the same value in that box, and then delete the letters “_txmt” from the end of it.

Below the “Description” are 2 tabs called “Properties” and “File List”.

In the “Properties” tab, click on “stdMatBaseTextureName” in the list on the left. On the right side of the screen, change the value “##0x7fa6a1b3!floor_eeda5bd2” to the same value as the “Description” field above.

In the “File List” tab, click on the text “##0x7fa6a1b3!floor_eeda5bd2” in the box on the left, and then in the box on the right change it to the same value as the “Description” field above.

Click the “Commit” button in Plugin View.

Back up in the list of “Packed Files” right click on the original Material Description and delete it. You have replaced it and don’t need it anymore. On the main menu, click File and then Save.

Select one the Object XML file in the “Packed Files” list. In the lower part of the screen, click the “Packed File” tab. You’ll see a list of numbers and letters.

Select the value of the one called “Group”. In the “Packed Files” list, click on the new Material Description file. Select the value for Group here, and paste the one you just copied to replace it. Click the blue text that says “commit”.

In the main menu, click Tools and then "Global Fix TGI". Then on the File menu, click Save again, and you’re done. Test out the new tile in the game.
Download - please read all instructions before downloading any files!
File Type: zip MATD-transparent-floor-textured.zip (1.3 KB, 818 downloads) - View custom content
Test Subject
#4 Old 24th Jan 2005 at 2:56 PM
tyvm for that very easy tutorial, Rgiles...

i love translucent floors- was one of my favorites in sims1

i made 4 colored translucent floor tiles, and they are working exellent in my game...

one question- must i delete the original texture from the package file, or not?

and another- it's possible to do this with walls?

this is my HP - cu there?
Administrator of Loverat's Tea and Underpants
Original Poster
#5 Old 24th Jan 2005 at 4:44 PM
I haven't been able to get this to work with walls yet. I did a lot of experiments and either the walls flash puple and black, or they are just not transparent. But I still have a couple of things I'd like to try. Maxis actually made a glass block wall that is supposed to be semi-transparent, but it was not included in the game. Rentechd found the files for it, so I imported tham into the game... but they don't work.

You don't really need to delete the texture, but since it's not being used, you might as well just to save space.

RG
Test Subject
#6 Old 24th Jan 2005 at 5:00 PM
i've delete it ... it's a nice little package now... :D

yes, i know this glassblock walls from sims1...
why don't they putted it in sims2... :weep:
i think, its harder to find out this mod, because the walls can pull down?

don't worry, i believe in you ...
and thanks for your hard work.... i've learned so much at this forum
greetings
chriko

this is my HP - cu there?
Forum Resident
#7 Old 29th Jan 2005 at 2:32 PM
i only know about a wall with stucco and a border on top which is transparent... or should be.

can you send me the flashing wall?
Test Subject
DELETED POST
29th Jan 2005 at 2:34 PM
This message has been deleted by Sorcia. Reason: Replied to the wrong thread >>;
Test Subject
#8 Old 1st Feb 2005 at 12:50 AM
RGiles,

Thanks for posting this tutorial. However, I am having a problem in step 2 at this point "In the list of "Packed Files", select the original Material Description that was already there before you added mine. You'll see "Filename" at the top, and then the same name repeated in 2 lines. You can only select the text in the second line. Select it all and copy it (Ctrl+C)"

The problem I'm having is that after I select the original Material Description I am not seeing the "Filename" that you speak of; therefore, theres nothing available for me to copy....any ideas ?? I've lokked at the top as per your tut but no can find :confused:

Any help will be greatly appreciated!!!
Test Subject
#9 Old 1st Feb 2005 at 12:02 PM
the original material description don't have a texture...
you must delete it and add the MMAT from RGiles...
than you have a file to edit

this is my HP - cu there?
Administrator of Loverat's Tea and Underpants
Original Poster
#10 Old 1st Feb 2005 at 6:25 PM
hoosier4974,

Are you in Plugin view after you've selected the Material Description?

RG
Test Subject
#11 Old 1st Feb 2005 at 9:32 PM
Quote:
Originally Posted by RGiles
hoosier4974,

Are you in Plugin view after you've selected the Material Description?

RG


Hmmm, not sure, I'll give it another try . But first, should I be in that view ?? :confused:
Administrator of Loverat's Tea and Underpants
Original Poster
#12 Old 1st Feb 2005 at 10:01 PM
yes you should
Test Subject
#13 Old 15th Feb 2005 at 11:04 PM
Hi,

I try to make a doormat (Part 3
If you are making a textured tile with some transparent parts

I think I made everything correct, but in the game i can't see my floor :confused:. whats wrong?

thx for helping
greets grizzli

I am not perfect in English - *sorry* - I try to improve :)
Test Subject
#14 Old 18th Feb 2005 at 8:16 PM Last edited by Naora : 18th Feb 2005 at 8:22 PM.
*argh* i don't get it.
i do whatever the tut says, but the floor is always blue...totally deep blue
what' wrong??? pls help.

edit: and the fix integrity is not in the tool section but in the plugin section.
and when i do the fix i. the group value changes. e.g from 0x7F070E69 to 0xFFFFFFFF.
is that correct? don't think so, because i have a blue floor instead of a transparent one.
Forum Resident
#15 Old 18th Feb 2005 at 8:25 PM
The latter is because the tutorial was written for an older version of SimPE

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Test Subject
#16 Old 18th Feb 2005 at 8:41 PM
Hi xanathon :howdy:

do you know how we can repair with the new version?
Also the 3rd Part?

Germantext:
Ich dachte nicht das es diesbzgl. so nen Unterschied zw. den einzelnen Versionen gibt. *hmmm*

I am not perfect in English - *sorry* - I try to improve :)
Lab Assistant
#17 Old 18th Feb 2005 at 9:34 PM
Firstly Mr. Giles, Thankyou muchly for the great transparent tiles. Wonderful work and they work like a gem in the Game. However, I am wondering if anyone has come across any problems while in HomeCrafter?

Since downloading the tiles My HomeCrafter program crashes whenever I try and access the "tiles section".
I'm not sure if it is your tiles that is doing it because I downloaded quite a few collections at the time.

Can someone suggest an easy way to find out without going to my backup copy of the game as I have built several houses and moved in families since and would hate to lose them.

Many thanks

"Never interrupt your enemy when he is making a mistake."
- Napoleon Bonaparte (1769-1821)
Test Subject
#18 Old 9th Mar 2005 at 2:06 AM
I can't complete the last step in part 3, It won't let me edit the pack file directory... :blah:
Administrator of Loverat's Tea and Underpants
Original Poster
#19 Old 9th Mar 2005 at 10:53 PM
I need to sort out how to update this. Right now It's not working because of the changes made to the "Fix Integrity" option in SimPE. I'll post an update as soon as I can. I'm sorry I forget about this. Bad bad me! :Slap:

RG
Test Subject
#20 Old 24th Mar 2005 at 10:44 PM
rgiles, thank you for the tute. im having one problem however...

im not a programmer, but fortunately for me, my BF is a CS major, and he helped me get through the tute with near success. i was able to complete all the steps described for transparent floor tiles. but when i start up my game, they arent available.

ive spent a lot of time reading and rereading the inmstructions, but to no avail. i followed every step. could the change to the "fix integrity" option be the cause of this? i need the clear floor tiles for a futuristic community center im creating. please help, i am out of ideas.
Guest
#21 Old 16th Apr 2005 at 6:46 PM
Apologies for dragging up an old thread, but I was wondering whether you've had time to look into how to get the files to show in-game?

Like greydaze, I followed the instructions to the letter (with the obviuos exception of 'Fix Integrity' being in a new place and now, apparently working differently). The new tiles do not appear in the catalogue.
Administrator of Loverat's Tea and Underpants
Original Poster
#22 Old 16th Apr 2005 at 7:11 PM
Fix Integrity actually no longer serves the same purpose that it used to, and using that option may have been why your tiles do not appear in the catalog.

I'm sorry that I've taken so long to update this, but with the loss of the functionality of the old "fix Integrity" option, I felt that it needed to wait.

I requested that Quaxi add the old function back, and he has done that in version 0.33 and later, so now I can update. Thank you for this, Quaxi!

RG
Beautiful Girl from Norway
#23 Old 16th Apr 2005 at 7:19 PM
Great Tutorial RGiles i will definatly try this :D
Guest
#24 Old 16th Apr 2005 at 7:53 PM
Quote:
Originally Posted by RGiles
Fix Integrity actually no longer serves the same purpose that it used to, and using that option may have been why your tiles do not appear in the catalog.

I'm sorry that I've taken so long to update this, but with the loss of the functionality of the old "fix Integrity" option, I felt that it needed to wait.

I requested that Quaxi add the old function back, and he has done that in version 0.33 and later, so now I can update. Thank you for this, Quaxi!

RG



Thanks for the clarification - will have a go at the upgrade now! :D
Test Subject
#25 Old 26th Apr 2005 at 4:04 AM
Default black shape where texture should be...?
:smash:Hello & TY for this wonderful tutorial. I am trying to create a textured wooden tile with open areas between wooden planking. After finishing all the steps you mention I go to check out the tile in the game..the tile works except that where the wood texture should be it is just a black colour...so the clear gaps and the areas where the wood should be are correct except there is no image of finished wood..just the flat black cutout where it should be registering. I know I must be doing something wrong somewhere.....I've run thru the process 1/2 a doz' times with the same result...would you or anyone be able to give me an indication of what I may be doing wrong..?...thanx...much appreciated.... ......I am using SimPE 0.33
Page 1 of 2
Back to top

Section jump