Quake3World.com Forums
     Level Editing & Modeling
        New with shaders..need help


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




Print view Previous topic | Next topic 
Topic Starter Topic: New with shaders..need help

Gibblet
Gibblet
Joined: 23 Feb 2005
Posts: 19
PostPosted: 03-12-2005 04:41 PM           Profile Send private message  E-mail  Edit post Reply with quote


So I've finally decided to do my own custom textures/shaders. I've got most of the textures done, and I need to do some really basic shader stuff..ie. lights.

I basically just copied one of the id shaders and replaced the texture names with mine, and it's simply not working. The texture shows up in-game, but it doesn't act like a light should (emitting light, no bullet marks ect..)

Here's what the shader looks like:

Code:
textures/hippy/blue4stripes_1000
{
   qer_editorimage textures/hippy/blue4stripes.jpg
   surfaceparm nomarks
   q3map_surfacelight 1000
   {
      map $lightmap
      rgbGen identity
   }
   {
      map textures/hippy/blue4stripes.jpg
      blendFunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
   {
      map textures/hippy/blue4stripes.blend.jpg
      rgbGen wave sin 0.6 0.1 .1 .1
      blendFunc GL_ONE GL_ONE
   }
}


The texture is blue4stripes.jpg which is in baseq3/textures/hippy

(Sidenote: I have no idea what most of that stuff means..though I'm trying to leran.)

Thanks for any help



_________________
"Just because you're paranoid doesn't mean they're not after you..."


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 03-12-2005 05:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


Make sure you add your shader file name to the shaderlist.txt

For the texture stage (2nd stage in your shader), all textures should be listed as TGA, not JPG, regardless of whether or not the actual image file is a TGA or JPG.
Change: map textures/hippy/blue4stripes.jpg
To: map textures/hippy/blue4stripes.tga

Check out the Q3Map2 Shader Manual (see my signature). You can use it to figure out what each of those directives that you used in your shader actually does. If anything in the manual is unclear, let me know... feedback is always welcomed.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 23 Feb 2005
Posts: 19
PostPosted: 03-12-2005 06:31 PM           Profile Send private message  E-mail  Edit post Reply with quote


ah, ok I'll try that out. Thanks.

edit: Ok, well now the texture doesn't show up in-game but it emits light :confused:

When you say to add my shader file name to the shaderlist.txt ...do you mean for every single texture I have to add it in there? Because when I look at other peoples custom shaders they don't do that (or maybe it just doesn't show up in my list?)



_________________
"Just because you're paranoid doesn't mean they're not after you..."


Top
                 

Swift and Deadly
Swift and Deadly
Joined: 21 Jul 2002
Posts: 1679
PostPosted: 03-21-2005 04:03 PM           Profile Send private message  E-mail  Edit post Reply with quote


No, obsidian is talking about just putting the shader file name you created in the shaderlist.
For example, the shader file you just created was called hippy.shader, you just add hippy in the shaderlist.txt file. When adding to the shaderlist.txt file, you only need to put the name "hippy" and don't need the extension ".shader".

Also, the naming convention you have could be giving you problems.
Quote:
{
map textures/hippy/blue4stripes.blend.jpg
rgbGen wave sin 0.6 0.1 .1 .1
blendFunc GL_ONE GL_ONE
}
}

The extra "." you have in there could be part of your problem. Rename the above to blue4stripes_blend.tga, see if that helps.




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.