Sugar cube material shader help pls

Hi, I would like to make a realistic sugar cube material procedural, but so far I couldn’t manage to get a satisfactory result, can you please help me improve it? or make a complete new shader , please see below my attempt, not good :frowning: here is the file for shader
thanks


Attachments


use voronoi with bumps
then add some uvspheres different size as a group
then use particles set to face for your cube

this should look more realist

happy bl

used voronui not only bumps but also for displacement modifier ( @PGmath 's suggestion from here), and got the result below, but still not feels realistic enough, esp there are too much noise even with 300 render samples


sorry but there is little noise in this render
bumps you looks like voronoi !

can you show nodes setup
may be upload s small sample file a few cubes

did u test the particles system it would looks more realist

do u have a reference pic so we can look at it

happy cl

like this ?



this method is very easy to use but it’s really slow


model just a few sugar grains and use a psys to distribute them inside a sugar cube (volume/grid)

here is my atempt


^^ Yep - I tried that last night - but Blender crashed on me.

What I found works is to take a standard cube - then apply a particle system, distributed on the faces - keying off the sugar grain object(s).

Give them some random size and rotation.

I then applied a glass shader to the sugar grains themselves - with a white translucent shader on the underlying cube. Seemed to give a pretty good result, albeit a little slow.

yes too much noise is probably from SSS, it didn’t change much though even i render with 500 samples, I believe there might be a better option causing less noise, my current sugar blend file is here
and below is the node set up


(originally suggested by @PGmath from blender stack exchange)

I haven’t tried the particle system one yet, but I will do asap, I’m just not good at particles yet :frowning:

as a reference photo I’m aiming something like this


or this

thanks for helping btw

first thing don’t make you background white
should be greyish diffuse

did basic shape for cube with some voronoi

cube-white1.blend (231 KB)

~

over that can add some particles with Hair and object
did one with UV sphere but does not look

should be sort of squarish to make the group
might look better in render

happy cl

Attachments


thanks for the reply, I will try your method with particles, but can you please also explain a bit more what you meant by “use a pays to distribute them inside…”