Jump to content

Home

Shiny Surfaces


Merovingian

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

make a folder in your textures folder (usualy named after your map or something) then place your texture 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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...