How can I make shiny or reflective surfaces?
textures/mymap/mytexture
{
{
map $lightmap
}
{
map textures/mymap/mytexture
blendFunc GL_DST_COLOR GL_ZERO
}
{
map textures/common/glass2
blendFunc GL_DST_COLOR GL_ONE
tcMod scale 1.5 1.5
tcGen environment
}
}
You replace textures/common/glass2 with the greyscale texture you want to make it appear highlighted like metal. The reason I chose common/glass2 is because it is a very weak effect, there are much stronger textures out there to use.
A reflective surface uses a mirror and reduces FPS, this will just make the surface appear shiny
Thanks for the reply but I have no idea how to do that could you please show me excalty how to do and and all of the textures that can be used?
Make a text file called yourmap.shader in base\shaders.
Add the name of that file into shaderlist.txt (minus the .shader end)
Apply the texture as usual...you can even do this after applying the texture.
BTW Those two lines that are textures/mymap/mytexture need to match the path to your texture.
Yep im a retard I still dont get it what do I do with my texture file?and can any texture become shiny?thanks again for the help
make a folder in your textures folder (usualy named after your map or something) then place your texture (
http://www.lkmapping.ravencommunity.net/ctex.php) in the folder you just created. Then do as Wade said for the file names in the .shader file you are creating.
To answer your other question.. Yes any surface except for maybe water (not sure) can be made to have a shine to it but you need a shader to acomplish it.
You can do water as well...in fact that's not a bad idea really is it, so obvious too!
Ok cool but will this make the texture reflective?like if you look at it see other parts of the level?
Originally posted by Merovingian
Ok cool but will this make the texture reflective?like if you look at it see other parts of the level?
not it will only give it a "shiny" look.
Ah that sucks is there no way to give a mirror a texture?
You can make mirrors of most surfaces...but I think JA's borked mirror code would prevent it. For some reason Raven thought just because they didn't use mirrors and portals, we wouldn't...so they removed the best bits of the code.
Originally posted by WadeV1589
Add the name of that file into shaderlist.txt (minus the .shader end)
Actually, as far as I've seen, you don't have to do that anymore. The game seems to autodetect new shader files.
And what did Raven do to the mirror code?
That's what I want to know.
Ok then if I can make a mirrored surface how would I go about doing this?
The games always have detected new shader files, always, otherwise we'd have problems creating new PK3's...Q3Map2 (the compiler) however only loads shader files that are in shaderlist.txt . So when you're mapping you still need to add shaders to that.
The mirror code originally could be applied to any surface anywhere and it would work, portals too. Now they are affected by vis, try making a brush in front of you and texture one side of it with the mirror texture....load the map. You'll not see it but your FPS will be affected by it. Now move that brush to the wall and be sure it's structural. Compile again and now it will work fine. It's gone from easy and anywhere to hard and only in some places.
Emon said that like it hasn't changed...or did I just misunderstand your one sentence, hard to work out, reply?
I'm a little skeptical is all.
How about if I told you I know this because of a reply from Raven about it? Information from the horses mouth tends to remove skepticism. It was because "we didn't need anything like that anymore"
Then I'd say that's a really poor development choice.
Sorry if I sounded like I was insulting your intelligence, but I don't know you well, and a lot of times people say, "they took that out because they don't need it anymore!!" when infact they just did something wrong.
Weird. I can't really imagine Raven just removing functionality without adding/modifying it in some way.
Yes I asked why remove something when you know the modding community will need it...that one got no reply - that in itself is odd.
But that's what happened, they had no need for the traditional functionality of portals/mirrors so they removed a fair chunk of code relating to them and modified what was left to suite their needs...for example a reflective floor is still possible as you've no doubt seen. A mirror or portal in the middle of a room though isn't as easy to do....no more placing a single brush and a single entity!
Ok your confusing me now a simple yes or no would be fine is it possible to take a texture i have made and turn it into a mirror so it reflects stuff but you can also see the texture?
textures/tests/mirror_floor2
{
qer_editorimage textures/tests/qer_mirror.tga
surfaceparm forcefield
portal
q3map_nolightmap
{
map textures/tests/qer_mirror2b
blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
{
map textures/tests/floor02_alphab
blendFunc GL_DST_COLOR GL_SRC_COLOR
}
{
map textures/kejim/env_newfloor_kej
blendFunc GL_ONE GL_ONE
rgbGen const ( 0.200000 0.200000 0.200000 )
tcGen environment
}
}
that is the shader file for a mirror floor texture from JK2 called mirror_floor2. you could see the original floor texture while it reflected what you saw that was reflected. I don't know what everything else is/does though....
Ok cool so what lines do I put in /mymap/mytexture?
your going to be putting the whole thing in there but your or someone else is going to have to find out what each picture does as I don't know that vital peice of info. I am just able to provide you with the actual shader script used for the reflective floor texture from JK2. Wade or someone else should be able to explain what eac part of the shader does. I on the other hand am a bit of a "noob" when it comes to shaders...
Water-reflection worked in JK2, but now... Either I'm doing it wrongly, my machine's allergic to Radiant, or Raven's forgotten to add something called mirrors into JA. [Note the sarcasm]
True reflections in water seem to be impossible. I spent the last 4 days trying, for a school project.