Page 1 of 1

Material not loading

Posted: Thu Nov 25, 2010 2:30 am
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?

Re: Material not loading

Posted: Thu Nov 25, 2010 2:35 am
by Bambino
I dunno. Show us exactly what your code looks like so we can help you. What is the URL?

Re: Material not loading

Posted: Thu Nov 25, 2010 2:38 am
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

Re: Material not loading

Posted: Thu Nov 25, 2010 3:40 am
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?

Re: Material not loading

Posted: Thu Nov 25, 2010 12:35 pm
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.

colors

Posted: Thu Nov 25, 2010 1:53 pm
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

Re: Material not loading

Posted: Thu Nov 25, 2010 2:01 pm
by Mark_IV
Thanks Optic

Re: Material not loading

Posted: Thu Nov 25, 2010 2:06 pm
by Mark_IV
How exactly do i do this? Instead of

Code: Select all

material
 name
would I do

Code: Select all

material
 ColorName

Re: Material not loading

Posted: Thu Nov 25, 2010 3:39 pm
by blast
Use the color name with diffuse.

Re: Material not loading

Posted: Thu Nov 25, 2010 3:47 pm
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'.

Re: Material not loading

Posted: Thu Nov 25, 2010 4:39 pm
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!

Re: Material not loading

Posted: Fri Nov 26, 2010 12:48 am
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.

Re: Material not loading

Posted: Fri Nov 26, 2010 3:20 am
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.

Re: Material not loading

Posted: Fri Nov 26, 2010 8:47 pm
by Bambino
Try resizing them to 64x64 as it may be difficult for your client to load such a large image.

Re: Material not loading

Posted: Fri Nov 26, 2010 8:51 pm
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.

Re: Material not loading

Posted: Fri Nov 26, 2010 10:00 pm
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)!

Re: Material not loading

Posted: Fri Nov 26, 2010 10:04 pm
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.

Re: Material not loading

Posted: Fri Nov 26, 2010 10:10 pm
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.

Re: Material not loading

Posted: Fri Nov 26, 2010 10:43 pm
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.

Re: Material not loading

Posted: Sat Nov 27, 2010 2:07 am
by blast
Maybe I'll just DELETE them and save players the trouble of having to download them.

Re: Material not loading

Posted: Sat Nov 27, 2010 2:39 am
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.

Re: Material not loading

Posted: Wed Dec 08, 2010 3:01 am
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.

Re: Material not loading

Posted: Wed Dec 08, 2010 11:46 am
by Mark_IV
Yep, already done that. Gets annoying when some textures don't load, so I looked around and found that.