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.

  • 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 Guest
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 :)

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

Btw. will there be a list of available parameters exposed for use in materials? A dedicated page in the wiki maybe?

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

    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 0 replies
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence. 
      Ralf Hütter, Kraftwerk
      · 5 replies
    • taaaki

      The post editor for the dark themes should be working again. Apologies for the inconvenience.
      · 1 reply
    • jaxa

      Talk GabeCube:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/39/#findComment-508710
      · 3 replies
    • The Black Arrow

      Things have been so bad these days for me...
      Just a year ago, I've been feeling dizzy, I thought it was nothing, today's stress, that type of thing, went to sleep...Still dizzy! 9 more days dizzy, went to doctor (I would have gone on the first day if NOT for the long appointment time)
      Said it may be Neck Dizziness...I did exercises for 6 months, no changes.
      Went to a Physical Therapist, went to another, no changes.
      I've asked my doctor for a full check this time.
      I hated yesteryear so much due to personal reasons, this year might be the same.
      To be brutally honest, I'd rather have cancer or/and chronic pain than suffer dizziness any second longer, especially when nothing helps.
      Hard to enjoy Thief when you're dizzy so I was hoping this year, Winter will be best for me.
      · 7 replies
×
×
  • Create New...