What is the best way to apply shader to mapobject model?
Posted: Mon Aug 19, 2019 7:04 am
Hi. I was looking to stock q3 mapobject models shaders and saw quite inconsistency where they use rgbgen vertex, somewhere they use rgbgen identity (but no lightmap), and somewhere they use rgbgen lightingdiffuse. And yes, I was looking only to mapobject models (models used in stock maps).
So I am asking you, what's the best way to deal with lighting of mapobject models? Apparently all methods work, but I guess that each model has different usage in each map, so one way of lighting may differ from another.
Generally speaking, what way of lighting of mapobject model shader would you recommend me for let's say a jumppad? What for model of radio eqipment? Both models are very different. Both will emit light, but jumppad will have two textures: the base, which will emit light, and holo effect, which will act like a light particle, so no lightmap and generally no lightmap will be required and it will be actually lighted by white image in full strength (100%). Radio equipment will be on the other hand consisting of only one texture (two, but combined together on a single mesh, consisting of two parts: the body and the antenna; the shader will have glowing light effect). I am going to use these models for the upcoming map Schöna (yes, I know, it takes really too long to finish the map, but complications have arised and too much things to do aside).
However, I want to use that guide for next models, namely also the model of a car, Chevrolet Camaro lowpoly model I was constructing some time ago and that went quite wrong with texture projection. I have to rebuild it by hand. But here's the thing: I want to make the shader to both have tinted glass effect (non-transparent, but glossy), and lights glowing. The shader itself however won't emit any light, because the lights I want it to emit are let's say quite complicated. Front lights are bright white (xenon lights), however rear lights are dim red. So the shader itself won't emit any light and the emited light is entirely up to map maker to correctly assign the color and direction of the lights. The lights also need to emit light around the object itself, so the model should look like it's lighted properly.
So generally speaking, I am looking for a list of usable ways and their recommended usage on some types of mapobject models, maybe including some typical examples that would say what the model type actually is. Something like this:
Please, do you know some general way of lighting models? Because I had an issue with lighting the camaro model, it appeared as full bright, completely ignoring map lighting...
So I am asking you, what's the best way to deal with lighting of mapobject models? Apparently all methods work, but I guess that each model has different usage in each map, so one way of lighting may differ from another.
Generally speaking, what way of lighting of mapobject model shader would you recommend me for let's say a jumppad? What for model of radio eqipment? Both models are very different. Both will emit light, but jumppad will have two textures: the base, which will emit light, and holo effect, which will act like a light particle, so no lightmap and generally no lightmap will be required and it will be actually lighted by white image in full strength (100%). Radio equipment will be on the other hand consisting of only one texture (two, but combined together on a single mesh, consisting of two parts: the body and the antenna; the shader will have glowing light effect). I am going to use these models for the upcoming map Schöna (yes, I know, it takes really too long to finish the map, but complications have arised and too much things to do aside).
However, I want to use that guide for next models, namely also the model of a car, Chevrolet Camaro lowpoly model I was constructing some time ago and that went quite wrong with texture projection. I have to rebuild it by hand. But here's the thing: I want to make the shader to both have tinted glass effect (non-transparent, but glossy), and lights glowing. The shader itself however won't emit any light, because the lights I want it to emit are let's say quite complicated. Front lights are bright white (xenon lights), however rear lights are dim red. So the shader itself won't emit any light and the emited light is entirely up to map maker to correctly assign the color and direction of the lights. The lights also need to emit light around the object itself, so the model should look like it's lighted properly.
So generally speaking, I am looking for a list of usable ways and their recommended usage on some types of mapobject models, maybe including some typical examples that would say what the model type actually is. Something like this:
- lightingDiffuse => small objects, moveable (e.g. radio equipment, hairbrush, etc.)
- vertex => smaller objects, immoveable (e.g. light fixtures, control lights, etc.)
- identity => large objects, moveable or not (e.g. car models, jumppads, etc.)
Please, do you know some general way of lighting models? Because I had an issue with lighting the camaro model, it appeared as full bright, completely ignoring map lighting...