Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Need help with Parallax Occlusion Mapping with shader graph

Discussion in 'Shader Graph' started by filocava99, Jul 11, 2020.

  1. filocava99

    filocava99

    Joined:
    Jul 11, 2020
    Posts:
    2
    Hi everyone. I'm just getting started using the shader graph feature so I'm pretty bad at it.
    Anyway, I was trying to implement the parallax occlusion mapping.
    These are the images I have been using: https://imgur.com/a/ruvQ5Zd and this is what I have done so far: https://prnt.sc/tfswcf .
    I am not sure it is working properly.
    If anyone could give me some advices I would really appreciate
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    10,081
    Parallax Occlusion mapping is way, way more complex than you might be expecting. Here’s an example graph for Unreal. This is too zoomed out to be useful, but gives an idea of the shader’s complexity. Notice, it’s not even the entire graph.
    https://m.imgur.com/KIoJ2p9


    Generally people don’t bother implementing parallax occlusion mapping in graphs because it’s a huge pain. There’ve been a few custom nodes made for Unity’s Shader Graph, but Unity’s broken all of them with updates they’ve done. Unity’s HDRP comes with it’s own Parallax Occlusion Mapping node, but for some reason it’s not been merged into the main Shader Graph branch so it’s not available for URP.

    If you want to read more about parallax occlusion mapping, this link is helpful. Though you’ll have to translate the code into nodes yourself. Note, the first part is about parallax offset mapping, which is a simpler, more approximate effect that’s much easier to implement.
    https://catlikecoding.com/unity/tutorials/rendering/part-20/
     
    Voltion, JamesThornton and filocava99 like this.
  3. filocava99

    filocava99

    Joined:
    Jul 11, 2020
    Posts:
    2
    That's exactly the same tutorial I was reading to learn more about POM. Thank you for the tips!
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    478
    I might be wrong but I think if you add HDRP via package manager (but don't set it to be the active pipeline) then the POM node shows up in URP as well.
     
  5. humansteak

    humansteak

    Joined:
    Feb 4, 2016
    Posts:
    35
    @andybak unfortunately it is not the case :(
    I am in Unity 2019.4 URP and I can't call for the POM node? I have imported HDRP and not set it as renderer and I kind of want to stay in URP but use POM for a thing or two.

    upload_2020-11-17_13-8-1.png
     
  6. TheWhispers

    TheWhispers

    Joined:
    Mar 10, 2020
    Posts:
    19
    If you have a use-case for Parallax Occlusion mapping in your project you should just use HDRP.
     
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    10,081
    No.

    POM is a perfectly valid technique to use on a wide range of hardware, especially when used with conservative values. It's not something that should be gated to the HDRP, and thus only the hardware platforms the HDRP supports.

    It is a technique that offers a lot of rope to users unfamiliar with it, but you can easily tank the performance of a system that can run HDRP with it too, so I don't see any good arguments about limiting it to that pipeline.

    This is something Unity should move to the base Shader Graph project so it can be used in both, or they should open up the node system again so authors can write custom nodes again (there were several who wrote POM nodes for the LWRP before Unity shut that system down).
     
    JamesThornton likes this.
  8. humansteak

    humansteak

    Joined:
    Feb 4, 2016
    Posts:
    35
    Can I download and import the Parallax nodes somewhere? Still stuck maybe I can import it from another version project manually tho ?
     
    Last edited: Dec 1, 2020
  9. sandstedt

    sandstedt

    Joined:
    May 24, 2015
    Posts:
    27
    2020.2 (released July 23rd, 2020) shipped with Parallax map fo URP according to the roadmap, but can't find any options for this in the Complex Lit shader, and not any documentation for it either.

    Anyone has any info about this?
     
unityunity