Photorealistic Beer Breakdown
This is a breakdown of my process of modelling and rendering the photorealistic beer that can be found here (
Photorealistic Beer - Standard Render) and here (
Photorealistic Beer - VRay Render).
References and programs used (As well as why):
Cinema 4D 16: For modelling and rendering the main image.
(Website)VRayC4D (Or VRayForC4D) v1.9 (2.55): For higher realistic rendering.
(Website)Photoshop CC 2015.1: For image tweaking and fixing any problem areas.
(Website)3DFluff: The standard render was all focused on the tutorial done by 3D Fluff, I highly recommend them.
(Website)Standard Render Breakdown:
As to be expected, because this render was based more on the standard render engine inside of Cinema 4D, I didn't hit many hiccups or trouble spots with this, yet I will still go over the run-down.
WireframeSo above is the wireframe of the glass. I used a Spline with Lathe nurbs to get the overall shape of the glass, tweaked the spline for the actual beer liquid and foam. One of the tips 3DFluff give for making liquid in containers, is make the liquid a little bigger than the actual glass. Sounds weird, I know, but 1) If the liquid is in the exact spot (X, Y and Z positions), then rendering it can give you headaches, as it will appear warped and the texture will look super ugly. 2) Making it smaller than the actual glass will put a thin layer of air in between the liquid and the glass, and it will feel off. If you are going to have foam at the top of the liquid, make sure to make them overlap, and that the foam pushes further into the glass than the beer does, otherwise you'll again have render issues.
Another point to make out, is to make sure the N-Gons or triangles or whatever you are using to model with, that they are equally spaced. This is due to if you will be using a displacement on it later, making it easier to render, and end up giving you less polygons in the end.
Modelling the overall product was not the main exercise, it was to make it as photorealistic as possible, which means tweaking 1) Camera angles, 2) Textures, and most importantly 3) Lighting.
To get the lighting in place, I created a very simple black and white image using the gradient shaders in C4D, using Luminance texture, placing this on the sky, to make the two main white points show up on either side of the glass, thus giving me this result.
Not the greatest... I used the sky to basically fill out the sides of the glass, to give them more definition.
I then added a Area light to work as my key-light, with a backing plane on it, with a faded white background on it, to give a soft reflection look on the over glass.
After tweaking the beer texture (Transparency - Refraction: 1.3, Absorption Color: 252, 223, 166, Absorption Distance: 1cm), the glass texture (Transparency - Refraction: 1.5), I then added the foam texture. Unfortunately I didn't render out my steps here due to my memory, yet I can outline the texture I used for it. (Color - Color: 222, 210, 192)(Luminance - SubSurface Scattering: Preset = Marble, Path Length = 1cm). This gave me a smooth looking foam, and we know thats not how foam looks like, it has bubbles. To create the bubbles, I used the Bump channel. Inside the Bump, I added noise, using the noise type of Voronoi 1, and pushing the Global scale down to 3.
I rendered out a example here to show how to create a better bump. For this example, its the same as the bump explained above. This example is for when you are using a small global scale. I used a global scale of 5 for this example. When we put it in, we get this result:
Rather ugly. The way to fix this, and I credit 3DFluff for showing me this, but for how small you put the Global scale, but the Delta that as well. So since my Global scale was 5, I put my Delta to 5 as well, giving me this result:
The reason for this is that Delta is the scaling factor used when creating bump, using the setting to evaluate the overall slope that the noise is giving. Very handy tip.
Finally, I added a faded gradient for the transparency, letting the foam fade into the beer, giving a realistic foam head.
Up next, the condensation.
Overlaying my initial glass texture, I added the exact same to it, yet enabled both Normal and Displacement channels. But lets talk about the bump channel.
For the start, I added a simple noise texture (Voronoi 1), tweaked the global scale and delta, along with the high clip, and laid it over the top of my glass surface. I used several noise's and gradients to give me Small, Medium and Large droplets, the one below showing only the Medium droplets.
Zoomed inAs you can see, the droplets are literally covering the entire surface of the glass, which just takes all the realism away from it. To get rid of this, I used two gradients (multiplied), to take away the bumps from the foam head, and the base of the glass, as condensation comes there from the cold, and as the cold thing inside the glass would be the beer, it makes sense its only affecting where the beer is.
Also making small streaks using two more gradients, for where the water has collected and slid off. I also enabled the smaller and larger droplets with the following render.
Noticing a small mistake, I disabled the specular highlights that the foam was giving on the foam head from the key-light.
So, the bump map is good, but we can do better, so we used the Normal map. Normal maps only use Blue, Green and Red, and the bump map uses black and white values. So another trick 3DFluff taught me was to a Normalizer effect, using the same texture I had created for the bump map. The normalizer basically calculates a normal map based on the bump map, using the black, white and gray coordinates the bump layer had. Using the normal map gives me this result:
A much higher quality version, no? As you can see, I actually took the larger droplets out of the equation here, as I will be using them in my displacement map, as Normal and Bump maps don't actually displace the mesh, just give the illusion of it, yet when you view it from the side, you can clearly see no displacement.
So, I added the displacement using the bump channel texture, disabling the small and medium droplet, and left the large ones, as well as the gradient cut outs there.
I then did a high resolution render, tweaked it in Photoshop, and got my result!
VRayC4D Render Breakdown:
OK, lets make this short and sweet, as it was a very simple, yet somewhat troubling process.
VRay is made by Chaos Group, mainly for 3DS Max and Maya, Autodesk programs, and does not natively work with Cinema 4D. That's why, I use the Cinema 4D plugin, VrayforC4D, with collaboration from Chaos Group giving them the source code, natively coded it for Cinema 4D use.
Anyhoo, onto the actual project!
My lighting and camera set up was the same, in place of the Sky that C4D comes with, I used a area dome light with the same background as before, as well as the same key-light.
After doing a quick "Convert Materials" to make my life easier, I quickly made a better background as well, as I wanted the background to flow seamlessly into the floor.
As you can see, some issues with this render. Lets go over them!
After I modelled the floor, it came up with this horrible nasty triangle look, which wasn't what should be coming up.
Simply selecting all the polygons and triangulating them fixed this easily (Why it did this is because upon render, C4D turns polygons into triangles).
On to the next issue! Looking closely at the liquid (also, yes the foam is gone), you can see the bubbles inside it. However, they are grey, and not transparent as they should be. For the bubbles in the standard render, I simply put a transparent texture with no refraction on them, but it seems Vray doesn't like this.
My work around was to (the spheres are from clone objects) make them all into one mesh, and then do a boole between the bubbles and the liquid, giving me a better and cleaner result.
Finally, on to the foam!
As you can see, there literally... is no foam. This is because when I converted it to VRay, I also had a transparency on the material (To blend it into the liquid, refer above as to why). This confused VRay, as the SSS (SubSurface Scattering), HAS no transparency function.
Turning off the transparency, gives me this result
A completely fake looking foam head, I know right? Let's zoom in!
So why does this look fake? The simple answer is that there is no simple fade or drop off between the liquid and the foam.
As mentioned, SSS in Vray is literally nonexistent (There's a tip, include that in the new update VRayforC4D Team!).
So, my other work around was to instead of use the SSS, I used the Diffuse shader, making the colour white, and mapping a transparency gradient over that to get the "Fade" effect that we desire.
This gives us a more pleasing result, yet still not super realistic. This is because this set-up and model was not made for close up views, but simple far away portrait shots.
On-to the condensation!
Unfortunately, VRay does not seem to love the displacement and the normal maps that came with my original condensation material.
As you can see, there is almost no detail in the normal map, and displacement is literally nonexistent. This is because Displacement has its very own material, but I'll come to that soon.
So, even though in the standard render engine, the bump map looked bad, I decided to go with the bump map instead, and see how it worked out.
Notice how drastic a change that was? Very easy and simple fix. Much more realistic in my opinion.
On to the second last step, which is the displacement.
As I said previously, VRay has a different material for displacement. Why this is, I don't really know (if anyone does know, please tell me). I mainly use Vray Advanced Material, and occasionally Fast-SSS, but displacement has always impacted my render times majorly in VRay, which is why I normally displace the polygons in the actual model, instead of using a material to do so, however I decided to try the material.
Activating the material, and applying the displacement map (as well as simple adjustments to rotate it properly) I get my result!
A small, but significant change in the quality and visual pleasantries.
Finally, my last step was to step up my subdivisions on my displacement fields, activating caustics, upping the GI and finally Upped the resolution of the final image.
Here is the same small close-up of it, with all the effects added (no post work though)
And that's that!!
Side-by-Side Previews
Here are some previews, so you can analyse the difference between the Standard engine and the VRay engine.
Let me know which ones you liked best!
And if you have any questions, please feel free to ask me
Final Thoughts
Oh wow, this took me ages to write, it was quicker to model, render and troubleshoot than it was to write this
But I'm so glad I did this, at the start of next year I'll be keeping a journal daily here and on Tumblr, with WiP's and Steps, as well as proper tutorials on all things 3D!
Here are most of my social links, if you feel like following me
FacebookTumblrDeviantArtVimeoYoutubeBehanceSpecial thanks to 3DFluff for the amazing tutorial, Chaos Group and VRayForC4D Team for VRayC4D, Maxon for C4D, and all the support from my family and friends, you guys all rock!