44
  Action commands
  Opacity / Transparency
 
There are 3 ways of having a transparant object...
 
1. Modeling
The first way is using transparant objects which have been modeled that way. If you use you own object path, then you can also modify an existing model and make it more transparant in Accutrans and load this new object into the object path of your world.
In the worlds uberpath and megapath, you will find already a wide range of transparent objects, and most of these objects are windows.
sign4clear.rwx
create color red
create texture fw-hwall1
In this example, you can see that you can add another color or another texture to the object, but the transparency of the object itself will remain.

2. The Opacity command
 
With this command you can make any object transparant, and you can choose yourself the intensity of opacity , ranging between 0 and 1.
p2cube0200.rwx
create opacity 0.7
create opacity 0.4
create opacity 0.2

 

3. Masks
Masks in Activeworlds are either .png-files or bitmaps(in black/white). With the bitmaps you can mask other objects . The white part of the bitmap preserves the original image texture , and the black part makes the image totally transparant (invisible) and creates images which have been cut out.
p2cube0200.rwx
create texture rodiron2 mask=rodiron2m
However instead of using black and white in the bitmaps, you can also use shades of grey, and this will create a transparency to the objects.
create texture cloud_strat1 mask=cloud_strat1m , color tint red
Before the opacity command was introduced, then the semitrans-mask was used, with 14 different shades of grey, for every degree of transparency.
create texture rm-floor5 mask=semitrans04
create texture rm-floor5 mask=semitrans07
You can also create another kind of transparency , by using bitmap masks which are a grid or pattern of black and white :
create texture metal1 mask=awd4m
create texture metal2 mask=awd7m
create texture metal1 mask=awd4m, color tint blue

In this example we used panels with white background (create color white) and then we put a blue-coloured pole behind the cubes, to show better the transparency.

* Making a hole inside a plain wall
 
Some masks don't cut out the outside borders of the image, but only the central part , all depends on the black and white parts of the bitmap image.
w1pan_0400g / w1pan_0800g / w1crv_1000g
create texture fwall001b mask=tv!,scale 1 1.5
With this mask command, you cut out square holes , and make these rectangular with the scale command. Finally you add a window frame, which is scaled as well.
wframe02
create texture f-furn1b,scale 1.5 1.75
This building technique is rather something particularly with masks, but there is only a small number of masks in the objectpath which can be used to make windows. But there is another building technique, by combining masks and opacity, you will get an unexpected transparency, and you will be able to build the same thing... (see below this page)
Winter 627N 2007E - built by Bach Zhaa
* Making a glass window with the semitrans-mask
Now we make the same example but with a glass window :
wframe02.rwx
This time we start with the window frame and we now add the wall and scale it.
w1pan_0400g.rwx
create texture rm-wall3 mask=tv! , scale 0.6 0.8 0.6
Finally we add a window, make it transparent and scale it too
wpane02.rwx
create texture frost mask=semitrans09, matfx tex=c_soft1
* Partial transparency
 
tva2.rwx
create texture silvmetal mask=semitrans09 tag=200
In this example, only the tv-screen-part of the tv-model has been made transparent. This tv-model has been modeled with tags , the part that has been tagged with 200 has been made transparent. This building technique can only be applied to objects which have been modeled with tags.
Yellow 692N 955E - Digigurl's Demo Yard
* Combining mask + opacity
This is another technique for making windows inside a plain wall
w1pan_0400g.rwx
create texture bluewall1 mask=stone1m
In this example, the mask command does not really create a hole inside the plain wall. There hasn't been masked anything.
winb2.rwx
When you put a window inside the plain wall ,and, not really expecting, you will see that there is transparency, but with a "flashing" animation. This flashing is a conflict between the wall texture and the transparency texture of the windows, because both textures are overlapping with eachother.If you move the window a little bit forward, then you you have no "flashing" anymore, will see that the transparency only works on 1 side of the wall. The solution for this can be found in Bleakwood...
Yellow 701N 946E - Digigurl's Demo Yard
In Bleakwood, you will find the "Bach Zhaa wall of fun". Here the objects don't really merge with eachother, the objects are a few centimeters in front of the wall, and we see that the wall becomes transparent. In fact ,these examples are rather "bugs" in the Activeworlds program, where you have transparency , when normally you should not have any transparency at all.
pp15t_h.rwx
create texture thbrick3,opacity .999
create texture thbrick3 mask=stone1m
Here we have the same kind of mask as in Digigurl's Demo Yard, but will have the same effect with a plain wall with opacity .999
pp01s2.rwx
create texture poster2 mask=poster2,alpharef no
create texture poster2 , opacity 0.5
xaw27.rwx
create texture marble3 mask=marble3,alpharef no
create texture fw1,opacity .2,move -2 -2 time=6 smooth loop
"Bug": Using opacity or mask for 1 object , together with another object which also has opacity or mask, will cause a total transparency.
pp16s1.rwx
With this transparent object, you can look through the wall from 1 side. Adding the same object on the other side of the wall, will create a window. Adding a frame will make the window complete !!

This technique could be odd, but it's a good way of building windows inside plain walls : you can add as many windows as you want , at any place and at any size. One disadvantage is that this is considered as a "bug", the risk could be that the bug will be fixed in a future version of AW and this technique would not work anymore, but nowadays this technique is ok. Another disadvantage is , if you want to open the windows (or doors) , then it's better to use a mask which cuts out the windows and doors in advance. And if you want to pass through the window or door, then the walls should be made "solid off".

AlphaWorld 16028N 26973W - Bleakwood Demo Yard by KumaBear