Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

I proposed that a few years ago, but my initiative was dismissed. Also, IIRC any blend mode except diffuse, normal and specular works in an unlit mode. Have you tried these materials in complete darkness? Typical problem with cubemaps is that they shine in the dark.

Edited by peter_spy
Posted

Looks promising, although when I switched my cubemaps to this mode, the whole material went very dark. With proper textures and masks, this would probably require boosting diffuse and specular beyond rgb 1? No problem with 64-bit color range, of course.

Posted

Having said that, I'm testing on the latest build, not the "retail" version of the mod. Here's the modified tdm_hammer_loot material, for example:

Spoiler

tdm_hammer_loot
{
    qer_editorimage    textures/darkmod/metal/flat/gold01_ed
    metal

    bumpmap    models/darkmod/props/textures/thehammer_medium_stone_local
    {
        blend diffusemap
        map textures/darkmod/metal/flat/gold01
        rgb 0.5
        //red        0.5
        //green    0.3
        //blue    0.1        
    }
    {
    blend specularmap
    map textures/darkmod/metal/flat/gold01_s
    //rgb 1
    red        1.0
    green    0.6
    blue    0.0
    }
    {
        forceHighQuality
        blend gl_dst_color, gl_src_color
        cubeMap env/iron3
        texgen reflect
        rgb 14
    }
}

 

It's only a model...

Posted

@peter_spy I see that the "env/iron3" cubemap was only just recently added to the repository. So if you don't have it, change it to something else, like "env/gen3". There could be some other difference between latest build and 2.12.

  • Thanks 1

It's only a model...

Posted

@Wellingtoncrab 

blend gl_dst_color, gl_src_color

I've seen used in some Darkmod materials, but not necessarily to blend cubemaps.

I don't know if it's possible to make a material with a mask that wouldn't glow in the dark.

glow_mask.thumb.jpg.6a0583b0a7eb7e45a853b00549408299.jpg

glow_mask_2.thumb.jpg.9611b2c262e2cc86942cab48bc6a8b05.jpg

I've seen the maskcolor keyword used in those coins, so I tried to copy it. They are lit a little in complete darkness too.

coins.jpg.638a6b6bd0a2d39c7c8ebc4925ac3a2c.jpg

This mask feature would be perfect for lit windows, if it hasn't been used there already, since you can mix normal diffuse shader with lit, glowing one.

  • Like 1

It's only a model...

Posted
4 minutes ago, Arcturus said:

I've seen the maskcolor keyword used in those coins, so I tried to copy it. They are lit a little bit in complete darkness too.

Yes I used a mask color and a custom mask ahead of the cubemap stage on many "metallic" assets, or ones with mixed materials, so they still provide some sense of reflectivity without a light to interact with the specular.

I think this still work well for duller metals such a coin - but I will definitely be using your polished metal trick to update some of the ingots.

-=  IRIS  =-    ♦    = SLL =

Posted
3 hours ago, nbohr1more said:

@Arcturus

Please go ahead and commit new materials and update any skins or models you prefer.

I would greatly appreciate seeing proper metals in the next TDM dev build :)

Something tells me that if we upgrade all of the loot, someone will complain. This skull for example uses generic metal texture textures/darkmod/metal/flat/tiling_1d/gen_smooth_gold01 . I hope nobody used it for anything else than actual gold.

  • Like 1

It's only a model...

Posted
10 minutes ago, Arcturus said:

Something tells me that if we upgrade all of the loot, someone will complain. This skull for example uses generic metal texture textures/darkmod/metal/flat/tiling_1d/gen_smooth_gold01 . I hope nobody used it for anything else than actual gold.

Since the skull is a loot item and has a def you could probably just make a new material and specify a new skin for it?

I never was able to finish these polyhaven conversions as they were pretty looking outside of PBR, but with this blend mode they still need some work but are a lot closer!

 

  • Like 4

-=  IRIS  =-    ♦    = SLL =

Posted
17 minutes ago, Arcturus said:

Something tells me that if we upgrade all of the loot, someone will complain. This skull for example uses generic metal texture textures/darkmod/metal/flat/tiling_1d/gen_smooth_gold01 . I hope nobody used it for anything else than actual gold.

Maybe a new loot pack will do, although that depends on mapper adoption. That wine bottle is one of the worst cases that could use addressing. Other bottles use specularity and are just junk, while the og version looks flat as hell. Also goblets, vases, all those are very inconsistent and it would be great if you could distinguish junk from loot just by looking at it and not remembering that this is "TDM special case".

Posted
2 hours ago, Arcturus said:
blend gl_dst_color, gl_src_color

When used with textures, it works like Overlay mode in Photoshop. With "perfect gray" color (rgb 128) color, it does nothing. Higher or lower values either brighten or darken the picture.

Posted

The metal on the priest would have to be dimmer to match the rest of the model.

ie8npjR.jpeg

Cubemap with cobblestones may not be the best choice for loot, something less busy would have been better. And depending on the size of the object, higher resolution.

8OYZOnF.jpeg

 

  • Like 2

It's only a model...

Posted
2 hours ago, peter_spy said:

Please let us know if you find a solution that is working with cubemap masks, since perfectly clean and polished surfaces are a rare thing, unfortunately.

I found a hack that looks nice and doesn't glow in the dark... but it works only in 64 bit mode.

17 hours ago, Wellingtoncrab said:

Since the skull is a loot item and has a def you could probably just make a new material and specify a new skin for it?

I was hoping that all existing maps would get automatic visual glow-up out of the box.

It's only a model...

Posted

So, if blending the cubemap with alpha results in an image glowing in the dark, then what will happen if we multiply by negative values:

Material:

Spoiler

textures/test/blend_shaders
{
    bumpmap textures/test/star_local
    diffusemap textures/test/star_d
    {
        maskcolor                
        map makealpha (textures/test/star_mask)
    }
    {
    blend    specularmap
    map    textures/test/star_s
    red        0.8
    green    0.5
    blue    0.2
    }
    {
        forceHighQuality
        blend gl_dst_alpha, gl_one
        cubeMap env/gen3
        texgen reflect
        red        -3.5
        green    -4
        blue    -6
    }
}

Unfortunately it gives different results in 32 bits:

In this example diffusemap is white, yellow color comes from the values in the material. If the star in the diffusemap was a little bit yellow, it wouldn't look as different.

Cubemap reflected in priest's belt, 64bit:

KI17TiO.jpeg

32 bit:

JqVyM0e.jpeg

  • Like 1

It's only a model...

Posted
2 hours ago, Arcturus said:

I was hoping that all existing maps would get automatic visual glow-up out of the box.

They would - just edit the skull loot def to point at your new skin and then every instance of the skull loot entity in every map will have the new material by default without having to edit the generic material.

(unless the mapper has already edited this - then presumably wouldn’t want to overwrite it anyway)

  • Like 1

-=  IRIS  =-    ♦    = SLL =

Posted
On 11/3/2024 at 9:26 AM, Arcturus said:

Now that we figured out in a roundabout way that Darkmod can have good looking metal, can we think about improving existing assets?

  Reveal hidden contents

gold_material
{
metal
    {
        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
    }
}

It always bothered me that our thief would steal cheap plastic

hu8aCRV.jpeg

in stead of gold.

eBOT1FM.jpeg

 

I think the exaggerated reflections on the bottle and the skull don't look good. The cross is great though.

  • Like 1
Posted (edited)
19 hours ago, Arcturus said:

textures/test/blend_shaders
{
    bumpmap textures/test/star_local
    diffusemap textures/test/star_d
    {
        maskcolor                
        map makealpha (textures/test/star_mask)
    }
    {
    blend    specularmap
    map    textures/test/star_s
    red        0.8
    green    0.5
    blue    0.2
    }
    {
        forceHighQuality
        blend gl_dst_alpha, gl_one
        cubeMap env/gen3
        texgen reflect
        red        -3.5
        green    -4
        blue    -6
    }
}

What does the makealpha do in that stage before specular map? Don't you have to place it before cubemap stage and add maskalpha after the blend mode to make it work? Like this:

Spoiler

  {
        maskcolor
        map makealpha (image_to_make_alpha_from)
        alpha 1      // adjusts cubemap intensity if needed
    }
    {
        blend gl_dst_alpha, gl_one
        maskalpha
        CubeMap    path_to_cubemap
        texgen        reflect
    }

At least that's the working example I know.

Edit: Hmm, looks like that maskalpha keyword is redundant with cubemaps, nothing changes when I delete it :D

Edit 2: source https://modwiki.dhewm3.org/MaskAlpha_(Material_stage_keyword)

Edited by peter_spy
Posted

This is the second time when negative blending turns out very useful, but is hindered by the 32 bit mode. So my question is, how important is to still support it?

You can get a nice looking glass material. One drawback is that negative blending doesn't work well with current frob effect (in pure darkness).

napiLHt.jpeg

To make it look more like gold, the diffusemap had to modified.

4XCwsIc.jpeg

..actually, in this case perhaps it's not impossible to make something that looks ok in 64 bit and looks similar to the old material in 32 bit.

cc8jkBg.jpeg

 

It's only a model...

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

      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.
       
      · 1 reply
    • 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
    • Sotha

      Brushes: ~1300
      Patches: ~990
      Entities: ~960
      Ambients: Done, EFX: Done, Objectives: Done, Briefing, Done, Location System: Done.
      Going to final polishings before beta.
      · 0 replies
×
×
  • Create New...