"Materials such as snow, sand, metallic paints, rough plastics, and metals often exhibit a bright sparkling or glittering surface feature, as anyone who has rendered a metallic paint 3D car will know. These features can catch the light and vary based on your orientation to the surface and the light sources. Having this characteristic spec ping can make a huge difference to how an audience perceives a material…
… Recently the team at Chaos Group released a version of V-Ray that partly solves this…"
So am wondering if there is OSL way around it or some extra nodes that could help emphasize the bling (colorful sparkles)?
Also any other thoughts on the matter are very welcome.
This is the closest i could get… it’s no where near as nice looking as V-rays results though… To get something of that level would definatley require some extra features being added to blender.
To get this i used my carpaint nodegroup (Not a shader, but outputs all the data needed to make a speckled shader, excluding bump… but that can be derived from the colour and mask outputs) and also my metallic BSDF nodegroup.
Your normal and tangent inputs are empty, keep in mind that you can use them in unconventional ways to great effect (as in not using the normal input just for the purpose of bumpmaps).
An example would be something like mixing the normal output of the geometry mode with a texture using the ‘overlay’ mode (the first input is needed to ensure the mesh continues to look correct).
@AceDragon - Oh yeah, i know, this was just a couple of minutes work trying to get the basic look,
i have a thread about doing a similar thing to what you mentioned, using procedural textures for distorting vector mapping -
I just thought that maybe with this basic setup, someone with more knowledge than me might be able to get a much better result
Would probably need some more samples to better distinguish speckles from generic noise, but i think the Glinting highlights look pretty good on this. It would of looked more like snow, rather than ice if i had payed more attention to the roughness :o
Strange, didn’t land on your thread before when i was searching forums for flakes and carpaints.
Quickie looks tasty and similar to what i was thinking & imagining later on (voronoi + normals + color ramp > reflection) didn’t had the chance to test it yet.
Yup ultimate goal is to have a fast effect appear as camera/photo based, aligned and continuously balanced… as Ace also noted
will get back
BTW
i use big flake size, exaggerate for the sake of effect
Using the position input from the geometry node usually gives uniform distribution of voroni textures on most meshes, there may be distortion on more complex meshes, although it may give better results if you mix the normal output with it in some creative ways.
I’ve only ever ran into trouble using the position output with the checker, magic and brick textures, as these require some more intricate mapping.
Looking forward to seeing what you come up with
And i will let you know if i come up with anything else
Actually, I was talking about abusing the normal input to actually change the shading itself and not just the texture. A basic glint then is very quick to set up and has decent results (note that this isn’t just bumping the surface).
Okay, the results are much better with your method included!
I’ve decided i’m going to start work on a new node group tomorrow, to allow more control for this perticular shading situation… See if i can get any closer to the desired results. Hopefully create a faked result thats a close enough approximation stochastic shading… I’m probably a bit out of my depth with this, but it’s worth trying anyway
I’ll post my results up when i have something worth sharing, hopefully we can help each other and work together on creating something good and usefull
Iirc this was a mix of Ace’s “Voronoi -> Bump -> Anisotropic Tangent” (which is bizarre), and the normal way of doing flakes. I believe this version uses quite sparse flaking.
This is the thread I got the tangent setup from. Iirc that does the “reaction to light angle” thing (which we can’t really do), maybe I tried modulating the anisotropic reflection color with other voronoi, or something. It took a whole lot of experimenting, and I’m not fully satisfied with either the result or the controlability. The effect is also a bit “wild” and can only be on the glossy side. Here is a test I did on custom glass, notice how it fails on the “exit side” (refracting side). Not 100% sure what is needed, sometimes I feel I would like to have more control over sampling, maybe in a dedicated shader (closure) to do these things.
Basically, it’s a hack that kind of resembles the concentric rings of scratchy reflections but not fully, it’s time consuming, hard to control, and very non flexible. I wouldn’t recommend it for any production stuff, but might be fun to play around with.
If you want “only flakes”, then stick with what Ace shows above, maybe try to modulate the effect with a gradient voronoi and/or noise (if gradient voronoi > some level, then apply the cell voronoi directly to normal).
@CarlG - Yeah man, i’ve read through the paper mentioned on that thread, i posted that along with another paper in a comment above. I plan to study through these papers again to see if i can extrapolate any information that could be of use to me when trying to replicate results in cycles
Is that glass shader using the new multiscatter CGX or traditional CGX? as i know that the traditional CGX can have problems with energy loss with increasing roughness? may explain the failing on the “exit sides”? Unless the glinting is achieved using a speckly glossy overlay ontop of the glass? in which case i have no idea why the effect is not apparent on its rear sides.
Ultimately i would like to achieve an effect that is of a similar quality to this really -
In case it helps, the glint setup I posted to this thread only works properly when the shading model is set to multiscatter GGX (regular GGX gives problems with producing a realistic falloff from the center of highlights).
So it does more than prevent rough surfaces from becoming too dark (because you notice the difference in this case even with very low values).
To be honest, I don’t always know how the math actually works (but you don’t actually need to know as long as the final result looks convincing).
In this case, I didn’t actually try to copy the math from the papers (which is very complex stuff). The good news though is that the Cycles nodes had what is needed to avoid having to mess with manual calculation (that being creating the impression of randomly tilted normals, which I assume would play major part in creating the glints in CG)