WIP Beta released Parallax Occlusion Mapping

Discussion in 'Utilities and programming' started by TheEndOfNether, Mar 29, 2026.

  1. TheEndOfNether

    TheEndOfNether
    Expand Collapse

    Joined:
    Jun 14, 2023
    Messages:
    20
    Preface: This mod is WIP, with paid early access/beta on my Patreon while I work to finish the mod. I aim to release the mod for free in a month or two, with a hard deadline of June 1st.

    This thread is an abbreviated version of the blog up on my Patreon (free), so check it out if you would like more details, and proper comparison GIFs. https://www.patreon.com/posts/parallax-mapping-153045021
    Okay, thread starts now!

    upload_2026-3-28_23-41-48.gif


    For anyone unfamiliar, parallax occlusion mapping (POM) is a shading technique that fakes depth on a flat surface by using a height map to offset where the texture gets sampled. By tracing through that height data along the view direction, it can make details appear recessed or raised, and it can also self-occlude parts of the texture, which gives a much stronger illusion of depth than a normal flat material.

    Adding POM functionality to the material shader wasn't actually super difficult, but the bigger problem is that almost none of BeamNG’s materials were made with POM in mind, so they do not come with authored height maps. The less obvious side effect of that is that means there's no default way to get POM based texture data into the material shader.

    I circumvented this by taking advantage of the multi-layered material system, and repurposed the fourth material layer to pass my POM arguments to the shader. This does mean that the 4th layer on any materials that previously used it has been sanitized (but don't worry, because 99% of textures don't even have a second layer).

    But back to the more obvious problem: the heightmap; BeamNG doesn't have for materials, and I was not about to make seventeen hundred custom heightmaps by hand. The solution I came up with is to instead generate approximate height data procedurally from textures that already exist, mainly AO and normal information. That obviously sacrifices some quality and artistic intent, but it also makes the whole thing actually feasible instead of turning into an asset-authoring project.

    Image of procedural heighmap, where blue represents visible parallax, and green-black is displacement/height data

    To help procedural heightmaps suck less, I've packed a json-based tuning system that lets you edit some heightmap fields for each individual material, which helps a lot with materials that explode with the default settings.

    There are still some kinks to work out, which is why the mod is early access, but I'm making steady progress toward getting the mod finished.

    Gallery:
    upload_2026-3-28_23-42-18.gif
    upload_2026-3-28_23-43-46.gif

    upload_2026-3-28_23-27-32.png
    upload_2026-3-28_23-28-16.png

    Debug Image:
    upload_2026-3-28_23-34-8.png
     

    Attached Files:

    • upload_2026-3-28_23-29-30.png
    • Like Like x 2
  2. beamer09234

    beamer09234
    Expand Collapse

    Joined:
    Mar 29, 2024
    Messages:
    32
    yoo this looks peak man hold on, where is the patreon? I would genuinely buy this but I dont got the money rn.. I hope you release it soon lol.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice