I've been working in the material editor, pouring over Hourences' tutorials on materials and just experimenting with the different expressions.
I have a question about the Emissive channel. Below I attached a ss of a custom material. I generated a separate map for the emissive channel to achieve the glowing effect, but I was wondering if there was an alternative method to doing the same thing, by just using the diffuse map? Also, I know there has to be a way to control the emissive value (or the strength of the glow), but I am not sure which expression to use for this.
Anyone have any additional info I could use for either issue?
Also, has anyone ever noticed a performance degradation related to the number of maps used in a material, or that get loaded with any given level?
Last edited by Raenz; 03-15-2008 at 05:11 PM.
You can achieve a similar affect by adding your emissive map into your diffuse, you just have to push the brightness of it over 1 enough for it to start glowing. However the difference is that since it is going into the diffuse it is depended on the lighting, so it will only glow if the brightness is over 1 when combined with the lighting.
To increase or decrease the brightness of it just multiply it by a constant...
What I would do is use the alpha channel of the diffuse texture to basically hold an emissive mask, just grayscale info. Then, I would multiply that by a color (Constant3Vector) in the material editor and connect the result to the Emissive channel. That way you save a texture and have complete control over the color and intensity of the glow from within the material and if you ever want to change the color of the glow, you just change the color the alpha channel is being multiplied by. Even better would be to use a VectorParameter instead of a Constant3Vector so you can create separate MaterialInstanceConstants for the different glow colors.
Great! Thanks for the replies guys. That will help alot.