Download

Custom Depth on Player Character? How?

I want to render Custom Depth (for outlines) on the Player’s Character which spawns via a “PlayerStart” actor. I can only find the “Render Custom Depth” option as a checkbox on persistent objects already within the level ~ the player character does not fall into this category.

I see other games, demos, and even bug reports highlighting the Player Character in Unreal.

How is this done? Is there a checkbox I am missing inside the Character blueprint, or something?

Edit #2: In this video by Tesla he demonstrates setting Render Custom Depth in a blueprint. He does it on a static mesh but you should be able to do it on any skeletal mesh the same way.

https://youtube.com/watch?v=j8gjvKyaQuU

Edit: I reread your question and I misunderstood it initially. He does say in C++ you can toggle Render Custom Depth but I’m not sure how to do it in a blueprint either, nor how you would change the outline color per actor.

This question on the answer hub may have what you are looking for…

https://answers.unrealengine.com/questions/34963/how-can-i-create-an-outline-highlight-similar-to-t.html

I downloaded the material and followed the steps. I increased SampleRangeX and SampleRangeY parameters to 3.0 to get a thicker outline. I also set edge threshold to 1.0 (lower values were causing faces to highlight when viewed at glancing angles).

I’m not sure what changes you would do to this to provide things like different colors for different characters though.

http://i.imgur.com/u1Gxf17.png

I actually watched that video you posted (along with every other video I could find on the subject), and for some reason I discounted it as not applicable to my needs. On second thought, I would expect that solution to probably work, and I should try it out.

In the meantime, I hacked it together by placing the actors into the level, and then swapping them via a keyboard key/relocating the old actor outside the camera view.

the mesh inside the blueprint has the checkbox for “Render CustomDepth Pass” under the Rendering details tab once you expand the little arrow.