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"

How can I make an Object visible only through another object?

How can I make an object visible only in the viewing space of another object? What I aim to do is to place a plane through which I can see some objects that are normally not visible.

Product Version: UE 4.20
more ▼

asked Jul 19 '18 at 10:19 PM in Blueprint Scripting

avatar image

10 2 6

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

1 answer: sort voted first


I suggest using shaders/materials. This might be a bit more complicated but this should get you started: http://www.tomlooman.com/the-many-uses-of-custom-depth-in-unreal-4/

Hope it helps some. If the link doesn't explain it too much lemme know, I'll try to answer your questions.

more ▼

answered Jul 19 '18 at 10:57 PM

avatar image

78 4 5

avatar image Narcyssus Jul 20 '18 at 01:32 PM

Do you think that is possible with this method to render the occluded object with its normal colors, shadows, reflections et cetera?

avatar image ex3me Jul 20 '18 at 01:57 PM

Hm, must say I've never tried it myself but I'd think it possible, but it depends on exact implementation of the occlusion object. Will it be only taking a part of the screen or the entire screen?

I think you could also resolve this via transparency (make object transparent, when not looking at it via occluding object). This might be tad more peformance demanding.

Other option would be to use method for triangle culling, although I'm not sure how much UE supports it. Basically just check whether you look at given object (as in the article) and use triangle culling to get rid of all non-occluded triangles.

If the occlusion object covers entire screen, then just have a "flag" that tells you, now it's on, render all objects, otherwise just don't render them (you don't need to do this via materials at all, but can use coroutines to notify object they should start rendering and just enable them, and turn them off when you stop using occlusion object)

Not sure how much this helps.

avatar image Narcyssus Jul 20 '18 at 02:54 PM

I'd like to make a portal effect like this: https://www.youtube.com/watch?v=j7rYvPtuEFg , but not recreating a teleport system that work with scece capture. I want to place the two worlds in the same space and make them alternatively visible and not visible trought a plane. The problem with sceneapture is that it doesnt render planar reflections and that it's bind to the camera player (so I cant export correct screenshots with ansel, because during the stich, the portal area becomes a mess).

avatar image ex3me Jul 20 '18 at 03:19 PM

ah this is completly different than what I thought you were looking for, sry but no idea there :(

avatar image Narcyssus Jul 20 '18 at 05:35 PM

Thank you anyway!

avatar image Dmaw Apr 10 '19 at 07:35 AM

did you ever find a solution to this?

(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