Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Custom render depth on a per player basis

Disclaimer: Not sure if this actually belongs in 'Rendering', but I figured it was the best bet.

I've got an interaction outline that is drawn over certain actors whenever they enter a collision sphere surrounding my player. The material is placed in the Global Post-processing Volume, under Postprocess Materials. So when the player walks close enough, a blue outline will be drawn over objects that can be interacted with. That said, I'm noticing that when I simulate two players in the game, the 'outline' material will on all clients even if only one of them is close enough to activate.

How can I show the custom render depth only for specific players that are close enough to be considered interactible?

Product Version: UE 4.16
more ▼

asked Jun 12 '17 at 04:47 PM in Rendering

avatar image

1 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The easiest way to achieve this is, when the character is entering the volume, to cast the actor reference you get from OnBeginOverlap and cast it to the character you want. Then, using the node SetRenderCustomDepth or whatever it was called, to set that actor to render custom depth. Upon exiting the volume you revert the changes.

Then, in the postprocess volume you add the outline material that renders across the entire screen, but only where the custom render buffer set.


more ▼

answered Jun 12 '17 at 05:07 PM

avatar image

2.7k 108 36 180

avatar image Vigilant Jun 12 '17 at 05:59 PM

Kind of confused by this. My volume is actually on the player character itself. I was under the impression that the SetRenderCustomDepth node actually turned the outlines on and off on whatever primitive component (like a mesh) that were targeted by them. [1]

[1] http://i.imgur.com/dAxD5fS.png

avatar image NoobsDeSroobs Jun 12 '17 at 09:48 PM

Yes, custom depth is a setting for static meshes. Anything that is rendered really. Just get every static mesh in the OtherActor and set the custom depth of each. You are not even setting the custom render in your code.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question