transparent blocks

Questions and answers about the how and why of making maps.
Post Reply
User avatar
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

transparent blocks

Post by DeathFire » Sat Jul 14, 2007 7:39 am

how do you make transparent blocks just like the ones in missile war?
cop @ laserball's crazy new server

ts
Dev Monkey
Dev Monkey
Posts: 970
Joined: Fri Jan 14, 2005 6:26 pm

Post by ts » Sat Jul 14, 2007 8:03 am

I'm suggesting you to read http://my.bzflag.org/w/ as it's pretty good. Look for the material property.
GU league: http://www.guleague.org/
An introduction to TCP: http://www.lafkon.net/tc/

User avatar
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

Post by DeathFire » Sat Jul 14, 2007 8:04 am

ts wrote:I'm suggesting you to read http://my.bzflag.org/w/ as it's pretty good. Look for the material property.
i searched for transparent and blocks but cant find anything
cop @ laserball's crazy new server

User avatar
the_j0k3r
Private First Class
Private First Class
Posts: 91
Joined: Fri Aug 18, 2006 9:56 am
Location: australia

Post by the_j0k3r » Sat Jul 14, 2007 12:31 pm

The wiki has an index which if you follow, within 1 link you can find an index of everything you will need to make transparent blocks.

I found the required pages to learn this in about 2 minutes, so you could've just done it yourself, you don't have to ask about everything.

You need to know 2 things for a transparent box/wall - How to make a meshbox, how to apply a material to a meshbox. Its really not hard.

Use http://my.bzflag.org/w/Material as ts said to find out how to make a material, and use http://my.bzflag.org/w/Color%28BZW%29 to find out the use of the color property, so you can make the material a transparent one.

Then use http://my.bzflag.org/w/Meshbox to find out how to make a meshbox, and apply your transparent material to that meshbox.

Now you have a transparent block. And to think all that information was in the same index on the 'Map making' section of the wiki...
Image

User avatar
DeathFire
Private First Class
Private First Class
Posts: 23
Joined: Sun Dec 24, 2006 9:50 am
Contact:

Post by DeathFire » Sat Jul 14, 2007 12:33 pm

the_j0k3r wrote:The wiki has an index which if you follow, within 1 link you can find an index of everything you will need to make transparent blocks.

I found the required pages to learn this in about 2 minutes, so you could've just done it yourself, you don't have to ask about everything.

You need to know 2 things for a transparent box/wall - How to make a meshbox, how to apply a material to a meshbox. Its really not hard.

Use http://my.bzflag.org/w/Material as ts said to find out how to make a material, and use http://my.bzflag.org/w/Color%28BZW%29 to find out the use of the color property, so you can make the material a transparent one.

Then use http://my.bzflag.org/w/Meshbox to find out how to make a meshbox, and apply your transparent material to that meshbox.

Now you have a transparent block. And to think all that information was in the same index on the 'Map making' section of the wiki...
sorry i forgot to say that i already found it sorry
cop @ laserball's crazy new server

flight
Private First Class
Private First Class
Posts: 58
Joined: Sat Mar 03, 2007 3:47 am

Post by flight » Sun Jul 15, 2007 4:10 pm

i know you said you already found it, but if you want all around help on editing by hand, materials physics, and complex shapes and all that this is a great site!!! :P

http://my.bzflag.org/w/Editing_by_Hand

give that a good read and you'll learn a lot. or if you want to short cut you can just search for materials or what ever it is you want to read.

good luck.

User avatar
Ratatosk
Private First Class
Private First Class
Posts: 277
Joined: Sun Nov 05, 2006 2:04 am
Location: Chicago, IL

Post by Ratatosk » Sun Jul 15, 2007 5:06 pm

i know how to make an invisible object.
all you have to do is put this material into your file

material
name (insert name here)
color 0 0 0 0
diffuse 0 0 0 0
end

now put a matref into any object that supports materials like a mesh, meshbox, meshpyr, cone, arc etc

like this
meshbox
size 1 2 3
position 1 2 3
matref (same name as material)
end
Courage is the magic that turns dreams into reality.
Image

User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy » Sun Jul 15, 2007 5:30 pm

Murtagh wrote: color 0 0 0 0
diffuse 0 0 0 0
Those two lines do exactly the same thing. You don't need both.
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007

User avatar
Ratatosk
Private First Class
Private First Class
Posts: 277
Joined: Sun Nov 05, 2006 2:04 am
Location: Chicago, IL

Post by Ratatosk » Sun Jul 15, 2007 9:50 pm

still its the basic idea, its still a clear object
Courage is the magic that turns dreams into reality.
Image

User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano » Sun Jul 15, 2007 11:24 pm

Murtagh wrote:still its the basic idea, its still a clear object
He was just stating it for clarification, which is relevant when someone besides you is looking at it. You only need one or the other, and I had the question when looking at it as to why both were there. CBG clarified the question I was thinking, and he was sure others would have about your post, with the information he provided. We all agree that the block is transparent, just redundantly so.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln

User avatar
Ratatosk
Private First Class
Private First Class
Posts: 277
Joined: Sun Nov 05, 2006 2:04 am
Location: Chicago, IL

Post by Ratatosk » Sun Jul 15, 2007 11:53 pm

i guess ill work on makeing everything easier for everyone else
Courage is the magic that turns dreams into reality.
Image

User avatar
optic delusion
Special Forces
Special Forces
Posts: 989
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion » Mon Aug 06, 2007 4:50 am

Sorry missed this one last week..
If this is for the new glass map, this might be important.
It's better to use a transparent texture than a decimal alpha, if you are looking through multiple transparent blocks.
When you use alpha-transparency, the client draws all six sides of a block, and there is no occlusion. With one or two blocks, you won't notice it, but with if you are looking thru multiple transparent blocks, framerate drops signifigantly.

http://my.bzflag.org/bb/viewtopic.php?t ... ansparency

heres the textures I originally used to test with.
http://images.bzflag.org/pmatous/transparent/
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Post by SkillDude » Mon Aug 06, 2007 8:58 pm

One question, I tried to make a transparent texture, and I used white and saved as a png image file, but I still saw the white. Do I have to use a program (I have Paint.NET and the GIMP) to set an alpha value for the white or something to make it transparent?

User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy » Mon Aug 06, 2007 9:48 pm

White is a colour, hence, not transparent.
Try creating a new image in GIMP. You can probably set the backgroud as transparent... Just don't add anything to the image.
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007

User avatar
optic delusion
Special Forces
Special Forces
Posts: 989
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion » Mon Aug 06, 2007 10:36 pm

Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

Post Reply