How do I create panes of glass?

Posted By: Wesker

How do I create panes of glass? - 07/26/06 01:29

I need a simple way to create glass. So far all I've been doing is using semi transparent sprites, but they are impossible to size properly into a frame. Is there a way to texture blocks to be semi-transparent?
Posted By: NL_3DGS_n00b

Re: How do I create panes of glass? - 07/26/06 02:19

Just make a window with a block, cut it, paste in new project, give it a white texture, save it as map entity, open project again, inport as map entity, place in window, add a script to it with makes it transparent, and play with the alpha value.
Posted By: MJR_Corp

Re: How do I create panes of glass? - 07/26/06 05:49

I understand all of that except the last two things, what is alpha? And what kind of script?
Posted By: ulillillia

Re: How do I create panes of glass? - 07/26/06 08:35

Code:

action make_transparent
{
my.transparent = on;
my.alpha = 20; // play with this
wait(1); // registers the above
my.dynamic = off; // not dynamic to speed up rendering of this entity
}



This. Alpha is transparency. In Gamestudio, it uses a percentage, from 0 to 100. With 0%, it's the same as making it invisible. With 100%, it's fully opaque. With something in between, you can see through it. If you look out a standard window of about 5 millimeters, the glass has an alpha of 16 (6.3%) and thus easily able to be seen through. A thin trash bag would have an alpha of about 208 (81.3%) and very easily seen, but you can still see through it. For setting the transparency of each pixel individually, you'll need a 32-bit TGA or DDS texture image with alpha channel in it. GIMP is a useful program for making images with alpha channel.
Posted By: DrE

Re: How do I create panes of glass? - 08/01/06 16:53

How can I make the part of the model go transparent. I made a 32-bit tga and used it on a model, but when I apply the transparent action to the model, the whole model goes transparent. Do I need to define what color should be transparent?

btw, the "my.dynamic = off" gives this error:
"war.wdl 1927:0 Error(50): Parameter unknown dynamic Parameter"

What's the problem?
Posted By: ulillillia

Re: How do I create panes of glass? - 08/01/06 20:29

my.dynamic only applies to the 6.31.4 version and later. Please update your Gamestudio to 6.31.4 or the latest 6.40.5. For making part of the model transparent, I suggest using a separate entity for the transparent parts or you'll get odd Z-sorting errors. To make parts of the model of varying transparency, use a texture with alpha channel.
Posted By: Grimber

Re: How do I create panes of glass? - 08/01/06 21:24

you have to apply the semi transparent texture to a SEPERATE skin of the model then UV map the polys you want to that skin. you won;t get the sort problem then if you do it right.

you can't combine semi transparent full opaque in the same skin image.
Posted By: Anonymous

Re: How do I create panes of glass? - 08/02/06 01:25

Well you can do that with 6.4, because the new MDL format supports multiple textures.

So check the announcement forum for an update to 6.4. Currently, it's public beta.
Posted By: ulillillia

Re: How do I create panes of glass? - 08/02/06 01:29

Actually, 6.40.5 is now on the download page. It's no longer a public beta. 6.31.4 has moved into the old versions section.
© 2024 lite-C Forums