Announcement

Collapse
No announcement yet.

mirror material?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    UPDATE: Unreal supports true mirrors natively now! Here's a tutorial. If it helps you, please like and share the video to help others.

    OLD: I managed to do correct reflections. There's a catch, though. Read video description for details. https://www.youtube.com/watch?v=wHcGKs0uqLo
    Last edited by RVillani; 01-05-2017, 02:48 AM. Reason: new mirror method

    Leave a comment:


  • replied
    Sorry, I left out one important piece in the screenshot above and that is to reverse the direction of the rotation.
    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	38.8 KB
ID:	1081742

    Leave a comment:


  • replied
    Originally posted by StewieYan View Post
    is it still the same?
    It's still the same in 4.8. I managed to get a decent fake mirror though by using blueprints. There were a couple things I didn't like about other implementations that I changed. I noticed from real life observation that proximity to a mirror changes how much of an environment you can see reflected in it. To fake this I control the Field of View of the 2D scene capture camera based on the chars proximity to the mirror. The trick here is that you have to provide a range over which the FOV values will change. I am still playing with the FOV values but found that in my case when the player is more than 200 units from the mirror the field of view tends to flatten and values around 50 seem to work well. When close to the mirror I use a value of 90. Its all a fake and doesn't look perfect, but I do think its an improvement.

    I also noticed that the reflection in a mirror doesn't change dramatically if you rotate your head (Yaw). Many Other implementations I found on the forums used the player camera rotation to control the rotation of the 2D scene capture, resulting in a reflection that is constantly rotating. Instead of using the camera rotation to drive the rotation of the 2D scene capture I used the "look at rotation" node. I get the player location and camera location and derive the view angle from this. This way the reflection only changes when the player moves and not just moves their head.


    Click image for larger version

Name:	mirror.JPG
Views:	1
Size:	133.9 KB
ID:	1081731

    Leave a comment:


  • replied
    Originally posted by jazvecina View Post
    actually it is not possible -> THIS is not a mirror. its a live camera footage broadcasted on a screen.
    That is how most, if not all, engines create mirrors.

    Leave a comment:


  • replied
    could you please summarize the current state of mirror material in ue 4.8.1?

    is it still the same?

    could you please describe what the missing feature SceneCaptureReflectActor does? I never used ue3, I want to see if I can code something in c++.

    Leave a comment:


  • replied
    If anyone is still looking for a solution, my suggestion is to go into the material editor and use constants to set the value of the metallic node to 1 so that it "resembles" a mirror

    Leave a comment:


  • replied
    Is there a possible bump here?

    Leave a comment:


  • replied
    Originally posted by AdrianLazar View Post
    I was actually thinking about something similar, my main character will have something like this as helmet and I would really love some real-time reflections - in this case I really don't care about accuracy since the reflection will be heavily deformed by the round shape of the glass but would be great to update in real-time. I hope next week I'll have some time to research this
    Have as look at what I have been doing with my car paint materials. I created a translucent material which takes advantage of a scene capture actor to produce real time reflections. Hopefully I will have my materials up on the marketplace soon. If you want to give it a shot yourself, you should try using the scene capture actor and the cubemap it produces. It is also possible to use it to produce a convincing mirror. It's not necessarily efficient for a single flat surface, because the capture actor will be capturing extra content which wouldn't be rendered on the mirror's surface, but it should produce some nice results.

    Leave a comment:


  • replied
    Originally posted by SkacikPL View Post
    If you want even better solution, then just attach Scene Capture Cube to the pawns face and have it capture every frame, this way you have appropriate reflection in all axes/angles. All that's left is just proper material setup (especially UVs).
    I was actually thinking about something similar, my main character will have something like this as helmet and I would really love some real-time reflections - in this case I really don't care about accuracy since the reflection will be heavily deformed by the round shape of the glass but would be great to update in real-time. I hope next week I'll have some time to research this

    Leave a comment:


  • replied
    @jazvecina: what's with the attitude? What about coming with something constructive instead of just ******** about other people that are trying to find a solution?

    Yes, hopefully Epic will add an easier solution at some point but you'll never find an engine that can cover all your needs so how about you learn how to do it yourself?

    Leave a comment:


  • replied
    Originally posted by jazvecina View Post
    then it doesnt!
    just stop with this. this is not a mirror.
    i dont want an awful unrealistic looking alternative, i want a solution to this problem. and the solution is to add the SceneCaptureReflectActor in upcoming updates like it was in UDK. again, check the first video in this thread.
    Well, the UDK scenecapturereflectactor wasn't perfect either...
    If you want even better solution, then just attach Scene Capture Cube to the pawns face and have it capture every frame, this way you have appropriate reflection in all axes/angles. All that's left is just proper material setup (especially UVs).

    In case of non-playable, mostly pre-baked environments such as archviz, you can most likely afford having a dynamic cubemap with decent resolution.

    Leave a comment:


  • replied
    Originally posted by SkacikPL View Post
    Actually, it does.
    Surely it isn't perfect...
    then it doesnt!
    just stop with this. this is not a mirror.
    i dont want an awful unrealistic looking alternative, i want a solution to this problem. and the solution is to add the SceneCaptureReflectActor in upcoming updates like it was in UDK. again, check the first video in this thread.

    Leave a comment:


  • replied
    Originally posted by jazvecina View Post
    no it doesn't.
    Actually, it does.
    Surely it isn't perfect but i still believe that in a controlled environment like archviz it should suffice in most cases (or at least until (if ever) Epic gives us anything better)

    Here's how it looks on my end:


    Bear in mind that due to whatever reason, the capture actor does NOT "see" or use the LPV so i have GI shadows whilst mirror reflects pitch black shadows. Though with prebaked lighting this should not be an issue.
    Of course there are few drawbacks of this method:
    -The mirror reflection "angle" is calculated from the camera location in world space, having wobbly camera as i do results in reflection acting in wobbly way too. Whilst this sounds realistic, the reflection wobble is much more noticeable than actual head bobbing. Still, if your pawn has little-to-none head bobbing then it will be fine (especially if the bobbing is faked - as in, does not actually move the camera).

    -the reflection is sampled from one point instead of entire mirror surface, and thus if you get too close to the source point, whole mirror will display the object which obstructs the "viewpoint". Nonetheless you can still get quite close to it without causing it to artifact.
    Last edited by SkacikPL; 09-17-2014, 02:33 PM.

    Leave a comment:


  • replied
    +1 this is a very important feature to have

    Leave a comment:


  • replied
    +1 Accurate mirrors for archviz

    Leave a comment:

Working...
X