zicmak Posted January 21, 2013 Posted January 21, 2013 Just need some help with shaders- 1. How (assuming possible here) do I make only certain areas of a texture shiny in game?2. Is it (even remotely) possible to have a shader that has a (working) HUD and apply it to a skin? As in goes down with health, force, etc.?3. Last question (for now), how do you have a glowing rgb choice for the species menu skins? (least important question, but I'm interested nonetheless) Any answers are helpful (pertaining to the topic that is )
Malkav Posted January 21, 2013 Posted January 21, 2013 models/players/x/1 { q3map_nolightmap q3map_onlyvertexlighting { map models/players/x/2 blendFunc GL_ONE GL_ZERO rgbGen lightingDiffuse } { map gfx/effects/3 blendFunc GL_DST_COLOR GL_SRC_COLOR tcGen environment } { map models/players/x/1 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse } } 1 being the texture in question, with transparency replacing the parts you want to shine, 2 being those parts, saved with the right resolution and positioning over black background, and 3 being the img you use for the shininess.
Solution mrwonko Posted January 21, 2013 Solution Posted January 21, 2013 I hate just giving an example without explaining how or why it works, so instead of giving you shader code I'll explain the concept.Making a texture shiny is achieved by overlaying a second, transparent texture that then moves around (the reflections). To then prevent certain parts from being shiny, you could overlay another texture with transparent parts on it. The non-transparent parts would thus hide the shininess. The exact shader varies depending on whether you need a lightmap etc. You're thinking of an on-character HUD akin to Dead Space? Having procedural shaders is not unheard of: Jedi Knight Galaxies has weapons with Ammo Counters and Hydroball has the in-map scoreboards, but this requires code modifications which make it pretty tricky if you're not into coding. I would assume this requires coding as well, but I don't know for sure.
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