PalnGipanji Posted September 29, 2002 Share Posted September 29, 2002 Hi everyone... I'm wanting to add small specular highlights to my saber model using shaders, but I haven't really found any help on this so far. I tried looking at the cheshire_vader shaders to see if I could figure it out from the helmet speculars, but it seemed as if it was based on a specular map. Would the map rotate to find the light? I guess I'm not exactly sure how using a texture would work as a specular map, except to only make the object shiny in specific places. So I guess my question is, how would I go about adding a small specular glint to my saber hilt using shaders? Is it possible to control the size of the highlight? Also, I am having a shading problem with a player skin as well. What I am trying to do is use the original model skins to create differing levels of model transparency without having duplicate copies of the existing textures with appropriately-shaded alpha channels. I don't see any reason why this shouldn't be possible, but it's not working for me so far, and I'm not really sure how to specify in the skin file that I want the texture to be the shaded version and not the original. Here's an example of that problem: I want the model to be at 40% visibility, so here is the shader code I wrote to handle that: models/players/paln_gipanji/torso_40vis { { map models/players/paln_gipanji/torso.tga blendFunc .4 .6 } } I tried changing the blendFunc line from blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA to blendFunc .4 .6, just to see if it would work. I realize though that I need to specify that in the alpha channel, but I'm not exactly sure how to make explicit blends. If anyone knows how to do this, please let me know! Link to comment Share on other sites More sharing options...
Emon Posted September 30, 2002 Share Posted September 30, 2002 1. I believe the "specular shading" on the Vader helmet is just a texture like you said, it's an "environment" map, usually used for cheap, fast reflections (2D, rendered very fast), and can also be used for a metallic sheen as seen in the Kejim levels (the floor). I think that's about the most the engine can do for specular shading. All you want is a shader with *I think* the tcGen thingy on it and use an environment map of a metallic sheen texture. 2. Don't really know about the second one. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.