Planetside Software Forums

General => Image Sharing => Topic started by: dandelO on December 29, 2009, 10:14:12 PM

Title: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on December 29, 2009, 10:14:12 PM
A different method for sparkly snow using luminosity blended by a tiny fractal with huge negative colour offset to leave just spots, instead of the specular attempt I made a few days ago. This is similar to my night background node for stars but on the ground instead.

The falling snow in the distance is horrible, I think. I should have left that out.

[attachimg=#]

Thanks for looking! :)
Title: Re: Ice Cream
Post by: Tangled-Universe on December 29, 2009, 10:18:35 PM
Very nice result! Great!
To the far bottom left you see a group of fainter sparkles. This is the brightness I'm looking for. Your brightest sparkles are a tad too bright imo.
Now you only need a little bit more sparkles and you can choose to blend them out in the distance, I think that's more realistic.
Fantastic!

Martin
Title: Re: Ice Cream
Post by: Henry Blewer on December 29, 2009, 10:20:59 PM
Definitely on the right track. 8)
Title: Re: Ice Cream
Post by: dandelO on December 29, 2009, 10:36:42 PM
Cheers. The luminosity value was 4 for the glinting, maybe about 2 would be better if it looks too bright.

Here's a shot of it...
[attachimg=#]

The 'sparkles' surface layer(on the left) has 'apply colour' unchecked, it just provides luminosity on the basis of the 'sparkle function'(its blending shader).
The tiny scales of the function fractal are colour offset to -1.1, leaving just spots where the brightest points are.

Blending by distance would be good, yes.

* The speckling in the distant hills is actually failed cloud shader snowfall, not the snow surface layer.
Title: Re: Ice Cream
Post by: Tangled-Universe on December 30, 2009, 07:01:06 AM
Thanks for sharing this. I'm working on another approach as well and will share my findings too.
I don't think all your sparkles are too bright, only the brightest, therefore besides the settings you've shared already I'd like to know the contrast and roughness settings of the blending fractal. This greatly affects how that luminosity will be applied and should offer you the possibility to get sparkles with the same brightness or at least not so much variation.
I'd choose for high contrast and very low roughness and then either use the luminosity function or high color of the fractal to control the brightness of the sparkles. See what I mean?
Title: Re: Ice Cream
Post by: Zairyn Arsyn on December 30, 2009, 08:50:03 AM
Quote from: dandelO on December 29, 2009, 10:36:42 PM
Cheers. The luminosity value was 4 for the glinting, maybe about 2 would be better if it looks too bright.

Here's a shot of it...
[attachimg=#]

The 'sparkles' surface layer(on the left) has 'apply colour' unchecked, it just provides luminosity on the basis of the 'sparkle function'(its blending shader).
The tiny scales of the function fractal are colour offset to -1.1, leaving just spots where the brightest points are.

Blending by distance would be good, yes.

* The speckling in the distant hills is actually failed cloud shader snowfall, not the snow surface layer.


i will have to mess with something like this later on once my current render is done.
Title: Re: Ice Cream
Post by: Dune on December 30, 2009, 11:04:17 AM
Don't you get the problem with this method that the bright sparkles also turn up in shadowed areas? I'd like to see a render with more shadow, and indeed without the falling snow. I'm testing something at this moment, but I use a tiny fake stones layer+ reflective shader (+ a small scale blender with a - color offset).

By the way, I like your billowy snow.

---Dune
Title: Re: Ice Cream
Post by: dandelO on December 30, 2009, 06:10:01 PM
QuoteI'd choose for high contrast and very low roughness and then either use the luminosity function or high color of the fractal to control the brightness of the sparkles. See what I mean?

Yes, Martin, I have tried with many different variations in fractal colour settings. The contrast here is 1, while the roughness is default 5. This ensures that the spots of the blending are nice and bright when offset is dropped. Regardless of this fact, colour roughness has no effect here - all scales of the fractal are the same, there is nothing to roughen. ;) Contrast and offset is fine for controlling brightness, in this instance. I need a more constant method than a power fractal, I think, a one-octave perlin noise function input would be better controlled, easier to have a constant map of spots of more equal brightness, maybe even just some colour adjust shader levels to the fractal output before it feeds the luminosity shader.

The balance between offset/luminosity has very little margin for error, raising offset also brightens the spots and so makes the following luminosity brighter, you then need to rethink how bright that needs to be, it's very incremental.

QuoteDon't you get the problem with this method that the bright sparkles also turn up in shadowed areas?

I do indeed, Ulco, and it somewhat annoys me when I see it rendered. It has, however, been snowing here repetitively since about a week before Christmas and I have been observing real sparkles in the shadows aswell. Clearly not as bright or abundant as if in straight light but light can still be reflected from other sources.
It's trying to make it look convincing enough to believe when real life tells you otherwise. ;)

I'd still love a TG way to keep them out of the shadows, though! :D

Cheers, folks! :)
Title: Re: Ice Cream
Post by: Dune on December 31, 2009, 02:49:51 AM
I might have something, as explained in another topic (cannot recall which one, ah.. the one about the shadow function). Have to try it again today. Last chance this year!
Title: Re: Ice Cream
Post by: dandelO on December 31, 2009, 11:38:53 AM
QuoteThe 'sparkles' surface layer on the left has 'apply color' unchecked, it  will provides luminosity on the basis of the sparkles function. Thank you for sharing this information with us.

Yes, that's right, David. And this is also true for many other parameters in shaders, they don't all have to supply colour information to the node chain, even if they are listed as 'colour shaders'. :)

I'm now in the process of honing this shader. I'm using a perlin 3D scalar node in place of a power fractal now, it's far better suited to this task - one scale, colour adjusted to create a more even sparkle map. Everything can be controlled from the mother shader's parameters - snow colour/sparkle brightness/snow displacement/slope/alt' constraints etc. This will eventually be another single surface layer that can be easy dropped into scenes to cover your terrain with convincing snow and blended however you like with any other shader.

I have also restricted the sparkles by camera distance going from an eye-level POV(about '2m v,Y'), as discussed above. This can be easily adjusted by visiting the distance shader parameters if you need a higher POV, the distance shader is hidden and used as blend shader for the, also hidden, 'sparkle' nodes.
It'll be a simple setup, easy to use for any user.

I'm, at the moment, tackling some intersect underlying options so that close-up displacement is more convincing than it is now.

Pending...
Title: Re: Ice Cream
Post by: dandelO on December 31, 2009, 01:19:07 PM
A new preview with intersection rules applied for the snow-piling is rendering.

I think my slope constraints need a little less fuzzy-zone softness still. I'll post shortly...
Title: Re: Ice Cream
Post by: dandelO on December 31, 2009, 02:03:07 PM
There are still a few glaring problems. My fuzzy-zone softness, I think, needs to be tighter than '1', and the fractal displacement is kind of shady, too.
I also will raise the slope constraints, this is just to see how it reacts to slope. These constraints are '45' and fuzzy '5'.

The sparkle cut-off is at a decent level for a true scaled, eye-level POV. The scales/roughness of the snow shader displacement needs tuning. It's too full of fractal lines. I think I'm going to take this to the function level, aswell, to get more control over the surface displacement. I really don't like the fractal displacement.

All these settings are default for the snow surface layer; Colour = off-white/blue, Luminosity(or, sparkle function) = '1', displacement = '1'. You'll be able to pile snow upon terrain/displacements to any height. This is a POV of = 2m v'Y', or, roughly eye level, in real world scale.

[attachimg=#]

Stay tuned for better snow detail, I plan on really tuning this some more, I really do hate this fractal displacement...
Title: Re: Ice Cream
Post by: Mandrake on January 01, 2010, 10:28:42 AM
Very nice dandelO, you definitely achieved that sparkle affect! I like the first one best.
Looks like a great addition to your next pak!
Title: Re: Ice Cream
Post by: Henry Blewer on January 01, 2010, 10:30:53 AM
I usually cover these with a population or fake stones (the edges of the fractal). I have not figured out how to 'smooth' them yet.
Title: Re: Ice Cream
Post by: TheBlackHole on January 01, 2010, 11:44:28 AM
Try adding more octaves. That or a little more displacement with a smaller scale and smaller displacement. It worked in my "Rocky Hills" image (remember the first one? that had some fractal lines), so why not try it here?
Title: Re: Ice Cream
Post by: dandelO on January 01, 2010, 04:56:14 PM
Thanks, folks.

I'm still beating out the fractal lines... I have another idea to keep them at bay, will post any progress as and when.

Henry: I'm not sure I follow your meaning. Break up what with fake stones? The fractal lines?

TheBlackHole: Thanks for the suggestion. I'd like to keep it reasonably large scaled so deeper snow-piling doesn't 'spike' the surface when more displacement is required, adding smaller fractals would help with the lines but I think it'd also make it less snow-like, although snow flakes are tiny, their cumulation is quite smooth, rounded and large scaled, you rarely see rough, jaggy snow(unless it's disturbed, of course).
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 01, 2010, 06:04:14 PM
Here's a nasty test render of the surface layer on an out-the-box terrain, the fractal lines have been mostly ironed out.

Again, these are the layer's defaults - displacement = 1, Sparkle luminosity = 1. POV = 2m v' Y.

[attachimg=#]

Things are nearly coming together now, I'd like some translucency in here aswell, I'll play with that some more tonight...
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: aymenk2003 on January 01, 2010, 06:10:22 PM
That is nice ...more improvement ... and you'll get the realistic sparkle snow ...

N_KAID
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 01, 2010, 06:24:34 PM
Just different slope constraints...

[attachimg=#]
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 01, 2010, 09:27:20 PM
So, here's what I think is just about finished.

This is slope constraints of max = 45°, fuzzy zone = 5.
[attachimg=#]

And here its slope constraints are max = 60°, fuzzy zone 5.
[attachimg=#]

It's less streamlined than I'd hoped to make it because I needed to separate the snow surface and sparkles into 2 layers.
When translucency was added to the one-node setup it was cancelling out the sparkle function of the layer because the single node setup applied colour last, not below the surface. I could've packaged it all up inside other layers but then, there's the messing around inside the internal networks to find the important settings that are for editing, like slope/alt' constraints, displacement values, etc.

This way, with 2 separate channels, everything is at your fingertips. All the slope/alt/displacement controls are in the 'Snow layer', while translucency/sparkling settings follow that.



I'll upload this once I find out where the best place would be. If it's to go to the NWDA CS I'll need to document it and make sure all aspects are covered beforehand.

* Are there any glaring issues you can see that you think need addressing before I finalize this? It's a bit too translucent just now, I'll fix that, anything else, though?

This would be roughly the default settings for the Ice Cream shader.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 01, 2010, 10:47:07 PM
Fixed the translucency...

[attachimg=#]

cheers for any input. :)
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: aymenk2003 on January 02, 2010, 01:40:23 AM
I think you didn't sleep this night anymore ;D...
Nice render ...realistic snow...

N_KAID
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: domdib on January 02, 2010, 04:54:01 PM
It looks very impressive. What would help would be a larger render of the final version, to see clearly the distribution of the sparkles.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 02, 2010, 06:04:22 PM
I'm on it, dombib. I think I'm in the final tweaks stage now, I'll render some examples to show it off when I can...
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 02, 2010, 09:12:57 PM
Here's a couple of larger example images of the shader.

This first has default values - displacement = '1', Sparkles = '1', slope constraints = '45' degrees/fuzzy zone '5'. This is roughly what you'll get dropping the main file onto any out-the-box terrain.

[attachimg=#]

Edit to follow with different settings...
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 02, 2010, 09:55:00 PM
And this has: Slope constraints = '55' degrees/ fuzzy zone '5', displacement = '3m'(* see below for a small note on this setting).

[attachimg=#]

* Towards the lower right hand side, you'll notice that this displacement setting('3m') has almost reached its limits, displacement of the smallest scale of the 'snow displacement' node has now become 'speckled', it's slightly spiking here. Raising the displacement of the snow to 3m has, in turn, made it closer to my camera and now the POV is around v'Y = 1m. If you do need more than 2 or 3 metres of displacement at this close level POV, you will want to also raise the layer's displacement fractal 'smallest scale' to overcome the speckling. Generally, you won't need 3 metres of snow-pileup at an eye level POV, though, this is the way around it if you do need it.

Getting there...

Thanks for looking! :) Isn't it just begging for footprints? ;)
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Dune on January 03, 2010, 03:37:13 AM
Great work, Dandel0. To avoid the speckling of the snow, I use a large scale fractal anyway, and add another small scale fractal later in the pipeline, with a separate, lesser displacement. I'm looking forward to see what you did... still busy with mine.

---Dune
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Henry Blewer on January 03, 2010, 08:26:38 AM
I don't know which image to praise? I like all of them.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: domdib on January 03, 2010, 11:49:15 AM
Gorgeous! Plus also clever.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Tangled-Universe on January 03, 2010, 11:51:36 AM
Very nice work Martin, you have some very nice snow :)
I'm a bit surprised you use powerfractals for creating the volumetric snow. Anyhow, it is very nicely done.
What it needs now is a bigger scene to show off.

Martin
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 03, 2010, 01:46:19 PM
Thanks, Martin. Yes, I decided to keep the snow in fractal form. This'll make it easier all round for people of all skill levels to edit it, if required.
I have other attempts at functional perlin snow, too, but really, my fractal lines issue was the main hurdle I was facing. That is now fixed. The only functional part of the shader set now is the sparkle effect.

Frank has pointed out a small issue involving slope/intersection. It is just a small thing, however, and I've fixed it, for the most part, by slightly adjusting one of 2 separate 'effects' tab parameters(which one is the best fix yet, I'm not sure). It involves a dark outline, resembling a shadow at the intersection zone when close-up and when slope constraints are in place.

This issue can be easily fixed by lowering 'intersection shift'(a parameter that will not need adjusting when the shader is released, you won't have to worry about that) or, by reducing 'fuzzy zone softness'(in these images FZS is set to default = 1) in the same tab.
I mentioned this briefly a page or two ago here but I didn't think it was a very big problem.

I have got around this by reducing FZS by no more than half or, by reducing intersection shift by a factor of 10, from '0.1'(the setting for these previews) to '0.01'.

Both methods fix the problem, I think I'll go the FZS way to finalize it, though.

Cheers! :)
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 03, 2010, 03:13:08 PM
I take some of the last post back. I realise now that the smoothing effect is also having issues with this(just like Frank said to me. ;))

There are what appear to be some render artifacts when smoothing is set to '1'. Really, though, they aren't artifacts, they're shadows but they're from overhanging snow displacements, unwanted ones on a close up scale.

My fix now is to reduce FZS by a quarter(to about 0.75 probably) and to reduce smoothing effect to '0.85' from '1'. (I can't disable smoothing, Frank, it messes up what I'm going for but thank you for that little nudge, it has helped a lot. :)).
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Tangled-Universe on January 04, 2010, 05:37:50 AM
Ghehe, I really like reading this, because this is exactly what I had to figure out all when making my snowshader :D

Try reducing the smoothing effect further and compare it to a render without the snow, it will then be very clear what it does :)
In contrary to you I won't deal too much with FZS. I didn't find any noticeable effect using it. 90% of the deal is in the first 3 settings and 10% the rest.
The actual control of the volume is by the min and max shift and the zone controls the edges, simply put.

Martin
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 04, 2010, 06:07:48 PM
The fuzzy zone softness doesn't directly affect intersect underlying. Reducing this helps to give a more defined border between snow and ground, according to slope and height constraints fuzzy zones.

The way I see it(usually wrongly), default fuzzy zone softness of '1' makes a 'gradient' of the amount defined in the constraint's fuzzy zone. Lowering it makes it a tighter border between one surface to the next.

I'm having more and more little problems appear as this goes on, for instance, this piece looks beautiful but just turn my camera 20 degrees and then there's a big torn part of snow, ha! Give me until approximately December and I might be nearly finished with it. :D
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Tangled-Universe on January 04, 2010, 06:16:41 PM
Quote from: dandelO on January 04, 2010, 06:07:48 PM
The fuzzy zone softness doesn't directly affect intersect underlying. Reducing this helps to give a more defined border between snow and ground, according to slope and height constraints fuzzy zones.

The way I see it(usually wrongly), default fuzzy zone softness of '1' makes a 'gradient' of the amount defined in the constraint's fuzzy zone. Lowering it makes it a tighter border between one surface to the next.

I'm having more and more little problems appear as this goes on, for instance, this piece looks beautiful but just turn my camera 20 degrees and then there's a big torn part of snow, ha! Give me until approximately December and I might be nearly finished with it. :D

Ghehe,  I know, getting planet-wide same quality result is very difficult :D
You're definitely on the right track though.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: tempaccount on January 05, 2010, 03:42:35 AM
If you don't mind me asking, what are your intersect underlying settings for the snow cover? Your snow packs up quite nicely.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 05, 2010, 05:33:09 PM
The intersection rules are, for most of these images; Intersection zone - '1', shift = '0.1', min' shift '0.1'.

This project is now on a hiatus. I will resume this and hopefully make it much nicer(I've now scrapped the luminosity completely, it ruins areas that it shouldn't appear on at all, even areas with no snow, I'm finding there are still sparklies on the ground).

I'll work on this snow some more when I can, for now I'm back at my own PC and there really isn't any point in carrying on with this at the moment. The image in the previous page that says... 'Fixed the translucency' is now taking me 40+ minutes to render on my own pc, 40 odd minutes at 640x480! I think not.(I hijacked my children's new computer recently(one we bought them for Christmas, it's about 1000 times better than this) and I really cannot justify the time I'll need to spend to simply tune the creases and tears out of this shader on this old beast, that I hope to share, once it's done.

On the bright side, Christmas is over and I only have one birthday in February to occupy my meagre wages in the meantime. I hope to get all computered-up in the weeks(probably months) to come and this will be the first thing I go back to once I am sorted.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 07, 2010, 01:16:02 PM
When you're banging your head against the TG brick wall, just take a step or two back from it for a while.
No idea why I didn't take my own advice when I said I was thinking to make this thread's previous images (luminosity)sparkles from of a perlin function. Christ may know why I didn't apply this brainwave to the failed fractal specular attempts from the other thread. I don't. :D

[attachimg=#]

I need to tone down the plasticy effect again and I'd like less sparkle bloom...

It's all only one shader node again, too.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: FrankB on January 07, 2010, 02:06:29 PM
looking very good :)
congrats!
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Tangled-Universe on January 07, 2010, 02:27:55 PM
Quote from: FrankB on January 07, 2010, 02:06:29 PM
looking very good :)
congrats!

Indeed! Keep m coming :)

Martin
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Henry Blewer on January 07, 2010, 05:42:29 PM
WOW. It looks like the refrozen snow after a partial thaw.  8)
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: domdib on January 07, 2010, 06:22:50 PM
Please keep the sparkle bloom! - I was looking at some sparkly snow tonight and it is BRIGHT.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 07, 2010, 06:44:29 PM
I have, dombib. I just think the bloom is a bit too bright here. I've since raised specular roughness a bit to tighten up and pinpoint the sparkles a little more.

Henry. Yes, it is like ice. The translucency is tricky to manage and kind of makes it plasticy. Once it's done(if it's ever) I'll detail how to flip from icy settings to snowy settings. How to go about doing it is another matter, powdery snow that still sparkles and has any translucency applied is quite hard to balance. My current attempt(not here yet) is an experiment with different translucency colour, the hue of the sky, clearly not of the same saturation, though, ha! That'd be real plasticy.
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Henry Blewer on January 07, 2010, 06:57:29 PM
I hate to throw sand, but you may find the setting will have to be tweaked eachtime different light conditions are used. Sorry...
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 07, 2010, 07:21:04 PM
Aye. Indeed. :D
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Dune on January 08, 2010, 03:06:07 AM
Great snow, Dandel0. My compliments!
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: Thelby on January 08, 2010, 03:50:31 AM
Man, you guys are amazing!!!
Title: Re: Ice Cream - Shader progression 1/1/10 - page 2...
Post by: dandelO on January 08, 2010, 03:07:31 PM
Just a quick 64 frame test to see how the sparkles manage lightsource movement. Nothing great. They still appear quite static but they do change accordingly. If it were camera movement instead of the Sun it'd be a bit more convincing, I think.

http://shlwvg.bay.livefilestore.com/y1pVFXIXS5knWTNeP8K2nNAjNkcvGFquCCtDwqzymLu_MNyWVlzvhjlLs7fsvUPPC2JjNOFw2IFFrLIhnisYB6xpuChI1Gnx4Tf/snow%20anim.gif

* Also, I've managed to overclock my machine somewhat so it's not as slow as before. It still sucks but on the scene I'm rendering as a test(the last sparkly still image in this thread) I'm saving one third of the time. Wish I'd done that before this animation test rendered! :D