Quake3World.com Forums
     Level Editing & Modeling
        Properly setting up shader paths and names?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Properly setting up shader paths and names?

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 02-13-2015 08:47 AM           Profile Send private message  E-mail  Edit post Reply with quote


Presently creating the shaders for the pk02 texture set by philipk, noticed a large amount of junk in the texture window of GTKradiant though making me wonder about a few things.

All the textures are in the baseq3\textures\aemod\ folder, and a scripts\aemod.shader exists and is mentioned in the shaderlist.txt.

1. Compile Only Shaders

Using this shader to add the step sounds to the texture named textures/aemod/pk02_floor_cyl01.tga:

Code:
textures/aemod/pk02_floor_cyl01:q3map
{
   surfaceparm metalsteps
}

But in GTKradiant 1.6.4 I am seeing the texture and the shader, the shader has no proper image ("Shader Image Missing")... this makes things confusion and adds visual spam.

Question is... would selecting textures/aemod/pk02_floor_cyl01.tga actually add the metal step sound, even though I did not select the shader? IMO, pk02_floor_cyl01:q3map needs selecting, but then I have no proper editor image for it? Anyone had experience with this?

As a hard-fix I could create a proper default lightmapped shader, as the shader manual mentions, but that would be kinda redundant.


2. Lights and Shaders

Creating a light shader is pretty much documented, and I have been using them for a long time. You usually have the light texture image (the light fitting) and the "blend" texture that defines e.g. the areas that are supposed to glow, e.g.

Code:
textures/aemod/pk02_ceiling02
{
   qer_editorimage textures/aemod/pk02_ceiling02_C.tga
   surfaceparm nodlight
   surfaceparm nomarks
   q3map_lightimage textures/aemod/pk02_ceiling02_I.tga
   q3map_backsplash 1 23
   q3map_lightsubdivide 64
   q3map_surfacelight 300
   {
      map textures/aemod/pk02_ceiling02_C.tga
      rgbGen identity
   }
   {
      map $lightmap
      blendfunc filter
      tcGen lightmap
   }
   {
      map textures/aemod/pk02_ceiling02_I.tga
      blendfunc add
      rgbGen wave sin 0.93 0.04 0 5
   }
}

Now in GTKradiant's texture window I am seeing not only the shader that is fine, but also the "junk" images of both textures used by the shader. How does one not show those? For AEblocks I added a sub-folder named "lights", i.e. textures\aeblocks\lights\, placed all light textures into that folder and thus would only see the light shaders in the main aeblocks texture folder in Radiant's texture window.

Is that the only way to clean up "redundant images" in Radiant's the texture window?

(I assumed that when a shader has the same name as the texture is uses that the shader will supersede the textures, and indeed that is the case, but with the above naming if at all, only the "_C.tga" (colour) could be superseded, the "_I.tga" (blend) texture would still be shown in the texture window).

All this I seem to have overlooked most of the time, because I don't use shaders that much, or shaders usually have the same name as the texture. Trying to debug my shaders presently made me notice all this though.

Any methodical tips to fix such things appreciated.

Update: solution for 2.... removed the "_C" from all texture names, so that the main texture (colour) matches the shader name. All the blend textures moved into an textures\aemod\blend\ folder. Updated pathing in shader. So now anything that used blend textures no longer shows "junk" textures in Radiant's main window, only valid textures or shaders.




Top
                 

surfaceparm nomarks
surfaceparm nomarks
Joined: 10 Aug 2009
Posts: 1018
PostPosted: 02-13-2015 09:53 AM           Profile Send private message  E-mail  Edit post Reply with quote


AEon wrote:
Presently creating the shaders for the pk02 texture set by philipk, noticed a large amount of junk in the texture window of GTKradiant though making me wonder about a few things.

All the textures are in the baseq3\textures\aemod\ folder, and a scripts\aemod.shader exists and is mentioned in the shaderlist.txt.

1. Compile Only Shaders

Using this shader to add the step sounds to the texture named textures/aemod/pk02_floor_cyl01.tga:

Code:
textures/aemod/pk02_floor_cyl01:q3map
{
   surfaceparm metalsteps
}

But in GTKradiant 1.6.4 I am seeing the texture and the shader, the shader has no proper image ("Shader Image Missing")... this makes things confusion and adds visual spam.

Question is... would selecting textures/aemod/pk02_floor_cyl01.tga actually add the metal step sound, even though I did not select the shader? IMO, pk02_floor_cyl01:q3map needs selecting, but then I have no proper editor image for it? Anyone had experience with this?

As a hard-fix I could create a proper default lightmapped shader, as the shader manual mentions, but that would be kinda redundant.


Why not use qer_editorimage in the main shader stage? The automation will only work if your shader name is the exact same as your texture name (without extension).



_________________
Portfolio
Twitter


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 02-13-2015 02:59 PM           Profile Send private message  E-mail  Edit post Reply with quote


I was thinking of doing that, but was wondering why that did not come up in the Shader Manual.

I have the shaders all set up now... they compile and seem to work. Though the metal steps sound code will need fixing.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.