how to: outline helper materials! (Pixiv Fanbox)
Videos
-
4d8b811ef9633a46eaab9e8b73e13295.mp4
Downloads
Content
(alt version on twitter: https://twitter.com/VRSexFriend/status/1435620877480177664 )
hi! i discovered a way to make outlines better a long time ago thanks to experimenting with UTS2's outline helper materials while working on a lewd kanna model edit:
outlines are really just inverted extruded shells from their originating mesh. with a sufficiently large radius (extruded distance), they end up inside other meshes, causing them to break up such as in the left image above. the UTS2 outline helper material is meant to be used to fix this by using stencils. while I don't use UTS2 anymore, the shader I do use (Poiyomi pro) is able fix outlines the same way.
let's look at how this works:
first, a wristband with just it's own normal outline:
notice where the wristband meets my arm, there is no outline. that's because it's actually rendering under the arm because the outline, an inverted extruded shell, has been extruded too far.
but what if we made the outline render not just on the inverted side, but on both sides? then, we'd end up with something that looks like this:
that's making the outline render where it meets the skin.. but it's also making it render everywhere else, too, and we don't want that. we can use a stencil to render under the wristband to fix this:
note that we're actually using 2 materials here. one for the wristband and it's normal outline, and another for a double-sided outline. we use two because if we only used one, we would end up with the outline only appearing only as a silhouette.
a lot of professional 3d games and stuff don't fix their outlines this way!
keep in mind i'm using Poiyomi Pro to do this. your mileage may vary when using other shaders, but the concept remains the same.
here's the quick how-to:
unity does something cool! adding a new material slot allows you to apply an extra material to a mesh that applies where the material in the last slot does, so you dont have to go into blender, duplicate the mesh, then add a material slot and assign the new mesh to it.
1. just change the material count from 1 to 2:
2. duplicate your material (an easy way to copy all it's settings), and rename it to something easy to understand, and put it into that 2nd slot.
3. apply the following settings to your original material:
the important ones are the Outline Cull, Stencil, Outline Stencil, and Render Queue
do the same for your 2nd material, but with different values.
one last important setting: the skin that the clothing is supposed to be on top of needs to have a lower render queue than the clothing and it's outline helper material.
your clothes should now have solid outlines when close to your skin!
4d8b811ef9633a46eaab9e8b73e13295
there are some other tricks related to outlines i'll make in another post!