9
$\begingroup$

I have been struggling with this for a while, and can't figure out help. 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? My render i know it looks like solid object not translucency or sss but I do applied both with an add noder can be seen in the file

enter image description here

I m seeking a solution to make shiny sprinkle looking small parts and translucency of main shader. I can't figure out how though.

thanks

EDIT- second render after @PGmath suggested note set up which helped a lot to get a much more better result, however I wish there was some way to reduce the noise , even with 300 samples there are plenty noise, is it normal?

enter image description here

$\endgroup$
5
  • $\begingroup$ You have to add subsurface scattering $\endgroup$
    – A.D.
    Aug 11, 2015 at 18:20
  • $\begingroup$ Hi @IgorTatarnikov thanks for suggestion but it already has sss and translucency with add shader node, but surely something wrong which doesn't make it look like sss applied $\endgroup$
    – ideorium
    Aug 11, 2015 at 18:33
  • $\begingroup$ @ideorium Could you please post your material nodes set up? $\endgroup$
    – Paul Gonet
    Aug 11, 2015 at 20:41
  • $\begingroup$ For starters I would use a voronoi texture set to cells as a normal map. $\endgroup$
    – PGmath
    Aug 11, 2015 at 21:50
  • $\begingroup$ Ok, I have added the blend file @Gonzou alternatively you can download it here too $\endgroup$
    – ideorium
    Aug 12, 2015 at 6:09

1 Answer 1

8
$\begingroup$

Here's what i have come up with after a few minutes of playing around.

enter image description here

The entire shader is based on cell voronoi textures. Voronoi works well for this kind of thing because it gives nice pixel-like results. The actual geometry is just a massively subdivided cube with a displace modifier using a small voronoi texture.

enter image description here

Here are the shader nodes:
enter image description here
Click to enlarge

It's basically a huge mix of diffuse, gloss, SSS, glass, and translucency; with a small amount of volume scattering (to simulate the light bouncing around on the sugar grains inside the cube). Everything uses a single voronoi texture as a normal map, each shader uses a different level of bump though. It could definitely use some tweaking, but it's a pretty good start.

A note on speed/noise:


First of all you have to realize that things like rough gloss, SSS and translucency will all generate a good deal of noise, meaning you need more samples. I would suggest at least 500 samples for rendering many of these. That said, there are a couple things that you can do to cut render times, and less render time means you can afford more samples.

First of all you can probably get away with nixing the volumetrics. Though accurate it isn't essential to use the volume scatter, this alone cut my render time almost in half.

Second you can add these nodes at the end:
enter image description here

What this is doing is only making it compute all those complicated shaders for glossy and camera rays (the add node works like a logical OR), for all other rays it just computes diffuse. I use this trick all the time in indoor scenes especially.

$\endgroup$
8
  • $\begingroup$ Very nice result! Increasing the Scale of the Subsurface Scatering node may make it even better. $\endgroup$
    – Paul Gonet
    Aug 11, 2015 at 23:22
  • $\begingroup$ wow thanks a lot for your answer, I will study the node setup asap which looks very interesting and informative @PGmath thanks $\endgroup$
    – ideorium
    Aug 12, 2015 at 6:07
  • $\begingroup$ @PGmath , I have applied the shader node set up with some little changes and object geometry with displacement, here is the result it had so much noise even with 300 render samples, I am wondering how can I make it less noisy with less render samples.. thanks $\endgroup$
    – ideorium
    Aug 12, 2015 at 8:53
  • $\begingroup$ @ideorium check out this guide: blenderguru.com/articles/7-ways-get-rid-fireflies May be very helpful. $\endgroup$
    – Paul Gonet
    Aug 12, 2015 at 9:08
  • 1
    $\begingroup$ @ideorium You could try nixing the volume scatter, it adds something but it's not much. In my render I also disabled caustics, if you have other things in your scene which need caustics this might not be an option, but trying to render caustics on this thing is really a nightmare. I have one other idea I will try, I'll add it to the answer if it works. But honestly, for a shader like this you're going to need more than 300 samples, things like SSS, translucency, and rough gloss need a lot of sampling. $\endgroup$
    – PGmath
    Aug 12, 2015 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .