View Full Version : "noshader" texture in Q3
02-23-2003, 10:54 AM
I'm currently toying around with making a Quake3 BSP loader. I was wondering if somebody knew what the "noshader" texture means? There is no texture image in the pak file with that name. So what is it used for? Is it just used to indicate, the surfaces with this "texture" ID have no texture? What kind of surfaces would that be then? I know that there are a LOT of people who have written BSP loaders, so I hope someone knows http://www.opengl.org/discussion_boards/ubb/smile.gif
02-23-2003, 12:11 PM
I've never personally messed with bsps but there is some info on loading them on www.gametutorials.com (http://www.gametutorials.com) in the opengl tuts section
02-24-2003, 02:49 AM
If you want believe me dude but there is nothing like textures in the texture lump of the BSP files.This are just shader names for shader scripts.If you want you can open the files with extension .SHADER and see for what i'm talking about.If you want to learn more about shaders,download Q3 SHADER MANUAL.Just search for Quake3 Shader Manual at gogle.The manual is written from the ID software team and it's very easy to understand.But the scripts aren't!!!
02-24-2003, 05:53 AM
I do know that the textures are not packed inside the bsp file itself. I just thought that the texture names in the BSP file referenced the textures directly. Nevertheless what you say seems to make sense.
So if I have understood this correctly, then the texture names in the texture lump are in fact shader names. You then have to find the correct shader inside one of the shader files in the scripts folder. In this shader the texture will then be listed along with any it's extension name, blending, deformations effects etc. Is that correct?
There does seem to be some smaller inconsistencies however. In the shader files textures are often referenced to lie in a folder named "base". No folder with such a name seems to exist within the texture folder, only "base_floor" and such. Do I need to look somewhere else for it, or am I missing some point here?
02-24-2003, 07:33 AM
My best bet is that "base" means something like base-directory. That again was already used in quake1 source as the path quake data... like d:\games\quake or /home/games/quake or something.
02-24-2003, 09:29 AM
download Titan, google should find it.
02-24-2003, 12:28 PM
Quake3 treats everything as shaders, even textures that have no shader. When no explicit shader can be found, it automatically makes an implicit shader with the same name as the texture.
02-24-2003, 01:00 PM
Thanks for your answers. Two questions though: First, what is "Titan"? Second, what texture should be assigned to a surface that simply has "noshader" as its shader name? Where can you get the texture name from if not from the shader files?
02-24-2003, 01:39 PM
Look through the contents of your shader files until you find the one named noshader. That shader will say what texture to use. And if that shader does not list one or more textures, then you simply draw some default texture, unless the shader explicity says it shouldn't be drawn.
02-25-2003, 09:32 AM
"noshader" is a special thing q3map does whenever it emits a surface that doesn't have a shader. You probably shouldn't draw those surfaces.
02-25-2003, 09:58 AM
Titan is a (GPL'd?) Quake3 renderer, which has most of the file system, BSP, and shader support. There are loads of Q3 renderer clones, but this was one of the first and is easy to learn from.
I'm not certain on this, but:
'noshader' is built into the engine, and when you encounter a surface using it, flag to ensure that surface never gets drawn. Besides, the maps will never cause your your BSP code to pass a noshader surface to the renderer. So they never get drawn anyway.
02-25-2003, 11:32 AM
I think the noshader is also referred to as the 'default' shader. This is assigned when a texture is missing for example. Its a texture that is generated in engine and is easily recognizeable(black tiles with a white border). Though I could be wrong and its just a flag to not draw a surface like what was mentioned earlier.
02-25-2003, 06:04 PM
Yes, you are wrong AMahajan http://www.opengl.org/discussion_boards/ubb/wink.gif. The reason is a bit subtle, though.
Any shader that could not be loaded properly gets converted into *A* default shader (not *THE* default shader). There is actually one default shader for every shader that loads improperly; they all look the same, so the naked eye cannot tell them apart, but they are different to the code.
Anyway, the set of all improperly loaded shaders includes all shaders with missing textures. If a shader is not explicitly defined, it is treated as a standard shader that uses an image of the same name as the shader. This all means that if you have a shader that is not explicitly defined and has no corresponding image on disk, it will end up being displayed as the default shader, so if you erroneously drew a "noshader" surface, it would end up looking like the default shader. This is quite distinct from actually being THE default shader, however. http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.