How to make this glitter material?

Hi guy! I have problem in making this material for cosmetic product!

Here is the original:

and this is my node setup!

I can see the glitter effect but it is not nice, shiny and obvious! I tried to add a bit of bump because as you can see the glitter effect is not flat in original!

Could you please help me out with my node setup :frowning:

Thank you for your time :slight_smile:

1 Like

You might need to add some glare in compositor.

Is there any improvements i can make to the node? because, i believe that the glare will effect the glass as well! (which is something that i don’t want)

It depends on what you set your threshold to be on the glare node. I’d also use the “streaks” option.

You could try pushing the RGB values of you glitter above to make them brighter - that way they should outshine the glass reflection when you add the glare node with a high threshold.

I think glitter and glints are a difficult thing to simulate properly. This guy has done a lot of research on such things - take a look down his list of publications. Hopefully some of this stuff may make it into Cycles in the future.

First thing to do is to remove the emission shader from the setup! The material you’re trying to make is not emissive, it’s just reflective! And therefore, the glare intensity should come from the enviroment and not from the material itself.

For this type of materials, I normally use a similar setup as this:

The lightblue node is used to control the scattering of the glitter. Low values make the glitter very soft and compact, high values make it more scattered.
Thought this is a simplified version, some other improvements and details can be used.


Awesome material Secrop :smiley:

It’s not so different from the snow material I posted some time ago. The technic is the same, using the voronoi cell to make the small flakes.

You could add some control on qty of sparkles with a greater node then after the texture

have fun

happy cl

Great! thanks! Although i am not sure if i understand the Combine XYZ, Subtract, Add, Normalize nodes :eek:

tnx for the suggestion

tnx for the suggestion

The output color of the voronoi.cell texture has the particularity of each component (red, green and blue) to be uniformly random between 0 and 1. In this setup I use that color as if it was a vector. If we subtract a new vector (the combineXYZ) with [0.5, 0.5, 0.5] from the output of the voronoi, we get a new vector that has a range that goes from [-0.5,-0.5,-0.5] to [0.5,0.5,0.5]. This is quite usefull, because each cell color is turned in to a random vector that has a direction that can fall in any direction from the origin.

But this alone is not enough, as we don’t want vectors that are pointing in the negative direction of the Normal (they would render as black). That’s why I add the Normal to it, and then normalize it. In the end, the result is a vector that is randomly distributed around the Normal, as the glitter flakes normally are.
The factor of the Add node serves to control how much from the random vector is added to the normal vector.

If I was just to add the voronoi output to the normal, then the result would be pointing mostly to the positive X, Y and Z directions - which is not a very good randomness.

I know the logic may seem a bit strange (mixing colors with vectors, etc), but mathematically speaking it makes sense, and that’s why the result works.
I can later illustrate this, if anyone wants (don’t have the time now, but it’s fairly easy to do it).

nice math behind this
but I would like the sparkles to be more like emission I guess
right now looks more like flat color only

but still nice work with vectors
happy cl

Awesome man :slight_smile: thanks for quick reply! now it makes much more sense! also the illustration might be really helpful too (whenever you get a chance)!

If it’s not brighter enough, than the problem is with the light. Cycles materials (with some exceptions) should be light independent. Forcing a material that’s not emissive to emit light is not a good approach! It makes the material unusable (without tweeking) in any other scenes.

@alborz, here’s a simple illustration of what is happening: :wink:

oh nice one,i try this as carpaint sparkle :yes:

Yes! that’s my problem as well! that is why i tried to add emission and bump to my original material! But maybe the best way for these materials is post processing in Photoshop (to add extra glare?)

I’ve tried the emissive setup in the past, but no success. One problem with flakes that cannot be solved (if they have very random normals) is that no amount of retroreflectiveness can be simulated, and multibounce between flakes before it reaches it eye would rely on heavy caustics calculations - not something for cycles. Doing any kind of retroreflectiveness at all requires you to actually model it, afaik.

The only semisuccessful attempt I’ve done was doing the voronoi -> anisotropic tangent trick, which can sometimes be added to regular sparkle reflections to get concentrated “circular highlight of higher intensity sparkle”. Search for concentric scratches and it’ll probably lead you somewhere. I can not wrap my head around why that actually works though :slight_smile:

Another approach might be to render the sparke separately, then increase its contrast before adding it back (in post). Sadly we can not do any tricks to the output after the shading process.

Awesome! thanks man.:cool:

Nice illustration, but what are the vectors like at the start (the textured cube is shown - but the vectors are only shown after they have had 0.5 subtracted).