So, you just found out about the glowing outline code, and wanna test it out on a preset for yourself. You finally finish the preset, but oops! All of a sudden, when you to export it so you can use it, it doesn't work. You tried everything, but it doesn't export. No worries, I'm here to help!
I've tried to make this as easy to follow as possible, so I hope you're ready to do some learnin'.
Before we even get into the steps to code, we need a texture. You'll want to make a circular gradient of the color you want it to be. In my case, I want it to be red, so here's the texture I made:
Feel free to use this one yourself and recolor it! Now, onto the coding!
1. Start out with your base code, as always.
{
technique
{
pass
{
texture_unit
{
texture preset_11body.png
}
}
}
}
2. Next, we're going to add another layer to the preset, or
pass. This goes directly under your last
texture line.
}
}
pass
{
texture_unit
{
texture glowtime.png
}
}
}
}
3. As of now, it's just that. Another texture. Let's spice it up some by adding
env_map spherical underneath the texture. This line tells the preset to treat the texture as if it's a circle around the preset model. This is what will give us the outline effect.
}
}
pass
{
texture_unit
{
texture glowtime.png
env_map spherical
}
}
}
}
4. We'll also need to add the
semi-transparency code above texture_unit, so that it isn't just a blob of red covering our whole preset! Now, your whole code should look something like this:
{
technique
{
pass
{
texture_unit
{
texture preset_11body.png
}
}
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture glowtime.png
env_map spherical
}
}
}
}
5. Of course, it wouldn't be a glowing outline if we didn't add the glow! Slap
emissive 1 1 1 on there, and if you're feeling snazzy, color it.
}
}
pass
{
emissive 1 1 1
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture glowtime.png
env_map spherical
}
}
}
}
And there you have it! If you did it correctly, your preset should look something like this when you open up preview:
As you can see with Sigil, the ghost of the rest of is tail is there, even though he doesn't have anything under it there. I don't suggest using the code in tandem with full transparency for things like deer tails and missing eyes, as you will still see the ghost of it.
Otherwise, I can't wait to see what people do with this!