Flexman Posted September 22, 2013 Share Posted September 22, 2013 I'll preface by saying this is for Leadwerks 2.5x I'm adding some seasonal variation to our game (simple test map shown below) through changing the base colour of the terrain layers. I know some of you chaps have tried or done this before. Do you have any tips on how to incrementally lighten/blend snow on the tree and vegetation models? Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
shadmar Posted September 22, 2013 Share Posted September 22, 2013 Like this ? http://www.leadwerks.com/werkspace/page/gallery/_/snow-on-everything-by-shader-r99 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted September 22, 2013 Share Posted September 22, 2013 The height-based blend technique used in the Leadwerks 3 terrain shader would work really well for this. You would get crystals of snow appearing first, then larger clumps, then full coverage. The math is pretty straightforward so you should be able add it to the Leadwerks 2 shader. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Flexman Posted September 22, 2013 Author Share Posted September 22, 2013 Like this ? http://www.leadwerks.com/werkspace/page/gallery/_/snow-on-everything-by-shader-r99 Ah, I remember this now Shadmar. Looks perfect. Is it possible to download this shader so I can try in my project? I'm reasonably happy with the terrain but would be better with a custom blend technique. If I can match the vegetation models and building meshes with Shadmar's snow then that would be job done. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
shadmar Posted September 22, 2013 Share Posted September 22, 2013 Here are the ones I used for the picture above : There are a few shader variants : diffuse+snow diffuse+snowmap texture diffuse+snowmap texture and bumped snowmap diffuse+bumpmap+snow diffuse+bumpmap+snowmap texture diffuse+bumpmap+snowmap texture and bumped snowmap If you want to adjust snow strenght (thickness) you can adjust uniform float SnowMultipler=4.0; in mesh.frag or use a SendShaderFloat("SnowMultipler",float) from your app or editor in lua. baseshader.zip You need to replace mesh.frag and mesh.vert in your shaders.pak in the mesh directory. They are using preprosessor directives so they won't change existing shader functionality. snowshader_and_mats.zip Just some example mat files and shaders to go with them, plaus a snow texture and a diffuse texture with bumpmaps. baseshader.zip snowshader_and_mats.zip 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.