Screen Aligned Material

Forums: Screen Aligned Material
Unreal® Engine Integrated Plugin

Moderator: ChrisHekman

Screen Aligned Material

Postby joshuamkerr » Mon Jan 17, 2022 12:33 pm

joshuamkerr Mon Jan 17, 2022 12:33 pm
I'm just coming to the end of a render and hit a stumbling block relating to a texture that I need to remain facing and scaled to the viewport.
It's part of a composite where a plane is placed in the scene with a image sequence playing.

The closest solution is to use the ScreenPosition node in the material editor. When the ViewportUV pin is plugged into my texture UVs the image looks fine in Unreal but octane doesn't render correctly.
https://drive.google.com/file/d/1_waNMZXctpURJN28RUTxMcUKYU3qEYEi/view?usp=sharing
https://drive.google.com/file/d/1QwX5jeSxU46SV8c2cK7kQdbYzNzy-37F/view?usp=sharing

The PixelPosition pin however does give me a result in octane render but if I use this method I can no longer defocus. No matter what my lens settings I wont be able to pull focus to another object.
https://drive.google.com/file/d/1K35deFiBTu8UrypRVWM-6MuRenuwX2c7/view?usp=sharing
https://drive.google.com/file/d/1K35deFiBTu8UrypRVWM-6MuRenuwX2c7/view?usp=sharing
https://drive.google.com/file/d/1Jp2R6cGndrVGkWmrLdSVad0mINjHKQCj/view?usp=sharing

I want to know if there is a way to do this that will work or if this is yet to be implemented into octane render

All the best
Josh
joshuamkerr
 
Posts: 60
Joined: Thu Apr 15, 2021 7:25 am

Re: Screen Aligned Material

Postby ChrisHekman » Tue Jan 18, 2022 5:14 pm

ChrisHekman Tue Jan 18, 2022 5:14 pm
Two things are happening here.

The first thing is a bug in the material conversion where ViewportUV and ScreenPosition are not working correctly in the plugin.
This is a bug and will be fixed in the next build. They should mirror unreal behavior in the next build.

The second thing is that ViewportUV and ScreenPosition will be the same for defocused samples, and focussed samples. Which means that you will see the texture through the defocus blur.
To fix this you need another function that unreal has: "ManualWorldToScreenUVsTransform". However this function does not currently work in the plugin for the same reason as above.
It will be fixed in the upcomming build.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 968
Joined: Wed Jan 18, 2017 3:09 pm

Re: Screen Aligned Material

Postby joshuamkerr » Wed Jan 19, 2022 11:04 pm

joshuamkerr Wed Jan 19, 2022 11:04 pm
Hi Chris,

Thanks for the response and good to know you're looking at this for the next build. Do you have a release date in mind?

The texture defocuses fine in the unreal viewport when using the viewportUV pin, but as you say it doenst work yet with octane.
I had a look at the "ManualWorldToScreenUVsTransform" node but it gives some odd warping in the Unreal viewport so I'm probably not using it correctly.

Hopefully it will all play nicely soon.
joshuamkerr
 
Posts: 60
Joined: Thu Apr 15, 2021 7:25 am

Re: Screen Aligned Material

Postby ChrisHekman » Thu Jan 20, 2022 10:31 am

ChrisHekman Thu Jan 20, 2022 10:31 am
joshuamkerr wrote:Hi Chris,

Thanks for the response and good to know you're looking at this for the next build. Do you have a release date in mind?

The texture defocuses fine in the unreal viewport when using the viewportUV pin, but as you say it doenst work yet with octane.
I had a look at the "ManualWorldToScreenUVsTransform" node but it gives some odd warping in the Unreal viewport so I'm probably not using it correctly.

Hopefully it will all play nicely soon.



Hopefully early next week. We are working on couple of other features/issues.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 968
Joined: Wed Jan 18, 2017 3:09 pm

Re: Screen Aligned Material

Postby joshuamkerr » Mon Jan 31, 2022 9:52 am

joshuamkerr Mon Jan 31, 2022 9:52 am
Hi Chris,

Great to see the update has been released and that those nodes are working.

I have most of these things working now but am encountering a depth of field problem when using the "ManualWorldToScreenUVsTransform" node.

My translucent plane is now inherriting the DOF of the nearest object behind it rather than where the focus is set. This makes it impossible to match DOF with the image I'm compositing.
It looks correct in Lit mode but not in the octane viewport. I have included images below.

https://drive.google.com/file/d/15GOgGh1tQcux5digqzebmkXyFCu1NRT3/view?usp=sharing

https://drive.google.com/file/d/1_YnNeJyjcfzZJEeD6YSlrix13HQFnWH5/view?usp=sharing

I am aware of these sorts of translucency issues within unreal but have not encountered it in octane. Hopefully there is a fix.
joshuamkerr
 
Posts: 60
Joined: Thu Apr 15, 2021 7:25 am

Re: Screen Aligned Material

Postby ChrisHekman » Mon Jan 31, 2022 1:40 pm

ChrisHekman Mon Jan 31, 2022 1:40 pm
I cant recreate your issue. I am getting expected results with ManualWorldTOScreenUVsTransform.
Would it be possible for you to send me a small repo scene that shows the same issue?
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 968
Joined: Wed Jan 18, 2017 3:09 pm

Re: Screen Aligned Material

Postby joshuamkerr » Thu Feb 10, 2022 9:08 am

joshuamkerr Thu Feb 10, 2022 9:08 am
It seems to only be an issue when the camera icon is not selected in sequencer.
joshuamkerr
 
Posts: 60
Joined: Thu Apr 15, 2021 7:25 am

Return to Unreal® Engine


Who is online

Users browsing this forum: No registered users and 2 guests

Tue Apr 16, 2024 8:48 pm [ UTC ]