View Full Version : snow shader?

12-01-2012, 04:14 PM

At the moment Im working on an exterior scene, and have to render it in different times, with and without snow. But the scene is very large, and adding a snow layer (often just use a white gradient) on every surface for every object in scene can be very much work. And then, when I want to render the images without snow, I have to go through all surfaces and deactivate the snowlayer again. No Fun.

So my Idea was that there should be a plugin or script, wich can automatically add/delete a gradient snowlayer to all of your surfaces in the whole scene.

I tried to write a lscript wich could do this, but It seems that there is no way to set values of gradients?

Is there maybe a way to do this in phyton?

Or is there already a snow plugin existing I dont know?

12-01-2012, 04:20 PM
If you would start using nodes, your life would be easier..

12-01-2012, 04:37 PM
why that? Is there a way to attach a gradient to all surfaces?

12-01-2012, 04:49 PM
Do you have obsesion about gradients? ;)

Noo... What for attaching gradient which you can't edit keys (in the all surfaces simultaneously)?!

But in nodes you could simply add Material Switcher, 1st material without snow, 2nd material with snow.
State control using null item Y position. If Y=0, there is picked up 1st material, Y=1 there is picked 2nd material.
And no need to go through all surfaces just to disable some obsolete surfacing layer..
Simply move null up and down.

Whole this functionality could be put to TrueGroup.
One input material - original without snow, output material without snow or with snow depending on state of null.
Group plugged to Material input in Surface node.
When used Storage File mode there would be just one editable place - so there you could put gradient or whatever, and all surfaces of all objects where group was used could see and use it..
Group node is like jumping to subroutine in programming.
Subroutine can be called from unlimited number of places.
You just have to call it.
Then you edit subroutine and every place calling it, utilize new functionality.

12-02-2012, 02:22 AM
Or is there already a snow plugin existing I dont know?
Actually - recently I was surprised that the old legacy LW_SNOW shader does a nice job still in making some pretty good snow coverage. Its not quite intuitive (the GUI obviously looks as legacy as it gets) but worth a look to see if it does what you need - and easier to disable on and off then a gradient inside a texture on a surface parameter. :)

That said, what Sensei also says is a good idea if you don't mind the initial setup - It gives you a simple switch option which makes it faster to worth with as well. :thumbsup:

12-02-2012, 05:40 AM
thank you both very much for the feedback. I added a gradient alpha to every surface with y distance using a null object, and it works GREAT! When moving the null to 999 meters, everything is snowfree, when lowering the null to 1m there is snow in the whole scene... wonderful.

Its not as comfortable as it probably could be in my imagination (still hoping for a plugin wich can do this a bit faster, easier and with some nice features) but very very helpful indeed.

12-02-2012, 05:53 AM
Adding snow to the whole scene is too specific - so there is no commercial sense in it.
But you probably saw Global Materials (http://globalmaterials.trueart.eu) - all materials can be edited from one global Node Editor. With one input Global Material overriding everything.
But you have to go "new way" of surfacing (nodes), not legacy..

If snow is covering entire scene, making snow only (or ambient occlusion which is more common) scene is as simple as plugging snow/AO material to Global Material input in GM Node Editor.
Like I am doing here with chess scene (it has two surfaces)
or in this where is >20 surfaces

12-02-2012, 05:55 AM
Sugar/Snow Node-based Shaders:

12-02-2012, 06:08 AM
There's also this thread: http://forums.newtek.com/showthread.php?114259-Winter-House-scene

Hope it helps :)

PS: thanks for the link OFF :thumbsup: