Custom Paint Shaders in BeamNG 0.4.0.x

Discussion in 'Videos, Screenshots and other Artwork' started by kirbyguy22, Apr 13, 2021.

  1. kirbyguy22

    kirbyguy22
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    90
    I was able to write my own HLSL shaders for car paint for BeamNG 0.4.0.x, with support for fresnel reflections and pearl-like paint. They get loaded in BeamNG via a CustomMaterial, which replaces the main body's material in the materials.cs file.

    fresnel1.jpg fresnel_pearl1.jpg fresnel_pearl2.jpg

    Note how the reflections are fairly weak when the surface is facing towards the camera, but become exponentially stronger as the surface angles away. With this fresnel effect, glossy dialectric (non-metal) materials like car paint, glass, plastics can be more realistically represented.

    I couldn't get this to work in more recent versions due to my total lack of shader programming knowledge. I know graphics are pretty low on the priority list for the devs, but this is something I'd love to see properly implemented in future versions of BeamNG.
     
    • Like Like x 6
  2. Jer

    Jer
    Expand Collapse

    Joined:
    Nov 20, 2020
    Messages:
    1,282
    Ohh, that looks cool!
     
  3. Brother_Dave

    Brother_Dave
    Expand Collapse

    Joined:
    Aug 16, 2012
    Messages:
    1,662
    Sweet! Sounds like what the shaders in the Shader Packs for Torque3D, from Liman3D does. It act on the same level and is bound to specific materials. I think ive mentioned this very same thing in Ideas & SUggestions up to a couple of times. Ive never bought that pack though but its cheap afaik.

    If you want me to look at it and see if i can get it to work (will take no credit at all, im 100% for ever improving graphics in Beamng) then send me a DM :)
    Ive got this lighting++ mod going for a few years, if you havent seen it before:

    https://www.beamng.com/threads/al12-released-30-3-2021-graphics-mod-al-part-2.71585/

    Ive been diving deep into the dark corners of the accessible code and have a fair idea of what has changed here and there when it comes to the rendering.
     
    #3 Brother_Dave, Apr 13, 2021
    Last edited: Apr 13, 2021
    • Like Like x 1
    • Agree Agree x 1
  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