Popular Post Arcturus Posted November 3 Popular Post Report Posted November 3 Now that we figured out in a roundabout way that Darkmod can have good looking metal, can we think about improving existing assets? Spoiler 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 in stead of gold. 4 2 Quote It's only a model...
peter_spy Posted November 3 Report Posted November 3 (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 November 3 by peter_spy Quote Artstation stuff
Arcturus Posted November 3 Author Report Posted November 3 @peter_spy It works in darkness: 3 Quote It's only a model...
peter_spy Posted November 3 Report Posted November 3 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. Quote Artstation stuff
Arcturus Posted November 3 Author Report Posted November 3 @peter_spy This version works in 32 bits too. There's only slight difference in appearance between 32/64 bit modes. Quote It's only a model...
Arcturus Posted November 3 Author Report Posted November 3 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 } } Quote It's only a model...
peter_spy Posted November 3 Report Posted November 3 Here's the effect I'm getting just by changing the blend mode for the cubemap: 1 Quote Artstation stuff
peter_spy Posted November 3 Report Posted November 3 Anyway, you have an interesting development there, because my cubemap setup glows in the dark, and I have a shaderParm3 set up in the model to tone it down: 1 Quote Artstation stuff
Arcturus Posted November 3 Author Report Posted November 3 @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. 1 Quote It's only a model...
nbohr1more Posted November 3 Report Posted November 3 @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 2 Quote Please visit TDM's IndieDB site and help promote the mod: http://www.indiedb.com/mods/the-dark-mod (Yeah, shameless promotion... but traffic is traffic folks...)
Wellingtoncrab Posted November 3 Report Posted November 3 @Arcturus wow this blend gl_dst_color, gl_src_color blend mode on the cubemaps is like magic. Especially in darker scenes where it was very hard to get across any kind of metalness effect - this seems to have just the right amount of ambient reflectivity. Great find! 2 Quote -= IRIS =- ♦ = SLL =
Arcturus Posted November 3 Author Report Posted November 3 @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. 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. 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. 1 Quote It's only a model...
Wellingtoncrab Posted November 3 Report Posted November 3 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. Quote -= IRIS =- ♦ = SLL =
Arcturus Posted November 3 Author Report Posted November 3 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. 1 Quote It's only a model...
Wellingtoncrab Posted November 3 Report Posted November 3 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! 4 Quote -= IRIS =- ♦ = SLL =
peter_spy Posted November 3 Report Posted November 3 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". Quote Artstation stuff
peter_spy Posted November 3 Report Posted November 3 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. Quote Artstation stuff
Arcturus Posted November 3 Author Report Posted November 3 The metal on the priest would have to be dimmer to match the rest of the model. 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. 2 Quote It's only a model...
peter_spy Posted November 4 Report Posted November 4 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. Quote Artstation stuff
Arcturus Posted November 4 Author Report Posted November 4 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. Quote It's only a model...
Arcturus Posted November 4 Author Report Posted November 4 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: 32 bit: 1 Quote It's only a model...
Wellingtoncrab Posted November 4 Report Posted November 4 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) 1 Quote -= IRIS =- ♦ = SLL =
chakkman Posted November 4 Report Posted November 4 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 in stead of gold. I think the exaggerated reflections on the bottle and the skull don't look good. The cross is great though. 1 Quote
peter_spy Posted November 4 Report Posted November 4 (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 Edit 2: source https://modwiki.dhewm3.org/MaskAlpha_(Material_stage_keyword) Edited November 5 by peter_spy Quote Artstation stuff
Arcturus Posted November 5 Author Report Posted November 5 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). To make it look more like gold, the diffusemap had to modified. ..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. Quote It's only a model...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.