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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...