3
$\begingroup$

I am trying to make an animation that has some cereal inside of it, and the camera will get somewhat close to it so I want it to look as realistic as possible without severely impacting performance. (I am using the Cycles render engine.)

Unfortunately, this isn't easy because if you zoom in, you will see cereal actually has many tiny holes on it and this is giving me a lot of trouble to reproduce. The reference image I am working off of is down below. I could get the colors and the base geometry somewhat correct, but I have no idea how to create that "baked" look where there are tiny holes and some sort of actual roughness. I am completely lost in this area and don't have any clue what to do or even begin with.

It would be desirable if the end result does not have a lot of geometry and is mainly procedural because I will have many copies of this object inside my end result.

enter image description here

$\endgroup$
  • $\begingroup$ What have you tried so far? $\endgroup$ – susu Aug 10 '20 at 20:50
  • $\begingroup$ Not sure if it would work but you could try using low geometry spheres and making tiny boolean holes in the mesh, and only use the high quality ones in the area where the camera will zoom in. $\endgroup$ – Nascent Space Aug 10 '20 at 22:24
  • $\begingroup$ good starting point from the performance angle: youtube.com/watch?v=CQ9VmCN2EsE - Are you planning to zoom all the way inside one of these tiny holes? $\endgroup$ – wilks Aug 11 '20 at 0:09
10
$\begingroup$

Here, you can try this.

Start with a torus object such as this (this is just the geometry/subdiv level I used, you can use as much or as little as you need, however I will decimate later):

Torus

The rest will be done with a shader such as this, almost completely generated from noise textures:

CerealShader

I started with a rather large (scaled down) Noise Texture, stretched by 2 on the X to make it more realistic (default looked stretched).

MainWarp

Then I made the little "micro holes" you mentioned by using a small (scaled up) Noise Texture, with a rather high detail level to give the most variance ( of cavity shape). I then used a ColorRamp to clamp alot of the values, so the holes don't "take over" the whole object.

NOTE - throughout the graph, you will see me mix the noise values with pure white using MixRGB nodes. This is because often the default "strength" (more related to contrast) of noise textures looks too strong when put through a bump node, and I don't feel the strength value of the Bump Node gives me the proper "control" over these strengths. Therefore, I control them by mixing them with pure white (often quite heavily).

SmallBump

I felt the large overall warp was lacking something, so I mixed it with yet another large Noise Texture, this one with a bit more detail.

LargeWarp2

I then mixed (multiplied) these values together, and used the result as the basis for both a Bump Node and an Ambient Occlusion node. I also used one of the large Noise Textures as a mix factor for a couple of "cereal colors. I then multiplied the cereal colors by the Ambient Occlusion values to make the distortion "stand out". I also used the colors by themselves as a small subsurface color contribution, to give a bit of that cereal "see-through corn glow" look.

Note - you can use stronger values for the Ambient Occlusion or a stronger mix factor than I did - this result looks rather subtle, I know, but I go on to use this as part of a particle system, and as particles, the detail stands out more. Change the values to your taste, but do it once the particles are made.

MixedCereal

To make the mesh more conducive to being a part of a particle system, I used a decimate modifier. You can do this any way you like, or just start with "smarter" geometry than I did.

Decimated

I then made a bowl and a plane with some "milk" and gave the plane a particle system. I also gave the "milk" a subsurface value to show the "immersed" cereal better. Make sure that Ambient Occlusion is checked in the render properties.

Cereal

Here's the result zoomed in quite close:

CloseCereal

$\endgroup$
  • $\begingroup$ Amazing shader! I appreciate the detail, it made it very clear. Thanks! $\endgroup$ – Eric Xue Aug 11 '20 at 1:27
  • $\begingroup$ Hey, no problem. I just realized I made this in eevee, but it looks just as good (or better) in cycles. Also, I recommend using "un-subdivide" as opposed to "collapse" as I did in the example if you choose to decimate. It works way better - I don't know what I was thinking. $\endgroup$ – Christopher Bennett Aug 11 '20 at 1:39
  • 1
    $\begingroup$ Almost like the donut tutorial, but in a single page! $\endgroup$ – susu Aug 11 '20 at 2:04
6
$\begingroup$

I've also given a try, a bit long to explain but basically I've mixed different noises to have 3 levels of bumps, I've also mixed colors to have variations of brown, plus white sprinkles, and at last I gave a bit of Subsurface Scattering and glossiness. Of course it would need a bit of improvement but I think I'm not too far.

File :

enter image description here enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.