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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

It is possible to create a Mirror Maze using Scene Capture 2d?

Hi everyone, Today I'm going to ask you a very challenging question:

It is possible to create a Mirror Maze inside UE4?

The scheme of what I would like to obtain inside the editor is this: alt text

I've tried to create a Mirror Material using a Scene Capture 2D but it's not even thinkable to use a Scene Capture for each mirror because It would destroy badly the performances.

Two ways I was thinking to realize this are:

1)Using blueprints to activate or deactivate the scene capture in order to use the least possible number of render cameras.

2) Using a single scene capture inside the character blueprint, that renders the emissive texture to use as material in the mirrors.

The 1) Idea would be good but even 2, or 3 render target active in the same area is a big deal. The 2) Idea would be good but what I obtain using this technique is not more a Mirror effect.

So the questions are:

There's another way to obtain a Mirror reflection without using a Scene Capture? There's a tricky way to use multiple scene capture in the same area without making explode your hardware?

Product Version: Not Selected
Tags:
capture.png (32.1 kB)
more ▼

asked May 24 '14 at 11:36 AM in Rendering

avatar image

Maximvm
44 5 6 14

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

2 answers: sort voted first

Hi Eric,

Thanks a lot for your reply, It gave me a very huge base to try to build what I need.

Here's a vid about how is going on the prototype of this Mirror Blueprint:

https://drive.google.com/file/d/0B6qO6Fyi_6APQUdzcjJPYnRPXzA/edit?usp=sharing .

I did some changes:

First of all I added a box shape in the mirror blueprint, that can casts overlap events, cause if I put on a scene 100 windows frames, I do not want to calculate every tick the distance between the player pawn and the mirror blueprint: alt text

So , inside the Mirror Maze blueprint there's a scene capture 2d placed at the most center of the window frame, then I added a looking at behaviour between the scene capture and the pawn, to obtain a more realistic mirror reflection

alt text

Then I didn't wanted to turn off and on the mirror maze like a switch so I added a sort of blend in effect that becomes stronger as the distance between the mirror and the pawn decreases.

1.png (88.3 kB)
2.png (189.5 kB)
more ▼

answered May 27 '14 at 05:30 PM

avatar image

Maximvm
44 5 6 14

avatar image Maximvm May 27 '14 at 05:37 PM

So if all the conditions are set right the Scene Capture will become active like this:

alt text

But if any of these conditions is not respected: alt text

Of course now I have something that can be improved still a lot, but it's nice a prototype thank to the ideas of Eric.

What I want to achieve right now is to do a better base material for the mirror effect without the scene capture.

I do not know why but I think there's a problem setting the proper lighting enviroment to obtain the correct base material for the mirror. I

4.png (136.3 kB)
3.png (104.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hey Maximvm -

As you say this is a complicated issue, but you could start by using a Blueprint to blend between a material using your render camera and one in which you are using a reflection vector on a highly metallic, no roughness material. You can then interpolate between them based on the player's distance. This way your mirrors would never lose reflectivity but you would be taking the less costly route for objects farther away and the more detail, accurate route close up (So, your are developing an LOD system for your reflections).

There are still some more issues, but this should get you started.

Thank You -

Eric Ketchum

more ▼

answered May 25 '14 at 06:22 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

avatar image Maximvm May 25 '14 at 06:25 PM

That's very interesting, I'll give a try and put here my work as soon I have an update of it!

Thank You very much Eric

avatar image Lovecraft_K ♦♦ STAFF May 26 '14 at 01:29 PM

Here is some Material Information to get you started, to do this we setup two Material Functions, one that is your base no scene capture reflection and one that is just your scene capture.

Here is the Base No Scene Capture Reflection (the texture Sample is just a field of solid white, but this would be where you could texture your mirrors if they are dirty or tarnished):

Reflection_NoSceneCapture

Here is the Scene Capture Material Function (whatever dirt or tarnish would also have to be added to the Render Target):

Reflection_SceneCapture

reflect01.jpg (221.1 kB)
reflect02.jpg (203.6 kB)
avatar image Lovecraft_K ♦♦ STAFF May 26 '14 at 01:37 PM

Here is the final Material which is Blended by a Parameter which we will control in a Blueprint:

Final_Material

Here is the Event Graph for a Mirror Actor, whose components are made up of a Static Mesh and a SceneCapture 2D. This will get the distance from the Player Character to the actual mirrored object and compare it to a set distance value and switch the material blend as needed.

Blueprint_EventGraph

reflect03.jpg (220.4 kB)
reflect04.jpg (269.7 kB)
avatar image Lovecraft_K ♦♦ STAFF May 26 '14 at 01:41 PM

Here is the Blueprint's Construction Graph where you are assigning a dynamic Material based on that final Material.

Blueprint_ConstructionGraph

This is still going to have multiple scene capture components for each mirror, but at least you can control exactly when the CPU is actually rendering those elements which should help as long as you can dial in that distance comparison.

This is by no means the only way to do this, but hopefully it will spark some ideas for you.

Let us know how it turns out

Eric Ketchum

reflect05.jpg (221.1 kB)
(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