Planetside Software Forums

General => Image Sharing => Topic started by: dandelO on December 09, 2010, 08:53:07 PM

Title: Anisotropic Reflective Shader
Post by: dandelO on December 09, 2010, 08:53:07 PM
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...
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 09, 2010, 09:33:02 PM
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...
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 09, 2010, 10:27:02 PM
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! :)
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 09, 2010, 10:36:24 PM
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)
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 09, 2010, 11:12:26 PM
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
Title: Re: Anisotropic Reflective Shader
Post by: Matt on December 10, 2010, 12:48:05 AM
The geometric distortion in the reflections seems very high. You can reduce this by reducing specular roughness in the reflective shader.
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 10, 2010, 08:29:41 AM
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
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 10, 2010, 09:38:19 AM
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!
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 10, 2010, 09:47:18 AM
Here's the final frame of the above in full colour mode.

[attachimg=#]
Title: Re: Anisotropic Reflective Shader
Post by: Mahnmut on December 11, 2010, 11:07:20 PM
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
Title: Re: Anisotropic Reflective Shader
Post by: airflamesred on December 12, 2010, 04:58:35 AM
Great work Dandelo. Is this a shader (or two)  that plugs into the sphere and the plane?
Title: Re: Anisotropic Reflective Shader
Post by: cyphyr on December 12, 2010, 06:14:00 AM
Great work your doing here, getting right under the bonnet as it were. Could this be used for better ice surfaces?
Richard
Title: Re: Anisotropic Reflective Shader
Post by: Henry Blewer on December 12, 2010, 08:33:16 AM
This is really cool. I wonder how it works for glass, say for automobiles?
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 12, 2010, 11:11:48 AM
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.
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 12, 2010, 01:05:48 PM
Download here. http://forums.planetside.co.uk/index.php?topic=11333.0
Title: Re: Anisotropic Reflective Shader
Post by: freelancah on December 12, 2010, 01:57:31 PM
Nice work! You're always pioneering something ;) Will surely check the clipfiles on how you did it!
Title: Re: Anisotropic Reflective Shader
Post by: dandelO on December 12, 2010, 02:35:39 PM
Cheers, dude! It's a pleasure. :)