This post has been edited by rentreg: 07 February 2010 - 11:20 AM
Page 1 of 1
shader submaps
#2
Posted 07 February 2010 - 07:17 PM
Well you can first start by reading the manual.
http://www.robotrene.../shader_manual/
Second a great place to ask questions would be www.polycount.com
Last pick up Q3A Shader Editor.
http://bpeers.com/so...3ase/index.html
In a nutshell the shader scripts all get load in and the engine looks for a call to either an object or a texture name.
Once the object or texture is targeted the script then looks first to the general keywords, that usually sets up what the base material is going to be like glass, and then proceeds through the different stages to apply the necessary elements.
A good way to think of it all is like your working in Photoshop and the general keywords is the base layer and each stage you add is just another layer.
So for example Laura’s glasses, that I’m using for testing, has the following texture shader applied.
textures/glass/LCglass
{
qer_trans .5
surfaceparm trans
surfaceparm nonsolid
surfaceparm glass
cull disable
{
map textures/effects/tinfx.tga
tcgen environment
blendfunc gl_one gl_one
rgbGen identity
}
{
map $lightmap
blendFunc gl_dst_color gl_zero
rgbgen identity
}
}
As you can see textures/glass/LCglass is the target texture name that triggers the shader. The first layer processed is the general keywords that defines the material as glass, the next stage or layer that is processed is the reflection material, followed by how the material is lighted.
So to do something like a reflection of a player in a material, like rain soaked pavement for example, you would set up a material much like a mirror and modify the keywords and stages so that the base texture is more of a solid of a ground material rather than one of glass and you set the level of the effect of the reflection.
Hope that’s enough to get you started and the key to it all really is to actually get the shader to apply. Q3A will work nicely to work out the effect you are looking for but one warning.
Shaders comes with a cost so if you do an entire area as a reflective material type the frame rate hit could land up being to high making the map more or less useless as a playable environment.
http://www.robotrene.../shader_manual/
Second a great place to ask questions would be www.polycount.com
Last pick up Q3A Shader Editor.
http://bpeers.com/so...3ase/index.html
In a nutshell the shader scripts all get load in and the engine looks for a call to either an object or a texture name.
Once the object or texture is targeted the script then looks first to the general keywords, that usually sets up what the base material is going to be like glass, and then proceeds through the different stages to apply the necessary elements.
A good way to think of it all is like your working in Photoshop and the general keywords is the base layer and each stage you add is just another layer.
So for example Laura’s glasses, that I’m using for testing, has the following texture shader applied.
textures/glass/LCglass
{
qer_trans .5
surfaceparm trans
surfaceparm nonsolid
surfaceparm glass
cull disable
{
map textures/effects/tinfx.tga
tcgen environment
blendfunc gl_one gl_one
rgbGen identity
}
{
map $lightmap
blendFunc gl_dst_color gl_zero
rgbgen identity
}
}
As you can see textures/glass/LCglass is the target texture name that triggers the shader. The first layer processed is the general keywords that defines the material as glass, the next stage or layer that is processed is the reflection material, followed by how the material is lighted.
So to do something like a reflection of a player in a material, like rain soaked pavement for example, you would set up a material much like a mirror and modify the keywords and stages so that the base texture is more of a solid of a ground material rather than one of glass and you set the level of the effect of the reflection.
Hope that’s enough to get you started and the key to it all really is to actually get the shader to apply. Q3A will work nicely to work out the effect you are looking for but one warning.
Shaders comes with a cost so if you do an entire area as a reflective material type the frame rate hit could land up being to high making the map more or less useless as a playable environment.
Page 1 of 1


















MultiQuote