x

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"

Outline on invisible object?

Hello, is it possible to get a post-process outline to show on objects that are invisible in any form?

Product Version: UE 4.16
Tags:
more ▼

asked Aug 04 '17 at 01:09 PM in Blueprint Scripting

avatar image

rrrbruce
7 2 2 5

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

2 answers: sort voted first

Hey,

This is possible using post processing and the stencil buffer or just standard buffer. One of the Epic artists did a post about it but I cant find the link, so heres a external link to the shader I have used before.

What I do is disable or enable the depth on the mesh with a "SetRenderCustomDepth" blueprint node, so you could drive this when something is invisible, then the post process shader will auto render it as soon as custom depth is enabled.

http://www.tomlooman.com/outline-effect-in-unreal-engine-4/

more ▼

answered Aug 04 '17 at 01:18 PM

avatar image

DanielOrchard
988 17 21 38

avatar image rrrbruce Aug 04 '17 at 01:34 PM

Awesome stuff! I'll try a google on SetRenderCustomDepth and see if I can't find the post by the Epic artist, thanks man!

avatar image Rumbleball Sep 26 '17 at 09:57 PM

This however will only work when the actor is set to render (SetActorHiddenInGame(false)).

I for my part would like to outline something that is hidden in game. You could do something ugly like switching the material to something transparent. But this will cause higher rendertimes for the transparent object.

Any idea on how to outline a hidden actor?

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

I was messing around with this lately, and I think the trick is to toggle "Render in Main Pass," instead of the "Visibility" settings.

Changing an object to "Hidden" will, I assume, not make it available for any rendering, post-processing or otherwise. If you leave the object "Visible" but then turn off "Render in Main Pass" (under the Rendering advanced settings), the object will be visible but not get displayed. Then, change "RenderCustomDepth" to true, and it should display your outline.

Whenever you want the object's main body to show up, just set "Render in Main Pass" to true.

more ▼

answered Sep 26 '17 at 10:07 PM

avatar image

Mowgl33
41 1 2 6

avatar image Rumbleball Sep 27 '17 at 12:57 PM

Wow, incredible, thanks man. Works like a charm. Now I finally understand what that means.

Do you also know if SetRenderInMainPass(false) and SetRenderCustomDepth(false) basically is the same as SetActorHiddenInGame(true) in terms of performance?

avatar image Mowgl33 Sep 27 '17 at 03:30 PM

I would guess that HiddenInGame is probably better for performance, off the top of my head, but I can't say just how much better. This is easy to test for yourself though. Spawn a few tens/hundreds of actors and then use the console command Profile GPU in game, once with your first scenario and once with your second. See if it makes a difference.

avatar image Rumbleball Oct 02 '17 at 07:43 AM

Okay, will have a look. Thanks

(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