Hey, all, I need some help. While working on Revenge: Assassins, I started to create an enemy. The enemy is humanoid and I thought the best way to achieve the look I wanted was to create a basic mesh, set it’s transparency, and then use a custom shader to render a shadeless red outline on him. Unfortunately, this would apply to all objects in the scene, and would not show on the enemy because he is invisible. Does anyone know any better way to achieve this?
One simple method some people use to make outlines around objects is to create a copy of the object/mesh, scale it up slightly, and invert its normals. Then you can just give it the color you want the outline to be. It may not be the best looking thing in every situation or on more complex meshes, but it gets the job done.
That doesn’t work for me.
Just saying something doesn’t work doesn’t help other people help you. You have to explain exactly what isn’t working and why. Could you not figure out how to set it up? Does it not look right? Posting a blend file is also very helpful.
Scaling also as scales the offsets, so it won’t really be an outline in meshes with concave parts.
You can achieve a "true"outline by a shader working with off screen rendering, though I’m not sure if it’s possible with the bge.
If an object doesn’t have a perfect ratio to its scaling (no matter how complex), scaling it over will not result in perfect outlines. Using shaders is much better.
You can use Alt + S to scale with regards to the faces, and get a much more “even” scaling. This method doubles polygon-count, so it isn’t ideal, but it works fine.
@Jackii - Yes, it’s possible (there are toon-edge GLSL shaders that should work fine with the BGE), either using GLSL shaders alone, or with the bge.texture module as well. However, using shaders alone would still push the effect to the material, so if Joystik needs a single object with the same material as others outlined, then it might not work.
@Joystik - 1) Why doesn’t Mobious’s method work for you? I agree with Mobious that you need to be more specific to get better help.
- Why can’t you just duplicate the material for this one, special object? What exactly is the effect you’re seeking to achieve?
Thank you, Mobious and SolarLune! I wasn’t aware of the Alt + S method. It works now!