On iOs metal clip plane does not work. Is this known problem?
Announcement
Collapse
No announcement yet.
Requesting improvements about planar reflections (4.12)
Collapse
X
-
So I have implemented a little plugin which can resize a rendertarget at runtime and also update the SceneCapture2d component in editor to the reflected viewport camera position (so that it can be previewed in editor).
There is no way getting around the fact that the clip plane needs to be enabled via modifying engine source though, I will be submitting a pull request soon.
The clip plane can potentially be used for other things as well btw, like portals!.. so it's definitely something that the SceneCapture2d component needs to have.
Initial tests show up to ~10% performance improvement compared to the regular planar reflection actor!that is with the default SceneCapture2D show flags.. a significant improvement can be achieved by disabling various features like dynamic shadows.
The downside of course is that you have to implement the reflection in the material side manually to account for fresnel, normal distortion, roughness etc. but at least you have full control to do whatever you want with the render target.
On that subject, do you guys have any advice in how to go about implementing roughness? I'm currently experimenting with blurring the texture but it seems expensive and not exactly "physically correct"
Hopefully I will end up with a couple of material functions to do all those things as simple as plug and play.
Roughness test #1 (spiral blur):
4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
WIP Interactive Water Shader, WIP 2D Water Sim
WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD
Comment
-
Yeah the whole "blur for roughness" thing is only going to get you relatively bad looking results unless you have enough resolution, not too mention "physically incorrect" as it were. Still, if you really must have it, you're not going to do much better (or worse) than your initial test right there.
Comment
-
To avoid leaks you should test visibility of sample and weight by that for blurring. Actually this should be done for distortion too. If ray from distorted sample towards eye is not visible from camera(depth buffer test) then it potentially cause visible leaks. This can be seen if you are in cave then distorted samples can reflect sky even that camera is fully inside the cave.
Comment
-
Clip plane pull request: https://github.com/EpicGames/UnrealEngine/pull/2491
Originally posted by DanielW View PostMaterial quality level is a good idea. LOD controls will be important too.
I would kindly request to keep in mind to also add these in the SceneCapture component(when and if this ever gets implemented of course).
4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
WIP Interactive Water Shader, WIP 2D Water Sim
WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD
Comment
-
[MENTION=1127]TK-Master[/MENTION]:
Very cool!
If at least Epic makes scenecapture class extendable, removing it from minimal API, you could implement this without rebuilding full source code or waiting for a pull request to be merged.
From what Tim Lincoln says in this post (https://answers.unrealengine.com/que...captureco.html, it could be very soon.
The clip plane can potentially be used for other things as well btw, like portals!.. so it's definitely something that the SceneCapture2d component needs to have.
Initial tests show up to ~10% performance improvement compared to the regular planar reflection actor! that is with the default SceneCapture2D show flags.. a significant improvement can be achieved by disabling various features like dynamic shadows.
What would be the workflow with a clipping plane enabled in the scenecapture actor? For example, in the screenshot you posted, do you still use a planar reflection (actor or component) or a scenecapture actor located under the floor by blueprint stuff? How does it work?
About roughness: your screenshot looks good to me, even if not perfectly physically correct (but anyway nothing really is in real-time graphics. When you play a game, the point is only: does it look good or not?).
By "frosting" reflections a little bit with a normal map (very small tiling voronoi cracks texture for example) and fading reflections as they go deeper "under" the ground by postprocess material stuff, it could be pretty good imo. However, frosting blurred reflections is necessary on a rough surface.Last edited by EdWasHere; 06-10-2016, 06:26 PM.GLASSES & WATER SHADERS & CUSTOM PLANAR REFLECTIONS on my Youtube Channel: https://www.youtube.com/channel/UCP2...26Y2bEV4kfl9kA
Comment
-
Originally posted by EdWasHere View PostWhat would be the workflow with a clipping plane enabled in the scenecapture actor? For example, in the screenshot you posted, do you still use a planar reflection (actor or component) or a scenecapture actor located under the floor by blueprint stuff? How does it work?
The intended use was for an ocean simulation (we're both working on the community ocean sim project), but he made sure it works great for just about anything. You can adjust the quality in multiple ways, such as reducing the resolution of the RenderTarget to improve performance. The 10% improvement is with a 1080p RenderTarget. With a 720p RenderTarget the performance gain becomes 30% or more, but the quality difference is very minor. For something like a mirror you'd want full resolution, but for something like an ocean where the reflection shouldn't be perfect in the first place due to surface distortion breaking it up, it's a huge savings.
The main reason this is such a big deal for us is that it only gets applied to the surface(s) you want it applied to, and you can exclude any actors you don't want reflected. It makes this much more useful than the current PlanarReflection actor for our use case.
Really looking forward to having this added to source. It's also very lean on code changes (+24 lines that only run if the clip plane is enabled). He did a great job, it's really impressive along with the plugin.Last edited by DotCam; 06-10-2016, 06:36 PM.
Comment
-
OK, thanks for these explanations.
The main reason this is such a big deal for us is that it only gets applied to the surface(s) you want it applied toGLASSES & WATER SHADERS & CUSTOM PLANAR REFLECTIONS on my Youtube Channel: https://www.youtube.com/channel/UCP2...26Y2bEV4kfl9kA
Comment
-
Originally posted by EdWasHere View PostOK, thanks for these explanations.
Out of curiosity: can't you get this using a planar reflections component instead of actor?
Comment
-
Anything like landscape or objects in the water receive the reflection if they are within the Distance From Plane start/end.Last edited by EdWasHere; 06-10-2016, 08:07 PM.GLASSES & WATER SHADERS & CUSTOM PLANAR REFLECTIONS on my Youtube Channel: https://www.youtube.com/channel/UCP2...26Y2bEV4kfl9kA
Comment
-
Could you assist with this Answer Hub bug report. https://answers.unrealengine.com/que...-on-metal.html
On Metal clip plane is not working. This affect both Mac and iOS.
Comment
-
I am having a similar issue that is affecting my whole scene. I am at a dead end and I cannot respect the deadline.
Since I have lots of mirrors I upgraded to 4.12 so that I can use planar reflections in my project. They work well on vertical surfaces. On horizontal surfaces I prefer not to use it since of the problems you mentioned.
However I am now stuck with weird reflections on all horizontal surfaces. Please check my attachments.
Skylight, Postprocessing all disabled
I have deleted all horizontal planar reflection actors. No result.
I have disabled the planar reflections from the rendering options restarted the project and rebuild all shaders. Reflections remain.
What is causing this problem?
Comment
-
I miss the UDK version of reflect actor , any plans to bring back the render to texture feature for the planner reflect like in udk?! It feels very limiting as it is now, without being able to have a way to access the reflection inside the material. I would like to be able to have the flexability of render to texture.
Comment
Comment