glass

Questions and answers about the how and why of making maps.
Post Reply
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

glass

Post by smartkid »

Ok anuther odd ball uestion is it possable to make glass? aka like make a block see throuth but cant shoot through?

thanx,
smartkid
~Sk
JPT
Private First Class
Private First Class
Posts: 260
Joined: Tue Nov 29, 2005 1:21 pm
Location: Germany

Post by JPT »

You have to use a meshbox with a material:

Code: Select all

material
  name lookthrough
  diffuse 0.5 0.5 0.5 0.5 
end

meshbox
  position x y z
  size a b c
  rotation x
  matref lookthrough
end
I didn't test it, but try :)
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

C:\>"C:\Program Files\BZFlag2.0.4\bzfs.exe" -conf "C:\BZFS.conf"
using spam time of 10
using spam warn amount of 3
c:\zap.bzw: warning (line 14): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 54): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 62): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 70): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 78): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 86): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 94): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 102): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 110): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 118): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 126): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 134): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 142): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 150): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 158): unknown object parameter "matref" - skipping
c:\zap.bzw: warning (line 166): unknown object parameter "matref" - skipping

thats what i get in my DOS prompt ...
~Sk
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

o wait nvm
~Sk
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

works like a charm thanx
~Sk
User avatar
DJ Atomica
Private First Class
Private First Class
Posts: 145
Joined: Thu May 12, 2005 8:55 pm
Location: PA - USA

Post by DJ Atomica »

Edit your previous posts instead of making new ones. I believe it is considered smap err spam. :roll:
DJ Atomica.........Scratching the records! :twisted:

Skype me! Skype name is "dj.atomica"!
User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux »

Here is how that works:

Code: Select all

diffuse 0.5 0.5 0.5 0.5
         ^   ^   ^   ^
         |   |   |   |
         R   G   B   A
You already know what R, G, and B do... in this case, makes the box gray. A is alpha, used for transparency. 0.5 makes the object 50% opaque, i.e. the pixel color is determined by half the object color and half the background color. For completely transparent glass you could use a value of 0, but then you wouldn't be able to tell that there was glass there unless you bumped into it.

Note that this will still cast a shadow. If you don't want your windows making shadows, add a 'noshadow' option into the meshbox.
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

To DJ Atomica: yeah your right, no one likes double posting I was just being lazy wont happen again

TO TD-Linux: thanx aton I needed to know that
~Sk
User avatar
DJ Atomica
Private First Class
Private First Class
Posts: 145
Joined: Thu May 12, 2005 8:55 pm
Location: PA - USA

Post by DJ Atomica »

WOW! Thanks TD, you helped me understand some of the man page. Can you translate/remake everything on there? :P (I'm not kidding)
DJ Atomica.........Scratching the records! :twisted:

Skype me! Skype name is "dj.atomica"!
User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux »

I'll add it to the MapMaking WIKI tomorrow.
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

cool I remotely helped :)
~Sk
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

No No No.

Post by optic delusion »

I Strongly argue AGAINST using diffuse or color to create transparency. Maybe for one or two objects, but not more.

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

this effect becomes much worse if you look through several transparent objects at the same time.
I believe trepan is working furiously to fix this.

In the meantime try these textures, FPS slowness will disappear
http://images.bzflag.org/pmatous/transparent/
trans-25-50-75-100
I believe an entire map can be built around these three textures, make green objects drive-thru, red objects shooot-thru, blue objects both, purple objects your-guess-thru. And of course all of them are see-thru.
If you do the same thing with diffuse, your framerate will be about .02 fps.
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
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

diffuse 0.5 0.5 0.5 0.5
Bleah, I always use color 0.5 0.5 0.5 0.5...

8)
User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1405
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom

Post by Spazzy McGee »

argh, the map i'm currently working on is riddled with transparency issues.
"Life is what happens to you while you're busy making other plans." - John Lennon
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Re: No No No.

Post by smartkid »

A-Delusion wrote:I Strongly argue AGAINST using diffuse or color to create transparency. Maybe for one or two objects, but not more.
The map that i was working on is giving me a hard time,
Basicly the glass looks horrible how it is (everything glass) and what i wanted to do with my lasers dident work, who knew firing 100+ world laser weapons lags a server?

and also I spent 5hours making a core with a 16 sided shape to find out that BZF can render circles but BZEdit cant, so now im going to have to scrap my work and redo 70% of the map

and after that I have to figure out why my spawn zones arnt working right!
I dont even know if i should continue...
~Sk
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

Basicly the glass looks horrible how it is (everything glass) and what i wanted to do with my lasers dident work, who knew firing 100+ world laser weapons lags a server?
A map entirely of one texture (depending on the texture) can look pretty sick. I found that out with a snow map I tried to make once :/

As for world weapons...if you're trying to fill a place with a laser and one laser doesn't do it you could use math and set up ricos :/
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

yeah i tried that but dumped the idea, this map is getting dumped it wasent a good idea, it looked good on papper and in BZEdit but in the real game it sucks... im going to think of a dare I say a ""((([[[[ Simpler ]]]])))"" FFA map.

Im a complex person, monney says this map will still be big
BUT I think im just going to do it in BZEdit, screw notepad
~Sk
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion »

For the glass, use my semi-transparent textures. You can still use color, just make sure the alpha stays 1. Some other hosted textures are also transparent. This comes to mind... http://images.bzflag.org/yallaire/one/evil1_grates/

I've never known anyone who hasn't been able to figure out spawnzones without a bit of work.

BZEdit can only take you so far. It's good for overall layout, but there's no way to do some advanced concepts without good old text-editors. I do everything in text.
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
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

What troubles are you having with your spawn zones? Maybe we could help...
User avatar
smartkid
Private First Class
Private First Class
Posts: 153
Joined: Sun Mar 19, 2006 9:24 pm

Post by smartkid »

ducatiwannabe wrote:What troubles are you having with your spawn zones? Maybe we could help...
the zones arn't hard, but the level is completely water logged at the botom so I want someone when killed to spawn back on there base at 10 height

So i made 4 zones the exact demintions of the bases and put them in the map and they partly worked. When you spawn you are in the right area but your at 0 height so you sstill die becuse of water

heres one of the spawn and base code:

Code: Select all

base
name Base
	position 377 0 10
	rotation 0
	size 21 20 1
	color 1
end

zone 
  name spawn1
  position 377 0 10
  size 21.0 20.0 1.0
  rotation 0.0
  team 1
end 
as for the glass ill try out the textures and see what happens
~Sk
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

-sb

Post by optic delusion »

Are you sure your allowing tanks to spawn on buildings in your conf? -sb
If not that try making the zone 1 unit square. Looks like it should work to me.
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
sid6.7
Private First Class
Private First Class
Posts: 614
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

Post by sid6.7 »

i'm not sure what you guys are talking about with glass
but i made a map called glass menagerie and i used
color with a texture & it worked perfect....like this:

material
name alpha_glass
texture CLOUDS
notexalpha
color 1 1 1 .001
end

try it or get my map on my site
and look at it...

100% seethru...
Post Reply