Help & Guidance > Presets & Markings Tutorials

Glowing outline WITHOUT the rim.dds!

(1/2) > >>

yourlocalcrow:
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.

--- Code: ---{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_11body.png
   }
  }
 }
}
--- End code ---

2. Next, we're going to add another layer to the preset, or pass. This goes directly under your last texture line.

--- Code: ---}
  }
  pass
  {
   texture_unit
   {
    texture glowtime.png
   }
  }
 }
}
--- End code ---

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.

--- Code: ---}
  }
  pass
  {
   texture_unit
   {
    texture glowtime.png
    env_map spherical
   }
  }
 }
}
--- End code ---

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:

--- Code: ---{
 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
   }
  }
 }
}
--- End code ---

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.

--- Code: --- }
  }
  pass
  {
   emissive 1 1 1
   depth_check on
   depth_write off
   scene_blend alpha_blend
   texture_unit
   {
    texture glowtime.png
    env_map spherical
   }
  }
 }
}
--- End code ---

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!

Ame88:
Ahh, this is amazing! Thank you!! So can't wait to test this out x)

Lucius:
Hey, this is a really good solution for those who have issues with the RIM.dds file I provided / linked to!

Do you mind if I add a link to this thread on my OP?

yourlocalcrow:

--- Quote from: Lucius on July 30, 2018, 07:10:28 pm ---Hey, this is a really good solution for those who have issues with the RIM.dds file I provided / linked to!

Do you mind if I add a link to this thread on my OP?

--- End quote ---

Not at all! The more people who can see it, the better. ^^

LonesomeRider:
This is really cool! I've never used the outline code, but have heard that whole error thing~ I might try this out.

Navigation

[0] Message Index

[#] Next page

Go to full version