Jump to content

Reflective Shaders


Recommended Posts

Posted

I want to make a reflective glass shader, that has no transparency whatsoever, but not quite like a mirror.  Like this...

 

 

 

Pro_Tint_One_Way_Mirror_Film_2.jpg

 

 

 

If anyone knows how to do this, let me know.

Posted

I remember trying something like this back when I was into mapping and shaders. I'd been using Szico VII's reflective shader, the same one from the bathrooms from BlueIce Twilight (note: you can find it in the source files and fool around with it for educational purposes, but if you want to use the shaders for a release you'll need to ask permission from Szico & include a credit for his work) and you'll find it can work more or less with any flat texture you give it. In glass/transparency shaders, most of the glass shaders in the game use grayscale .jpgs or transparent .pngs. I don't recall attempting to use a transparent .png or .tga for a reflective shader, but because of how GTK Radiant renders the shader and the misc_portal entities (is that the right one? it's been a while...) together. On this note, if you haven't already made a general reflective shader (mirror) on your own, I'd suggest doing that first - again, the source files for BlueIce Twilight are an invaluable learning source, open up the .map file in radiant and have a look to see how Szico VII set up his mirrors as I probably did mine the same way.

 

As for merging the effects of a transparent (glass) shader and a reflective (mirror) shader into one, I'm going to go out on a limb here and say it probably isn't going to work out, and probably because each is a different shader type and Raidant is probably only going to render the texture as flat, transparent, or reflective. As far as I have gotten is to add parameters to the reflective shader so that it wobbled like water shaders do - so if you were thinking about reflective and transparent water, probably not going to work out either lol.

 

On the note of the water however, have you seen Darth Norman's tutorial for the water shader he used in his map Arevass? Norman took a segment of the skybox he'd created for the map, bent it around a bit, and applied it as an envmap to the water shader so that as the water wobbled it'd have the appearance of reflecting the skybox when in reality all it was doing was flipping through the bent segment of the skybox he'd attached to it. As several of the glass shaders in JO/JA already have envmap sections, that part of the shader is already done for you - you just need to take a screenshot of the stuff opposite the glass, create a shader for the glass that includes that screenshot (albeit edited, if you like) as an envmap, and then fit the glass texture to the face of the brush you want. It'll require some fiddling no doubt, but in my opinion it is probably the only way that you're going to have a shader appear to be transparent and reflective at the same time because literally adding the transparency+reflective functions into a single shader is probably not going to render in Q3 / GTK Radiant.

Posted

A while back I tried to make a picture reflect the room. But it never worked out quite how I wanted it using this method, and I really never got back to it. You said "no transparency", but did you mean transparent and reflective, or just reflective?

 

Here's a screenshot I found: picturereflection.jpg?w=AAAxAtpnjF8AEFqW

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...