Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Shiny Surfaces

Page: 1 of 1
 Merovingian
12-05-2003, 6:36 PM
#1
How can I make shiny or reflective surfaces?
 WadeV1589
12-05-2003, 7:03 PM
#2
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
 Merovingian
12-05-2003, 8:06 PM
#3
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?
 WadeV1589
12-05-2003, 10:28 PM
#4
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.
 Merovingian
12-06-2003, 2:27 AM
#5
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
 Lil Killa
12-06-2003, 5:22 AM
#6
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.
 WadeV1589
12-06-2003, 11:21 AM
#7
You can do water as well...in fact that's not a bad idea really is it, so obvious too!
 Merovingian
12-06-2003, 5:10 PM
#8
Ok cool but will this make the texture reflective?like if you look at it see other parts of the level?
 Lil Killa
12-06-2003, 10:21 PM
#9
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.
 Merovingian
12-06-2003, 10:56 PM
#10
Ah that sucks is there no way to give a mirror a texture?
 WadeV1589
12-06-2003, 11:15 PM
#11
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.
 razorace
12-07-2003, 12:09 PM
#12
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?
 Emon
12-07-2003, 4:00 PM
#13
That's what I want to know.
 Merovingian
12-07-2003, 4:39 PM
#14
Ok then if I can make a mirrored surface how would I go about doing this?
 WadeV1589
12-07-2003, 5:47 PM
#15
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?
 Emon
12-07-2003, 6:16 PM
#16
I'm a little skeptical is all.
 WadeV1589
12-07-2003, 6:19 PM
#17
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"
 Emon
12-07-2003, 6:58 PM
#18
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.
 razorace
12-07-2003, 7:10 PM
#19
Weird. I can't really imagine Raven just removing functionality without adding/modifying it in some way.
 WadeV1589
12-07-2003, 8:36 PM
#20
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!
 Merovingian
12-07-2003, 11:38 PM
#21
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?
 Lil Killa
12-08-2003, 1:48 AM
#22
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....
 Merovingian
12-08-2003, 3:47 AM
#23
Ok cool so what lines do I put in /mymap/mytexture?
 Lil Killa
12-08-2003, 3:58 AM
#24
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...
 Druid Bremen
12-09-2003, 9:15 AM
#25
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]
 GothiX
12-09-2003, 9:41 AM
#26
True reflections in water seem to be impossible. I spent the last 4 days trying, for a school project.
Page: 1 of 1