|
Windows and Transparent Objects Making windows and other clear objects PREREQUISITES This tutorial assumes that you know how to make a basic room that is exactly 512x512 and 128 units high. You will need a wall striking through the center of the room from wall to wall across the X axis (the interior wall we shall call it) and is 16 units thick. Texture the room any way you like it, I have also provided a room prefab for you to use if you don't want to start from scratch. INTRODUCTION Ok, first we have to take a look at what we are able to do with transparent objects. Make a brush anywhere in one of Worldcraft's three design windows and tie it to the entity Func_wall by selecting the brush and right clicking. Select "tie to entity" from the drop down list. Open the properties window and this is what you should see. I'll do the usual run through for the property settings now...
Name: This is pretty useless for a func_wall. I guess you could set this if you wanted a nice name for all your walls. Render FX: This setting can be used for some really freaky wall effects like fading in and out. Never used this myself and we won't use it this session. Never mind it for now, you can play with it later. Render Mode: This is one of the main properties we will be using. There is a drop down list and you will notice several options. Select texture from the list and move on. FX Amount [1-255]: This is going to be used to set how much of the effects you will be applying to the wall. The closer to 1 it is, the clearer our glass will be. Why does it seem backwards? The setting you picked was texture, meaning that the engine will display the texture at any amount you want. Setting texture amount to 255 makes the wall completely opaque. Setting it to 1 makes it almost invisible. FX Color [R G B]: This setting would be used if we wanted light to eminate from the object, which we don't, so leave it be. Global Entity Name: ??? Minimum Light Level: ??? Now That We Have Our Room... Now that the room is completed, make a brush inside the interior wall with a glass texture of your choice. It should be 64 units tall and 256 units long. Give it the same thickness as the interior wall and try to make it in the exact center of the interior wall. Make sure the glass wall is selected and click tools and carve. This will erase the wall surrounding the glass to make it a window. Now, tie to entity func_wall like we did above and set render mode to texture and render amount to 100. Once this is completed, throw in a player start and compile the level. Didn't Work So Great? This is because clear glass tends to look better once you have lighting in. So set a "light" entity on either side of the glass and re-compile your map. You will notice this time that the glass will appear more transparent than withought the lighting. You can also use the texture render mode setting to make just about any texture appear clear. This can be both a good thing and a bad thing. I shall now leave you to experiment!
|