Invisible walls
- Cruel dog
- Private First Class
- Posts: 173
- Joined: Sat Jul 16, 2005 9:32 pm
- Location: Québec province, Canada
- Contact:
Invisible walls
hello, Could anyone give me the easyest way to make an invisible wall? Thanks!
Owner@ BZAddict.net
Admin @ bunch of servers
And much more!
"Even if I am named Cruel dog, I still am friendly! I just become Cruel with troublemakers! xD"
Admin @ bunch of servers
And much more!
"Even if I am named Cruel dog, I still am friendly! I just become Cruel with troublemakers! xD"
Code: Select all
material
name invisible
color 0 0 0 0
end
meshbox
position 0 0 0
size 10 10 10
matref invisible
end
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
if you are using lots and lots of invisible walls, it might be better to use an invisible texture
http://images.bzflag.org/pmatous/transparent/
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.
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.
Expanding on Optic's post :
I'm not exactly sure what the reasoning behind this being better, except perchance that it makes the map load faster.
Code: Select all
material
name invisible
texture http://images.bzflag.org/pmatous/transparent/Trans-100.png
end
meshox
position 0 0 0
size 10 10 10
matref invisible
end
- Joe-Schmoe
- Private First Class
- Posts: 192
- Joined: Mon Jul 24, 2006 1:10 am
- Location: This field unintentionally left blank.
You can make an invisible object with just one line of code...
Code: Select all
meshbox
position 0 0 0
size 100 2 20
rotation 45
diffuse 0 0 0 0
end
Code: Select all
diffuse 0 0 0 0
“Roses are #FF0000, violets are #0000FF, all of my base are belong to you.” ~ Nerd on Colour
That may be the easiest, but we are trying to figure out which way is the best for many objects.PETER wrote:You can make an invisible object with just one line of code...
Code: Select all
meshbox position 0 0 0 size 100 2 20 rotation 45 diffuse 0 0 0 0 end
Code: Select all
diffuse 0 0 0 0
Okay then, I think you can do this with groups...Legolas_ wrote: That may be the easiest, but we are trying to figure out which way is the best for many objects.
Code: Select all
define many_objects
meshbox
position 0 0 1
size 10 10 1
rotation 0
end
meshbox
position 0 0 2
size 10 10 1
rotation 0
end
meshbox
position 0 0 3
size 10 10 1
rotation 0
end
enddef
group many_objects
scale 1 1 1 # Scale if you want
shift 0 0 0
diffuse 0 0 0 0 #Where did all those objects go?
end
“Roses are #FF0000, violets are #0000FF, all of my base are belong to you.” ~ Nerd on Colour
- optic delusion
- Special Forces
- Posts: 1054
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
It has to do with backface culling. The faces of an object that you can't see, because they are behind another face. When you add transparency.. they suddenly become visible.
I just did a little research, and it seems that the devs have "fixed" backside culling for transparent faces. It used to be (V2.0.4) that when you used transparency math in a material, bzflag displayed all sides of the object, including backfaces. This led to a framerate reduction which became exponentially worse the more objects were transparent. .. But when you used a transparent texture bzflag didn't know it was transparent and culled faces properly, leading to faster FPS.
Now face culling is done the same way with a color math or with a texture. So there is no FPS boost either way. I think this was fixed in 2.0.6.
~devs++
I just did a little research, and it seems that the devs have "fixed" backside culling for transparent faces. It used to be (V2.0.4) that when you used transparency math in a material, bzflag displayed all sides of the object, including backfaces. This led to a framerate reduction which became exponentially worse the more objects were transparent. .. But when you used a transparent texture bzflag didn't know it was transparent and culled faces properly, leading to faster FPS.
Now face culling is done the same way with a color math or with a texture. So there is no FPS boost either way. I think this was fixed in 2.0.6.
~devs++
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.
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.