nbohr1more Posted November 7 Report Posted November 7 Time to ping @cabalistic 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...)
peter_spy Posted November 7 Report Posted November 7 (edited) 7 hours ago, Arcturus said: Does maskalpha work at all? It doesn't seem to do anything. I think it is supposed to be working when you want to use an alpha you made from one texture in another texture, like this: Spoiler textures/custom/maskedAlpha { { maskcolor map textures/custom/usethisalpha.tga } { blend blend maskalpha map textures/custom/dontusethisalpha.tga } } As for the cubeMap, vs. cameraCubeMap, remember that those are / were not exactly the same things. CubeMap is used when you project it on convex surfaces, like ingame objects. CameraCubemap is used to project the cubemaps onto concave suraces, like a skybox sphere with faces inverted inwards. Edited November 7 by peter_spy Quote Artstation stuff
Arcturus Posted November 7 Author Report Posted November 7 4 minutes ago, peter_spy said: I think it is supposed to be working when you want to use an alpha you made from one texture in another texture, like this: Reveal hidden contents textures/custom/maskedAlpha { { maskcolor map textures/custom/usethisalpha.tga } { blend blend maskalpha map textures/custom/dontusethisalpha.tga } } I wasn't able to get it to work. 1 Quote It's only a model...
nbohr1more Posted November 8 Report Posted November 8 To clarify, maskAlpha is really just a command that says "in this stage, leave the alpha channel alone. don't write anything to alpha and ignore any alpha in the texture mapped to this stage" https://iddevnet.dhewm3.org/doom3/materials.html { blend gl_dst_alpha, gl_one maskalpha cubeMap env/gen2 red Parm0 green Parm1 blue Parm2 texgen reflect } Quote The third stage is the main color stage. Because 'blend' references gl_dst_alpha, the color value depends on the alpha value set in stage 2. Normally we would just put the alpha value directly in the image map, but this stage uses a 6 sided cube map texture, which moves with the viewer (because of texgen reflect). We don't want the alpha channel to move, however, so we have to set it in a different stage. 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...)
Arcturus Posted November 8 Author Report Posted November 8 @nbohr1more This stage is gonna work the same way if you delete maskalpha. It doesn't seem to do anything at all in Darkmod. It could be very useful if maskalpha worked the way I think it should work. Quote It's only a model...
Arcturus Posted November 8 Author Report Posted November 8 I noticed that blend gl_dst_color, gl_dst_alpha used with a black and white mask, makes surfaces reflect the cubemap in two different ways. That got me thinking. This kinda sorta looks like a ceramic surface mixed with metallic. Those stages can be stacked on top of each other. Spoiler textures/test/blend_shaders { bumpmap textures/test/star_local diffusemap textures/test/star_color { blend specularmap map textures/test/star_s red 0.5 green 0.4 blue 0.2 } { maskcolor map makealpha (textures/test/star_mask_inverted) } { forceHighQuality blend gl_dst_color, gl_dst_alpha cubeMap env/blender/blender rgb 1 texgen reflect } { maskcolor map makealpha (textures/test/star_mask) } { forceHighQuality blend gl_dst_color, gl_dst_alpha map textures/test/star_color rgb 1 } } This works both in 64 and 32 bit modes. It does't have proper fresnel and whatnot, but If we could control the blurriness of the reflection with a roughness map, then I think we're onto something. Quote It's only a model...
Arcturus Posted November 8 Author Report Posted November 8 Just by adding fine grain noise in the normal map, the glossy reflection completely disappears. 1 Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 Using detail normalmap as a way to control surface porosity seems like an overkill Especially since blending two normalmaps together (base + detail) is such a hassle on shader level. Having multple and complex stages in the shader increases the amount of times surfaces have to be redrawn, so it's also performance intensive. The only solution I thought of would be to have different cubemaps for different metals, depending on how polished the're meant to be. If I want slightly duller surface, I'd use a blurred generic cubemap with alpha mask. If the metal is polished, I'd switch it to an envshot from a certain location. At this point, it would probably be more efficient to port PBR solution from RBDoom3BFG, so you can control all of this with a single roughness map. Every hacky or convoluted solution increases material authoring time, and I guess most people have neither time nor energy for that. Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 @peter_spy I was referring to the @nbohr1more 's proposition: Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 Yeah, but is it worth the effort? Why not have the complete PBR solution anyway, instead of sort-of-trying to mimic it. Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 I'm just a lowly artist so I try to work with what I have. Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 You can still get similar results with diffuse+normal+specular+masked cubemap then. It just requires a lot more manual tweaking. PBR would be another can of worms with existing assets though. Not sure if there's any good way of making the transition. Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 16 minutes ago, peter_spy said: You can still get similar results with diffuse+normal+specular+masked cubemap then. It just requires a lot more manual tweaking. The earlier method for mixing metallic / non-metallic in a single material has its drawbacks. It doesn't work in 32 bit mode, so you get a material that's different for different users. You can't tweak it exactly as you like in 64 bits without breaking it for 32 bit users. It doesn't work well with current frob highlight, and while it's not the end of the world, it inverts colors in the cubemap, which is stupid. Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 I meant the cubemap with gl blend mode using alpha, not the color. The color has too many drawbacks and it's unpredictable, as you demonstrated. Even materials with bright diffuse and specular textures get very dark. It will be hard to control the whole thing. Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 @peter_spy Now I'm not quite sure what you're referring to. Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 I'm referring to this setup: Quote { maskcolor map makealpha (textures/etc.) alpha 1 * parm3 } { blend gl_dst_alpha, gl_one maskalpha CubeMap textures/etc. texgen reflect } Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 This will make the glossy bit glow in complete dark. I used negative RGB values as a hack to avoid that, but that only works in 64 bits. Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 That's why I have alpha 1 there, multiplied by parm3. You can set shaderparm3 in the model to make it darker. Should work the same in both 64 and 32 bit, as long as you don't exceed the 0-1 range. Quote Artstation stuff
Arcturus Posted November 9 Author Report Posted November 9 It will still glow in complete darkness a little bit. Plus, fainter reflections look less like metal and more like a clear-coat type of shader. 1 Quote It's only a model...
peter_spy Posted November 9 Report Posted November 9 None of these solutions is without major flaws, it seems. I try to set up proper diffuse + specular look first, then add cubemap reflections if that's not enough. But to get something similar to a PBR model, we'd probably have to just switch to it. Quote Artstation stuff
peter_spy Posted November 10 Report Posted November 10 (edited) 18 hours ago, Arcturus said: fainter reflections look less like metal and more like a clear-coat type of shader. For metals, you'd have to author your cubemap a bit more. If you just added that studio cubemap or envshot made in the game, you need to tint these images with the color of your metal, it's not done automagically. This is where the dst_color blend mode has its advantage I guess. Edited November 10 by peter_spy Quote Artstation stuff
stgatilov Posted November 10 Report Posted November 10 It was experimental shader which was never released properly. And I don't see why it should be helpful here. The experimental shader could compute reflection from the floor based on cubemap reported above the floor. As far as I see, @Arcturus mostly tests small objects inside the room, where ordinary env. map works fine. Quote
Arcturus Posted November 11 Author Report Posted November 11 Blurry cubemap - gradient with a bit of noise. 1 Quote It's only a model...
Arcturus Posted November 12 Author Report Posted November 12 I uploaded to the repository a test map with all the loot and most of the NPC models. There are levers to switch between white and orange lights. Can be expanded further. 1 Quote It's only a model...
Arcturus Posted November 13 Author Report Posted November 13 Here's the map if someone's interested: test_metal_map.zip I loaded all skins from one of the paintings. Most of the frames are presumably gilded wood (like this). Spoiler Bags are glowing in the dark (but not the gemstones). Spoiler Gold has a wide range of colors. Spoiler 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.