Anisotropic Reflective Shader

Started by dandelO, December 09, 2010, 08:53:07 pm

Previous topic - Next topic

dandelO

December 09, 2010, 08:53:07 pm Last Edit: December 10, 2010, 11:00:04 pm by dandelO
Over the last couple of nights I've been trying to create some anisotropic reflective surfaces procedurally. Getting somewhere now.
These test images are of the old version I was throwing around, they're rough and have no real consistency in their scales.(I was using a Perlin noise driven by sin scalars so, the patterns were random).

I've now got a nice uniform brushed-grain distribution, by losing the Perlin and simply squaring the sin function. More images of that to follow, these are old ones.

Just some early proof of concept shots.

[attachimg=#]

[attachimg=#]

A couple of nasty ones where I've been trying to conform to the spherical surfaces;
(The specular roughness was too low on my spheres so, I picked up a few too many blooms here)
[attachimg=#]

[attachimg=#]

You can see the reflections are being scattered instead of the hard edged default settings. Before someone says; "Why not just use the 'reflection softness' parameter to blur the reflections?" Well, that's not really the same thing. And also, I have no patience to waste on that area since, at final render detail of '1' and max' reflection samples, you'll get a lovely output like this(I couldn't be bothered to let it finish);

[attachimg=#]
________________________________________

The more clued up of you will know that final reflectivity is extremely optimised(I think it's optimised to much the same degree as water transparency - Render detail = '1'/Reflection detail = 0.25, this will probably be where the nasty reflection softness 'bug' comes from so, for full quality soft reflection to work you'd need a final render detail of '4').
All of these images were rendered at detail '1', and while that's still only 1/4 final reflective detail, I'm not facing too much pain in the arse at that. I will say that rendering these at detail '2' takes 4 times as long so, I'm trying to find a nice balance of scales/noise/speed but still with acceptable results.
The spheres could do with a bit of work but I think I've just about got it quite close on a flat planar surface.

Updates to follow...

dandelO

One with the new settings that doesn't use a Perlin noise:
[attachimg=#]

Getting there. The break up is looking not too shabby on the ground now.
As for the spheres, The difficulty is trying to disguise the noise function that breaks the reflections up, while still keeping the reflectivity break up visible. Here, it's very subtly used on the spheres as well. I'm working on this now...

dandelO

Starting with the default TG reflective shader(first image), these show increasing increments of the reflection scattering I'm working on(the floor in the scattered ones is the same in all images, it's only the spheres that are edited here);

[attachimg=#]
[attachimg=#]
[attachimg=#]
[attachimg=#]

It works in some respects to reduce the visual detail degradation of reflected reflections, which, in the first image as you can see, the detail is very much reduced in the floor, which is reflecting the reflective balls on itself.

Done for this evening, I think. Night! :)

dandelO

Render times are only roughly 1/10th longer than the default reflective shader.
First one took 10m to render, the longest of the following ones took 11m 30s.

Detail = 1
AA = 6(max 36/36)

dandelO

December 09, 2010, 11:12:26 pm #4 Last Edit: December 09, 2010, 11:18:40 pm by dandelO
OK. One more. :D
I calmed it all down a notch or two, the last ones were all really exacerbating the effect a bit much.

[attachimg=#]

This one's a bit nicer because I'm not pushing it very far, just adding a hint of the reflection breakup effect.
I can see it's better in the distance(the spheres are all the same size, just the distances are different), closer to the camera becomes noisier, although, it's still far from 'clean' anywhere. A little aspect called 'render detail' is doing my head in, I just don't have the computer power. Upping it to '2' is quadrupling render times and I shudder to think how long '4' would take.
I'm also at quite a wide angle to the floor, the less the viewing angle - the less the reflection distortions so, I'm happy with this for a night or two's fiddling.

And, this one actually took only 9m 23s. That turns out to be faster than the default reflective shader, posted above at 10m 15s. :)

*** P.S. Sorry for the flooding! I realise I've just had a post-blurt, talking to myself when I should be asleep! :D

Matt

The geometric distortion in the reflections seems very high. You can reduce this by reducing specular roughness in the reflective shader.
Just because milk is white doesn't mean that clouds are made of milk.

dandelO

Thanks, Matt. I'll experiment with that. I was picking up too many blooms when I'd reduced it in a test above. ^^ Probably too far.
Thinking that raising it would help to smooth out the discrepancies, as it softens out the highlights, I raised all roughness values back to their default roughness - 0.1, making them smoother again. Probably to far! ::)
I'll aim for the middle ground next.

More later... :P

dandelO

December 10, 2010, 09:38:19 am #7 Last Edit: December 10, 2010, 09:44:13 am by dandelO
Here's a .gif beginning with the  TG default reflectivity and showing edited reflective surfaces afterwards, with incrementally reduced specular roughness on all the surfaces.

*** Please excuse the 256 colour mode of the .gif. It's just to show the differences sequentially. ***

[attachimg=#]

If I go any lower I'm picking up too many blooms again. A balancing act, indeed! ;)
I think the last one looks best, the geometric reflections aren't really distorted at all in that one.

Thanks, Matt, great advice!

dandelO

Here's the final frame of the above in full colour mode.

[attachimg=#]

Mahnmut

Hi dandelO,
not many replies for such an achievement.
Don´t you say "rendered speachless" in english?
I think, that´s what happened.

Hopefully I will have a new computer soon, so there will be a lot to try in TG for me.

Best regards,
Jan

airflamesred

Great work Dandelo. Is this a shader (or two)  that plugs into the sphere and the plane?

cyphyr

Great work your doing here, getting right under the bonnet as it were. Could this be used for better ice surfaces?
Richard
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

Henry Blewer

This is really cool. I wonder how it works for glass, say for automobiles?
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

dandelO

Didn't think there was much interest so I just put it away for a rainy day.

I'll make a new thread for it in file sharing, if anyone wants a look.

Henry, it contains a reflective shader that you could replace with a flat, transparent water shader to make glass.