AngelModder Posted January 31, 2015 Share Posted January 31, 2015 OK, this may sound like a dumb question and honestly I am sure it's an over sight or any over thought process on my end. As I was working on Titanic's grand staircase I started fooling around with the idea of a specular map (not an env) for the brush work. I knew we are capable of having it on players so my original shader was a break down of the one we use for our toons, it worked to the point the game accepted it and it didn't break the game. However it came out over masking everything with the specular map I had created rather then applying it as some sort of blend.Phase to I attempted using a cube map (similiar to what we use on realistic water) I normally use this method for window reflections etc which for that it usually works great. However theirs no real way to control the opacity yet again, the rgbGen const line only controls the color of which the layer blends at, so everything just looked like one giant mirror.What I am going for is a player relitive reflection of the surrounding area. And enviromental map stretches across the entire surface and is more of a overall shine rather then a type of reflection or lighting glare. So while an Env map is good to use WITH what I am looking for, it's not the shader I need. Just being clear on that.I know this is possible however I just can't remember how we use to do it. Darth G showed me at one point, the major difference is that the reflection stays generally in one spot and only alters slightly based on player perspective. I used it on my very early attempts of Titanic and sadly lost it (along with the old old map) on a crashed computer.I've also tried the masking shader you see in vjun, perhaps I am not understanding how to control it's opacity (if you can), but it also was a fail. I know I'm stepping around the solution and I just can't put my finger on it. Any help would be most appreciated!~AngelModder Link to comment
Lazarus Posted January 31, 2015 Share Posted January 31, 2015 Opacity is controllable, however, its not done as you think it did. textures/imperial/caution2 { q3map_material SolidMetal { map $lightmap } { map textures/imperial/caution2 blendFunc GL_DST_COLOR GL_ZERO } { map textures/common/env_chrome blendFunc GL_SRC_ALPHA GL_ONE detail alphaGen const 0.1 tcGen environment } } This is one of the imperial textures I redid for my map with an environment map on it with alpha channel. With the AlphaGen Const you can set the ammount of opacity you want. What tutorial you used? There is a tutorial in the tutorial section about applying specular maps. I think you can give also an alpha channel to a spec map and do it the way I described up here. Your player reflection is done by the so called camera trick. Indeed, G showed us that in one of his ballroom testing maps, i remember. Its bassically you apply place a misc_portal_surface about 8 units before your wall you want to act as a reflectant, than apply a shader to that wall surface you want to reflect. textures/system/mirror1 { qer_editorimage textures/system/qer_mirror.tga portal q3map_nolightmap } I actually made my own one shader for this, but the mirror1 from system does the trick too. Than you have a full mirror. I think you can set opacity on this one too, but I need to play with this as well to mirror your work. Because it will be a portal, prepare for an fps drop on this part. (it has to render the room twice, so make sure you use hint brushes / area portal propperly). Which one is the masking shader from vjun? AngelModder likes this Link to comment
AngelModder Posted January 31, 2015 Author Share Posted January 31, 2015 here is an example of what the problem / attempt is. as you can see I am trying to go for fake reflections of the area. Now these will be changed for different parts of the room to reflect the appropriate things later on, at this time I am just trying to get it to work the way I need it to. Please note that any thing you see in these photos is a work in progress still, the last couple of days have been spent creating new textures and shaders. Bloom effect etc.The shader I am currently usingtextures/Titanic/oak{ q3map_material wood { map $lightmap } { map textures/Titanic/oak blendFunc GL_DST_COLOR GL_ZERO } { map textures/titanic/cubemapgsc blendFunc GL_SRC_ALPHA GL_ONE alphaGen const 0.12 tcGen environment } { map textures/titanic/cubemapgsc tcGen environment rgbGen const ( 0.5 0.4 0.4 ) blendFunc GL_ONE GL_ONE }}LOL sorry Lk I posted at the same time you did. Link to comment
AngelModder Posted January 31, 2015 Author Share Posted January 31, 2015 Yea for FPS reasons I am not going for a full mirror effect plus that wont apply to vertical walls and can only be used really in one spot or level plane. The idea is that there'll be the env shine overall, then a secondary reflection of sort, that is more static only changes angle slightly depending on where you're standing. I do remember G showing me how to do this, as I mentioned I use to have the shader but I no longer have it. The Vjun mask shader I refer to is this on... Careful it can break your game and laggs a map like crazy for some reasons. textures/vjun/vader_floor2{ q3map_material SolidMetal q3map_nolightmap { map textures/vjun/vader_floor2 rgbGen vertex } { map textures/byss/env_large_floor2 blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR rgbGen identity tcGen environment } { map textures/vjun/vader_floor2_mask blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen vertex } { map textures/vjun/vader_floor2_glow blendFunc GL_ONE GL_ONE glow rgbGen identity }}Tis didn't work like I had hoped it would either, it just placed the mask layer over everything at full opacity and caused a crazy amount of lag. Also I've strolled through the tutorial section here and through my own data base, this is one I can't find being covered. A failure on my part to not have covered this when I had a working shader for it. Link to comment
Lazarus Posted January 31, 2015 Share Posted January 31, 2015 you know that this requires a tga with alpha channel right? Cause the JKA one doesnt work propperly cause the texture i question is a jpg. I get an error with ShaderEd Link to comment
AngelModder Posted January 31, 2015 Author Share Posted January 31, 2015 HA was that the trick to it? Hmmm I'll have to look into it, do you think it's what I am trying to go for? I know spec mapping is possible. Link to comment
Lazarus Posted January 31, 2015 Share Posted January 31, 2015 http://jkhub.org/tutorials/article/121-creating-fake-bump-mapping-in-jka/ AngelModder likes this Link to comment
AngelModder Posted January 31, 2015 Author Share Posted January 31, 2015 Got it working thanks to your imperial shader. That was exactly what I was looking for a more static env rather than the overall moving glossy env.! Thanks Lazarus! Lazarus likes this Link to comment
Lazarus Posted January 31, 2015 Share Posted January 31, 2015 cheers AngelModder likes this Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now