Can't understand RGBA coloring.

Questions and answers about the how and why of making maps.
Post Reply
Yrogirg
Private First Class
Private First Class
Posts: 154
Joined: Sat Oct 27, 2007 7:24 pm

Can't understand RGBA coloring.

Post by Yrogirg »

The numeric values for color can range from 0 to 1 and represent the fraction of 100% for each color channel.
So why

Code: Select all

  diffuse 1 0.8 0.5 1
  texture pyrwall.png
works, but

Code: Select all

  diffuse  0.3 1 1 1
  texture pyrwall.png
doesn't, leaving default pyrwall color?
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Can't understand RGBA coloring.

Post by blast »

Maybe the extra space after 'diffuse'?
"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
Yrogirg
Private First Class
Private First Class
Posts: 154
Joined: Sat Oct 27, 2007 7:24 pm

Re: Can't understand RGBA coloring.

Post by Yrogirg »

no, number of spaces doesn't matter, I've checked.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Re: Can't understand RGBA coloring.

Post by trepan »

try using mesh.png instead of pyrwall.png, maybe that will shed some light on your problem.
User avatar
Cobra_Fast
Dev Monkey
Dev Monkey
Posts: 322
Joined: Sat Oct 07, 2006 11:51 am
Location: Germany
Contact:

Re: Can't understand RGBA coloring.

Post by Cobra_Fast »

I thought yo've got to leave away the .png if youre using textures from the BZFlag installtion directory...
so it would be

Code: Select all

texture pyrwall
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Re: Can't understand RGBA coloring.

Post by trepan »

"pyrwall.png" works just fine, that's not the real issue.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Can't understand RGBA coloring.

Post by optic delusion »

Do you know that rgba is not the only way to achieve colors? You can also use the name of the colors.
Try "color blue"
here's the list http://my.bzflag.org/w/Color%28BZW%29
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
Runic
Private First Class
Private First Class
Posts: 23
Joined: Fri Jul 02, 2004 8:51 pm

Re: Can't understand RGBA coloring.

Post by Runic »

diffuse 1 1 1 1 is solid white, combined with a texture, the texture would look normal

diffuse 0.3 1 1 1 is solid light blue, combined with a texture, the texture should look tinted light blue

#4dFFFF

use stronger colors further from white to get more of a difference
BZFlag ROCKS!!!
Post Reply