logo80lv
Articlesclick_arrow
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_login
Log in
0
Save
Copy Link
Share

Creating a Scrambled Eggs Shader for a Breakfast Scene

Pawel Somogyi shared the workflow behind the Scramble Eggs shader, explaining how he modeled the plate and the shape with a sphere that he squished and stretched, and how he added subsurface scattering and turned up the Roughness to achieve a more realistic look.

Introduction

Hi, my name is Paweł Somogyi, and I'm a 3D Generalist from Poland. I discovered Blender over 20 years ago, one of my professors at university showed me this cool open source software that runs on Linux. I have been interested in computer graphics since I can remember, but it was the first time I could put my hands on proper 3D software. And I've been hooked ever since.

My field of study was not related to computer graphics, so for a long time, Blender was a hobby I was doing on the side of my job as an electronics design engineer. But I was pretty serious about it, spending a lot of my free time learning, following tutorials, and experimenting with my own projects.

My growing 3D skills also came in handy in my day job, as I've been creating a lot of 3D visuals for marketing materials and technical documentation for the company I worked for. After a while, I became proficient enough to work on VFX for a few live-action short films.

Most notably, I was a 3D Lead on "Skywatch", a proof-of-concept sci-fi short film by Colin Levy, starring Uriah Shelton, Zach Callison, and Jude Law, with Sandro Blattner as VFX Supervisor. It was a fantastic experience, and I learned a lot.

At this point, I was still working as an engineer, but about four years ago, I decided to make a switch, and I've been working strictly as a 3D Artist since then. I've been creating animated ads for mobile games, mostly stylized animations with characters, where I was doing my own character models, rigging, animation, and for a lot of the ads, I also did editing and sound design. But I'm keen on getting back into VFX now if I get a chance. 

The Scrambled Eggs Shader

My scrambled eggs shader and model became the beginning of a little larger project, a breakfast scene. But the eggs were a starting point. I was thinking about creating some food props to use in future projects, so I started to do some 3D scans of different food products and dishes.

And when I was cooking scrambled eggs for breakfast, it seemed like a good subject, the shape is organic and can be very random, so even if the scan isn't great and I'll have some distortions, it is still going to look alright. That was my theory, but in reality, I was disappointed with how it turned out.

I realized that it wasn't the shape that was the problem, it was the shader, the baked-in reflections, and the lack of subsurface scattering that made it look more like a painted plastic prop than real food. Another problem was the contact with the plate, too soft, as if the eggs were melted into it, and the baked-in contact shadow was creating problems instead of helping.

I thought it was an easy enough fix with some sculpting and texture painting, and maybe removing the plate from the mesh. Then I could maybe edit the shader setup to make it more appealing. At this point, I realized that I don't really need that scan if I'm going to do all that.

The Workflow

My process was as follows: First, I modeled a plate and added a sphere that I squished and stretched to make a somewhat similar shape to what I had in the scan, first in edit mode, then I moved to sculpt mode.

I wasn't trying to match my reference perfectly, I aimed to just make something that felt natural. Once I was happy with the shape, I added a few tiny blobs to make it seem more organic and give it a little more interesting look.

When I was happy with the shape, I did automatic retopology with a small voxel size, because I wanted to have enough geometry to do some kind of noise displacement. With retopology, I got a uniform mesh density, so displacement will be similar on the whole surface. I used displacement because I felt that sculpting all those details by hand would be a waste of time.

I decided to use a displacement modifier, not just a shader displacement, to have it work in the viewport, so I could see and tweak the effect even without the material. It was also easier to use a vertex group to mask out the bottom of the model, so it wouldn't displace into the plate, not that it would matter very much, as it wouldn't be seen in the render, but I like being neat like that.

At this point, it was time to tackle the shader. I should probably clarify, when I talk about the shader, I mean the whole material setup. I use the Principled BSDF shader 99% of the time in my work.

When you do realistic renders, having a good reference is a must. I had my own photos that I took for the scanning process, but I also looked online for more examples. I was aiming for the French-style scrambled eggs look, really soft and runny. When I cooked my breakfast, I used a little too much heat, so I ended up with bigger egg white chunks than I should have, but in 3D, I had the freedom to do a better job.

The approach was quite simple first, I added a noise texture to mix between two shades of yellow, one deeper and darker, closer to the yolk color, and one more cream-colored. The Map Range node is added to have more contrast between the colors.

Then I added another noise texture to generate specks of unmixed egg whites.

I used that map to drive another Mix Color node, with an off-white color, and I had gotten a base color setup I was happy with.

But obviously, just plugging it into a default principled shader's color input was not enough. Once again, I was getting this plastic-looking quality I was seeing in my scan.

This doesn't look appetizing at all. But when we add subsurface scattering and turn up the Roughness higher, it starts to look much better.

Adding Details

Now the surface looks nice and soft, but there's something missing. On real eggs, you can see a layer of gloss coming from the butter. Easy enough fix, there's a clearcoat input precisely for cases like this.

I felt like I was getting close, but now it felt a little too smooth. The surface lacked a little more detail. So I added a Bump node and plugged my color setup into the height input. It helped, but the pattern was a bit too uniform, and I didn't want bumps to follow the color patterns exactly.

That's why I added a third noise to mix with the previous two. I changed the type to Ridged Multifractal to get some deeper grooves that would come from mixing the eggs. Once again, the Map Range node was used to squash the values to get the pattern I was looking for. There's no science to it, I slide the input values until I get something that looks like what I want.

I used the Overlay mode in the Mix Color node and once again experimented with the mix value until it felt right. And this concludes the shader part. I decided to make the plate dark, so the eggs contrast nicely.

The final shader setup ended up being quite simple:

To sell the illusion better, I needed one final touch. I modeled a few tiny tubes, squashed them randomly in sculpt mode, added a green shader with some transparency, and this gave me nice-looking chives. Then I used geometry nodes to sprinkle them on top of the eggs, and my dish was done.

Well, the eggs were done, but it would be a shame to leave the plate so empty. So I kept going, creating more food products and props, and completing what I felt was a tasty breakfast and also a nice-looking picture.

Conclusion

I can't say I used any particular tricks in the process, but since the eggs model was always supposed to be used in Blender only, I didn't bother with UV unwrapping or baking the textures. That's a huge time saver. As I mentioned, the geometry is quite dense, with over 96k vertices, but not to the point of visibly affecting performance.

Blender handles this very nicely. So I didn't have to do any cheats to achieve a fairly complex look. But I saved time by not optimizing or retopologizing the mesh. I think the most important thing in creating believable shaders is using good reference, preferably with different lighting, to see how light affects the surfaces you're trying to recreate in 3D.

And don't forget about subsurface scattering when you're creating food or other organic models. You really need that softness. For me, getting it right is the heart of those kinds of materials. Other than that, get familiar with the procedural textures, see what different looks you get by changing values, and then look for those patterns and shapes in the objects in real life. You'd be surprised how much you can do just with Perlin Noise and Voronoi.

I don't recall any particular challenges with the eggs. There was some tweaking of the values to get it to look just right, but it was pretty straightforward overall. It took probably 2-3 hours to get most of it done, and then another two hours of changing lighting and playing with sliders, so it looked right in different conditions.

But the whole breakfast scene, that's another story. It took about two weeks, because everything in the scene, except for the rucola leaves and the phone, was done from scratch for this project. All the props you see, including the table and chairs in the background, and all the shaders for those models, were completely procedural.

So there were some challenges and different approaches. The bread shader is the most complex of the whole scene. I used cloth simulation to make the bacon crinkle and softbody simulation to squash the tomatoes. I had some fun. 

For beginner 3D Artists, I would say stick with it and be patient. There are a lot of different skills to learn. Take your time, enjoy learning little things. Watch tutorials, there's an unlimited amount of information available online, especially for Blender.

But don't settle only on tutorials. Watch movies, fine art, learn about photography, observe nature, whatever seems appealing and interesting to you. It'll all help you understand what looks nice to you, and it will translate to the art you want to do. But don't be too ambitious in the beginning.

You don't need to model a full-size Optimus Prime or a photorealistic Ryan Gosling riding a motorcycle as your first personal project. Start smaller and maybe try to combine learning 3D with your other interests, so it's easier to stick with it.

If you love games, try to recreate something simple from the game you love, a prop or a weapon. Do you love music? Maybe do some motion design abstract art that reacts to the song you like. Or if you like food, maybe try to create scrambled eggs on a plate.

Pawel Somogyi, 3D Generalist

Interview conducted by Gloria Levine

Ready to grow your game’s revenue?
Talk to us

Comments

0

arrow
Leave Comment
Ready to grow your game’s revenue?
Talk to us

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more