I have found an easy way to fake back lighting in the blender game engine. I have only tried it using GLSL but it could be possible in multitexture mode some how.
This is the resulting effect: (exaggerated for effect, It can easily be more subtle)
To add a rim shader effect to a material is actually really simple. First create an image like this. The softness of the circle is what determines the softness of the lighting. You want the circle exactly in the center as this gives the most even final result. Mine is a rough example for testing. You would want a better one.
-Now create a texture with this image in the material you want to be rim shaded.
-Next select “Nor” for normal in the “Map Input” tab
-Use Size X and Size Y to adjust the size of the rim. In the above image I used .75 for both with the example texture
-Now go into the “Map To” tab and de-select “Col” (colour) and select “Emit”
The result is that the object emits light around the edge as well as reacting to lighting in the scene creating an impression of back lighting
In glsl you could probably use a color ramp instead of an image, for better accuracy, control, and filesize- probably speed too.
[edit] as far as I can tell you’d have to use nodes if you wanted a ramp-based rim shader- basically you’d plug nor from a geometry node into a ramp (using a nor node to get the dot product), and that into a color mix node set to add. The result goes to render.
Yeah I actually found a way to do it in a super mario galaxy style shader someone uploaded. I was just looking for an easy way to do it and this was the first thing I came up with, I’m not the best with nodes. I’m very much a “that does it so why do I need another way” type person.
This was an easy solution so I decided to stick it up here
fisicomolon: I think there are drivers or something for intel chipsets. If you have a desktop, just buy a card by newegg.com, or go out and buy it… They aren’t expensive.
I have an ati 9550 and it is supossed to work with glsl, If I set everything "on " in my card glsl works but my computer get frozen in a few seconds, I have to set a few things “off” and the glsl stop working. The problem is my computer only have a AGP port, and new cars are PCX mostly. And AGP cards are old, and probably I’ll have the same problem. I’ll change my computer soon but no now. Thank you for you advice
I did it and it works, I pressed ESC and P again and it didn’t work :mad:
I’m trying right now.
Ok, I think I got something, if anybody is interested in doing something similar without glsl, here is the blend.
if you change the Map to too Col and use a sharper circle with inverses colours you can get a quick toon inline. Its a bit dodgy bit could be used for a few techniques.
Realised that a circle like this :
this made a very thin outline around the inside the character
I then made the circle smaller
and got this result
It looks funny at cretin angles but it works.Model from here: