Arcturus Posted October 29 Report Posted October 29 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. 1 1 Quote It's only a model...
Arcturus Posted November 1 Author Report Posted November 1 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. Quote It's only a model...
Arcturus Posted November 1 Author Report Posted November 1 Turns out you can cram a cubemap on top of it too. Quote It's only a model...
peter_spy Posted November 1 Report Posted November 1 (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 November 1 by peter_spy 1 Quote Artstation stuff
Arcturus Posted November 1 Author Report Posted November 1 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. Quote It's only a model...
peter_spy Posted November 1 Report Posted November 1 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 1 Quote Artstation stuff
Arcturus Posted November 1 Author Report Posted November 1 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. 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. Quote It's only a model...
peter_spy Posted November 2 Report Posted November 2 Btw. will there be a list of available parameters exposed for use in materials? A dedicated page in the wiki maybe? Quote Artstation stuff
Arcturus Posted November 3 Author Report Posted November 3 I haven't used any material keywords that haven't been used already. Quote It's only a model...
Arcturus Posted November 3 Author Report Posted November 3 Here's gold material that works both in 32 bits and 64 bits 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 } } 1 Quote It's only a model...
peter_spy Posted November 3 Report Posted November 3 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. Quote Artstation stuff
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.