Material not loading

Questions and answers about the how and why of making maps.
Post Reply
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Material not loading

Post by Mark_IV »

I recently added some textures to my map, and they won't load. I used the exact URL it gave me, and the same format I used for my already existing/working textures

Code: Select all

material
  name [name]
  texture [URL]
end
Yet, the new textures won't load. I cleared the download cache (Can't wait to join mofo again) and updated downloads, but only the pre-existing textures loaded. Why aren't the new textures loading?
User avatar
Bambino
Private First Class
Private First Class
Posts: 1210
Joined: Mon Apr 21, 2008 10:27 pm
Location: Alberta, Canada

Re: Material not loading

Post by Bambino »

I dunno. Show us exactly what your code looks like so we can help you. What is the URL?
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
GU League | Ducati League | OpenLeague
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

Bambino wrote:I dunno. Show us exactly what your code looks like so we can help you. What is the URL?
Code is

Code: Select all

material
 name Eyes
 texture http://images.bzflag.org/mjurras/GREY.png
end


material
 name Carrot
 texture http://images.bzflag.org/mjurras/ORANGE.png
end
The URL's are http://images.bzflag.org/mjurras/ORANGE.png
and http://images.bzflag.org/mjurras/GREY.png
User avatar
mrapple
Sergeant Major
Sergeant Major
Posts: 460
Joined: Wed May 27, 2009 11:59 am
Location: Unknown
Contact:

Re: Material not loading

Post by mrapple »

Make sure you are doing "matref Eyes" and not "matref eyes". Capitalization matters.

Also, those look like solid colors. Why not just use the diffuse property?
Image
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

I don't know diffuse and those other color things. I guess I could learn, but I just wanted to get the textures.

All the capitalization is right. My problem isn't the textures wont go on my object, it is they just won't load.



EDIT: I went on my map today, when I loaded it, it loaded all of my textures, but they didn't appear on my object. I did update download, and only the original textures got re-downloaded. At the beginning it says it downloads, but they don't really download.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

colors

Post by optic delusion »

In the material, use the name of the color you want from this 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
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

Thanks Optic
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

How exactly do i do this? Instead of

Code: Select all

material
 name
would I do

Code: Select all

material
 ColorName
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Material not loading

Post by blast »

Use the color name with 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
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: Material not loading

Post by joevano »

Really... the wiki has the answers. It is there to be used... http://my.bzflag.org/w/Material has it all. You may also use 'color' instead of 'diffuse'.
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
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

joevano, thanks, never really knew about diffuse and that, so I never used it.

But back to my original question, why won't the textures load? When I first start the server, it says they load, but they don't appear anywhere. When I do Options-->Cache Settings-->Update Downloads It only downloads the first two, which work and have worked for a long time. The new textures I tried to put in don't load or work.


EDIT:
Worked out several kinks, and got the textures loaded. Thank everyone!
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Material not loading

Post by blast »

Those images are way larger than they need to be. You could have easily made them 64x64 instead of 2002x1047. Also, they are pointless since you should just be using 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
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

blast wrote:Those images are way larger than they need to be. You could have easily made them 64x64 instead of 2002x1047. Also, they are pointless since you should just be using diffuse.
We already went over diffuse Blast..... and I am kinds new to textures, I don't know what size they need to be.
User avatar
Bambino
Private First Class
Private First Class
Posts: 1210
Joined: Mon Apr 21, 2008 10:27 pm
Location: Alberta, Canada

Re: Material not loading

Post by Bambino »

Try resizing them to 64x64 as it may be difficult for your client to load such a large image.
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
GU League | Ducati League | OpenLeague
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

My client loads 'em fine. The map I'm working on building, it wont be the textures that prevent a slow client from loading it.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: Material not loading

Post by joevano »

Mark_IV wrote:My client loads 'em fine. The map I'm working on building, it wont be the textures that prevent a slow client from loading it.
Only a fool doesn't listen to those who have done it before (especially when he was the one who started the conversation)!
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
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

joevano wrote:
Mark_IV wrote:My client loads 'em fine. The map I'm working on building, it wont be the textures that prevent a slow client from loading it.
Only a fool doesn't listen to those who have done it before (especially when he was the one who started the conversation)!
To make them smaller I'd need to re-upload them, I don't wanna add extra textures.
User avatar
mrapple
Sergeant Major
Sergeant Major
Posts: 460
Joined: Wed May 27, 2009 11:59 am
Location: Unknown
Contact:

Re: Material not loading

Post by mrapple »

One note that might be of use:

Theres a map property (texsize) that isn't documented very well. It basically allows you to scale textures to the sides of an object.

Here is how it's used:

Code: Select all

material
name wall
texture wall
end

box
position 0 0 0
size 10 10 10
matref wall
texsize 1 1
end
texsize scales the texture across each side of the object.

Specify the width and the height of how many times to scale the texture.

The code above will make a box 10x10x10 and on each side will be the full wall texture.

If you had texsize 2 1, each side will have two wall textures from left to right and one from top to bottom.

Sorry this is kind of hard to explain, hope you understand.
Image
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: Material not loading

Post by joevano »

Mark_IV wrote:
joevano wrote:
Mark_IV wrote:My client loads 'em fine. The map I'm working on building, it wont be the textures that prevent a slow client from loading it.
Only a fool doesn't listen to those who have done it before (especially when he was the one who started the conversation)!
To make them smaller I'd need to re-upload them, I don't wanna add extra textures.
You don't NEED the textures... save everyone the time and bandwidth of downloading them and just use diffuse.
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
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Material not loading

Post by blast »

Maybe I'll just DELETE them and save players the trouble of having to download them.
"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
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

Ill use the diffuse thing. I'm sorry I am not that good at textures. It's my second map, still pretty new to it.

Edit: Okay, I used diffuse, and got it to work.Thanks.
User avatar
Agent West
Private First Class
Private First Class
Posts: 318
Joined: Thu Jan 31, 2008 1:32 pm

Re: Material not loading

Post by Agent West »

One more thing: BZFlag blocks most textures (safety thing,i'm guessing). By default you can only use textures off "images.bzflag.org" To use textures from other sources you need to locate "downloadAccess" file (in "My Documents/My BZFlag Files" on Windows), open it with your favorite text editor, and edit it to allow access to all image sourses.

Usually (if this is indeed the case) you will get a warning when trying to open the map to play it.
Rest in peace, AliceD (AKA Happy Alice)! miss ya!
User avatar
Mark_IV
Private First Class
Private First Class
Posts: 157
Joined: Wed Aug 25, 2010 12:24 am
Location: Actually joined 2004 or 2005 as tyjr ;)

Re: Material not loading

Post by Mark_IV »

Yep, already done that. Gets annoying when some textures don't load, so I looked around and found that.
Post Reply