Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Continuing from this thread. I figured out how to add color and bumpmaps to the fake metallic reflections.

Here's the material:

Spoiler

textures/test/parallax_gold
{
    {
        blend diffusemap
        map _white
        rgb 0.1
        inversevertexcolor
    }
{
    blend bumpmap
    map textures/test_parallax/parallax_gold_local
    inversevertexcolor
    }
    {
    blend specularmap
    map _white
    red        0.2
    green    0.2
    blue    0.2
}
    {
        blend diffusemap
        map textures/test_parallax/parallax_gold_fake_reflections
        rgb 5
        vertexcolor
    }
    {
        blend    gl_dst_color, gl_src_color
        map        textures/test_parallax/parallax_gold_color
        rgb 1
    }
    {
        blend parallaxmap
        map textures/test_parallax/parallax_gold_height
        scale 1 , 1
        min -2
        max 2
        //refineSteps 5
        //linearSteps 20
        grazingAngle 0.8
        offsetExternalShadows 0
        vertexcolor
    }
}

Textures.

I don't think md5 meshes can have vertex colors, so no bumpmaps:

This material should work out of the box on all .ase models exported from Blender. No vertex painting needed. If you want to apply it on a brush, then swap vertexcolor and inversevertexcolor in the material. In the video left half of the monkey's face has vertex paint so that part has a different shading.

  • Like 1
  • Thanks 1

It's only a model...

  • Arcturus changed the title to Polished metal material using parallax occlusion mapping
Posted

Unfortunately in certain light smooth shading is broken.

Materials:

Spoiler

textures/test/parallax_gold_only
{
    {
        blend diffusemap
        map _white
        ///rgb 0.0
        red        0.010
        green    0.003
        blue    0.0        
        inversevertexcolor
    }
    {
    blend bumpmap
    map _flat
    inversevertexcolor
    }
    {
    blend specularmap
    map _white
    rgb 0.05
    //red        0.25
    //green    0.22
    //blue    0.2
    }
    {
        blend diffusemap
        map textures/test_parallax/parallax_gold_fake_reflections
        red        0.4
        green    0.25
        blue    0.08
        scale 0.5 , 0.5
        shear 0.5 , 0.5
        vertexcolor
    }
    {
        blend    gl_dst_color, gl_src_color
        map        _white
        //rgb 1.5
        red        3.2
        green    3.0
        blue    2.0
    }
    {
        blend parallaxmap
        map _white
        ///scale 0.001 , 0.001
        min -2
        max 2
        //refineSteps 5
        //linearSteps 20
        grazingAngle 0.8
        offsetExternalShadows 0
        vertexcolor
    }
}

Spoiler

textures/test/parallax_gold
{
    {
        blend diffusemap
        map _white
        rgb 0.01
    }
    {
    blend bumpmap
    map textures/test_parallax/parallax_gold_local
    }
    {
        blend parallaxmap
        map textures/test_parallax/parallax_gold_height
        //scale 1 , 1
        min -0.04
        max 0.0
        //refineSteps 5
        //linearSteps 20
        //grazingAngle 0.8
        offsetExternalShadows 0
    }
    {
    blend specularmap
    map _white
    rgb 0.08
    //red        0.2
    //green    0.2
    //blue    0.2
    }
    {
        blend diffusemap
        map textures/test_parallax/parallax_gold_fake_reflections
        rgb 0.55
        scale 0.5 , 0.5
        shear 0.5 , 0.5
    }
    {
        blend    gl_dst_color, gl_src_color
        map        textures/test_parallax/parallax_gold_color
        rgb    4
    }
    {
        blend parallaxmap
        map _white
        ///scale 1 , 1
        min -2
        max 2
        //refineSteps 5
        //linearSteps 20
        grazingAngle 0.8
        offsetExternalShadows 0
        vertexcolor
    }
}

parallax_gold_fake_reflections.tga

Parallax stage uses no texture at all this time, just _white color.

It's only a model...

Posted (edited)

You don't need parallax mapping for making good metal surfaces. Diffuse / normal / specular combo will do, with a cubemap, if a metal is shiny enough.

If you need something that might actually be usable with parallax mappping, you could try making some crystals. This is where you need an effect of something being inside a semi transparent and refractive surface, which sounds like a perfect opportunity for parallax mapping.

Example:

 

Edited by peter_spy
  • Like 1
Posted

I haven't seen a good example of a highly polished metal in Darkmod yet. But yes, turns out you can make a good looking shiny metal using cubemaps only.

 

It's only a model...

Posted

Material-wise, the engine can do mostly what other non-pbr engines could do, like UE3 (with some limitations). The techniques are transferable to some extent. Just because noone was curious enough to try them out, doesn't mean they don't work. Since parallax mapping is pretty expensive in terms of performance, I'd leave that to cases where it really makes a visual difference :)

  • Like 1
Posted

Of course, it was too good to be true. I made this material by cranking up values, which had the added benefit of the bloom effect. But then I remembered that bloom works only in 64 bit mode. Turns out the material doesn't work in 32 bit mode.stlucia(2024-11-0200-49-33)(61.24-179_968.25).jpg.be20d325193440307059386a21e661e7.jpg

Ironically parallax stage from the previous materials works because it doesn't need 64 bit precision. What else doesn't work? The moon in my skybox.

stlucia(2024-11-0200-49-47)(61.24-179_968.25).jpg.75b272bab577837e56e01ba46f2616ea.jpg

It's only a model...

Posted

Here's gold material that works both in 32 bits

32bit_gold.thumb.jpg.c703eddac054612bcdc18bee372a05e3.jpg

and 64 bits

64bit_gold.thumb.jpg.6cddd0fe9f442ac39b62c8d72124bac7.jpg

Spoiler

textures/test/parallax_gold_only
{
    {
        blend diffusemap
        map _white
        //rgb 0.3
        red        0.5
        green    0.3
        blue    0.1        
    }
    {
    blend bumpmap
    map _flat
    }
    {
    blend specularmap
    map _white
    //rgb 1
    red        0.5
    green    0.2
    blue    0.0
    }
    {
        forceHighQuality
        blend gl_dst_color, gl_src_color
        cubeMap env/iron3
        texgen reflect
        rgb 12
    }
}

 

  • Like 1

It's only a model...

Posted
10 hours ago, Arcturus said:

I haven't used any material keywords that haven't been used already.

 

On 11/1/2024 at 6:21 AM, Arcturus said:

        //refineSteps 5
        //linearSteps 20
        //grazingAngle 0.8
        offsetExternalShadows 0

Besides, there will have to be some parameters to control parallax mapping I assume. And maybe some optimisation since the effect is expensive.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Holiday TDM Moddb article is now up: https://www.moddb.com/mods/the-dark-mod/news/happy-holidays-from-the-dark-mod
      · 0 replies
    • nbohr1more

      Cool thing: Thanksgiving break means I don't have to get my son up before dawn

      Not cool thing: My son stays up all night on my PC so I don't get much TDM time...
      · 3 replies
    • datiswous

      Does anyone know if the mission/map in this video posted by @Springheel can still be found somewhere and played? Looks like fun.
       
      · 2 replies
    • taffernicus

      I'm curious about doom and thief multiplayer netcode 😂 or how these games handle networking for multiplayer in general
      a youtube channel called battle(non)sense sometimes posts about netcode analysis
      · 2 replies
    • The Black Arrow

      Hey @Ansome, are you still around? I think it's been about 3 months since you've had an issue with an SSD, right?
      · 4 replies
×
×
  • Create New...