How to make objects translucent?

General talk about the map making process.
Post Reply
User avatar
Mudsquisher
Private First Class
Private First Class
Posts: 48
Joined: Sat Apr 18, 2009 1:36 pm
Location: USA HEH =] GO AMERICANS!

How to make objects translucent?

Post by Mudsquisher »

How do you make a box translucent using bzdit1.6.5? I am aware that i will have to plug in the code on th notepad. I have searched the wiki and it says to do material and i tried that using this:

box
name Box copy 2
position 350 0 0
rotation 0
size 1 25 30
drivethrough
material
name test_material
color 1.0 0.0 0.0 1.0

and a bunch of other versions similar to tha code to see if it works. But when i test it, it becomes black and unable to drivethrough, or it is completely transparent and you can shoot through it. What am i doing wrong, how do i make a box translucent? PLease help
thanks :D
User avatar
Agent West
Private First Class
Private First Class
Posts: 318
Joined: Thu Jan 31, 2008 1:32 pm

Re: How to make objects translucent?

Post by Agent West »

Mud, you need to use "diffuse" function.
basically

material
name clear
diffuse 0 0 0 0
end

box
position 0 0 0
size 10 10 10
matref clear
end


will give you a complitly transparent box. use values betveen 0 and 1 to change the transparency of the object. change all 4 numbers to the same value though.
Rest in peace, AliceD (AKA Happy Alice)! miss ya!
User avatar
blast
General
General
Posts: 4933
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: How to make objects translucent?

Post by blast »

Why do you keep mentioning BZEdit? You can not do this stuff in BZEdit. It just doesn't support it. So it has nothing to do with BZEdit.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
Mudsquisher
Private First Class
Private First Class
Posts: 48
Joined: Sat Apr 18, 2009 1:36 pm
Location: USA HEH =] GO AMERICANS!

Re: How to make objects translucent?

Post by Mudsquisher »

ok so i figured out how to make it transparent but i want it with a box that is supposed to be drivethrough... it wont let u drivethrough it with the material code. is it possible to have it transparent and drivethrough? if so, how?
thanks for the help!
User avatar
Agent West
Private First Class
Private First Class
Posts: 318
Joined: Thu Jan 31, 2008 1:32 pm

Re: How to make objects translucent?

Post by Agent West »

got 2 ways of doing this. first: when your are in bzedit (before all the textures and physics are added), select the "drivethrough" option. add textures later.
OR
open the .bzw file in your favorite text editor, and add "drivethrough" after the "size"
Example

box
position 0 0 0
size 10 10 10
drivethrough
matref clear
end


And like Blast said, bzedit does not support textures (or physics, or meshes, or arcs, or anything "interesting" really) so it will be better if you learn at least the basics of hand coding.
good luck, ask around if you need help :)
Rest in peace, AliceD (AKA Happy Alice)! miss ya!
User avatar
Bambino
Private First Class
Private First Class
Posts: 1210
Joined: Mon Apr 21, 2008 10:27 pm
Location: Alberta, Canada

Re: How to make objects translucent?

Post by Bambino »

Turn 'box' to 'meshbox'
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
GU League | Ducati League | OpenLeague
User avatar
Agent West
Private First Class
Private First Class
Posts: 318
Joined: Thu Jan 31, 2008 1:32 pm

Re: How to make objects translucent?

Post by Agent West »

Bambi, you don't really have to do that. i never do, anyway.
Rest in peace, AliceD (AKA Happy Alice)! miss ya!
User avatar
Mudsquisher
Private First Class
Private First Class
Posts: 48
Joined: Sat Apr 18, 2009 1:36 pm
Location: USA HEH =] GO AMERICANS!

Re: How to make objects translucent?

Post by Mudsquisher »

the meshbox trick worked. so thanks bambino and others for your help! i appreciate it!
User avatar
Bambino
Private First Class
Private First Class
Posts: 1210
Joined: Mon Apr 21, 2008 10:27 pm
Location: Alberta, Canada

Re: How to make objects translucent?

Post by Bambino »

http://my.bzflag.org/bb/viewtopic.php?f=65&t=13707 <== When I changed it to meshbox it fixed it. Thought I would recommend it.
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
GU League | Ducati League | OpenLeague
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Re: How to make objects translucent?

Post by ducatiwannabe »

Yeah, just so you know, whenever I try to work on a map in BZEdit 1.6.5, I get it all ready except for the textures and physics and so on and so forth (basically, 2.x features that can not be opened in BZEdit). IIRC, it will simply remove the coding/ignore it if you try to open it in BZEdit? Or maybe that got fixed, I dunno.

Anywho, so I'll get my boxes and setup and all ready. *Then* I open it up in a text editing program and add my different dealie-dads.

Just a tip. :-/ May or may not work well for ya...
User avatar
blast
General
General
Posts: 4933
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: How to make objects translucent?

Post by blast »

If you put in certain objects (meshbox, define, zone, etc), BZEditW32 will simply fail to open the map at all. Other things I think it strips out.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply