Our polygon adventure is out there.
Facing the monster
During this dire corona quarantine, SketchUp may provide a quantum of solace. Knowledge conquers fear and kindles the imagination. Let’s learn how to 3D model the little fiend that managed to besiege our world – the coronavirus, also known as sars-cov-2.
This is a hands-on and no-nonsense 3D modelling tutorial. Anyone familiar with basic SketchUp concepts should be able to follow along, mouse in hand, eye on cursor. Its best-practice techniques are general and can be put to good use in common 3D modelling tasks. With a little knack, this model can stand up in under 20 minutes.
We'll use some extensions, all of which are available as free trials or for free. If you never used extensions before, don’t worry. Now is the time to let go of your needless qualms. SketchUpping extensionless is like biking in fixed-gear only. If you want to go really fast, or to climb steep hills, extensions are your friend. You can do it. If you feel stuck, just call me up and I’ll help you. You never need to walk alone.
Please note that this workflow may or may not work on SketchUp for Mac. A Mac user recently informed me that Mac owners just don't get viruses.
Let's get started!
Part 1 of 3 – Starting our adventure
Our goal is to reproduce a coronavirus as a stylized 3D model in SketchUp. Here is a reference image of a sars-cov-2 virus:
Before embarking on a 3D modelling adventure, we ask:
What do we want to achieve? What methods should we use? In which order?
After studying the image, we decide to approach it like so:
1) Create three general shapes – one large sphere and two small protrusion types
2) Distribute varied protrusion instances on the sphere surface
3) Organically roughen up the sphere surface
4) Turn all into one component and place
Does this sound like a plan? Let’s go!
🚩 First, let’s initiate a good visual reference and set model scale and position.
⚡ Open a new SketchUp file. Delete any geometry. Now we start from scratch.
Kickstarting in splendid isolation. Shortcuts beat toolbars. Image source here and where none given: Holygon
Save the reference image to any folder on your computer. In SketchUp, turn on visibility of axes. View the model origin roughly from the front. From there, drag the image file into your SketchUp viewport and drop it snapping at the origin. You can also import an image from the menu. Ensure that the image faces front view. Should it come in wrong, rotate it.
💡 When 3D modelling from reference images, always start by taking a real good look at the subject. Here, our reference image shows a gently ruffled sphere, scattered with some hundred small organic protrusions, one of which is tree-like, the other mushroom-shaped. This form is what we would like to recreate in SketchUp. Let us start with outlining its most general shape.
⚡ Create a circle or polygon right on the image front, and delete its face. Scale and move the circle so that it aligns with the sphere in the image. Right-click the circle and pick find center. This will draw a guidepoint in the centre.
💡 SketchUp prefers dimensions ranging from a few millimetres to a few miles. When features go way beyond these size bounds, they may get messed up. So let's make the reference somewhere in between – say 120 metres wide. Since our purpose is illustration, this scale is fine.
⚡ Activate the tape measure tool. Start taping from the circle centre and end at its perimeter. Enter 60 m. This sets the circle’s new radius and rescales the entire model accordingly. Please verify that the circle has a radius of 60 metres. To check, select the circle itself and read its entity info.
Group the centrepoint and the circle. Select this group and the image – this should be all you have – and assign both to a new tag – previously called »layer« – and name it »Reference«. With everything still selected, move it, starting from the centrepoint and ending at the model origin. Everything should now be centred in the global origin. To declutter the viewport, turn off global axes.
2D shape guiding group on reference image. The circle centre is at global origin.
Great – we are now dressed for success. In the next part, we will start 3D modelling.
Part 2 of 3 – Building our main geometry
Picking up from our preparations in part 1, we can now start building some geometry. We need only three objects: one larger sphere and two kinds of smaller protrusions.
Making spheres in SketchUp is easy. But remember that we want to roughen the surface later on. We can do this easily if we have about equal face size and restrained polarity. This can be achieved by a spherified subdivided icosahedron. A plugin can give us a helping hand.
Install the free extension Sky dome by Andreas Eisenbarth (Aerilius). Run its display a sky dome, then run its create entities from sky dome and use radius 60 m and triangle count 180. This yields a lightweight starter sphere. Denser spheres are produced by raising the triangle count, but we don’t need that now. Note that its faces have quite similar areas. Exit the sky dome background by pressing spacebar. Unlock the sphere, enter it, select all, reverse faces, go to panel Materials → in model and delete, or replace, any skydome-made material or texture. We want a clean viewport without distractions.
Finally, reveal the hidden guidepoint we made earlier, enter its group, copy the point, exit and enter the newly made sphere and paste-in-place the guidepoint. It should be in the dead centre of the sphere, at the global origin, and share context with the sphere’s raw geometry. We will need this point later on.
Starter shell on reference image. Note the shell’s lack of clear polarity.
💡 For the protrusions, our approach is to model only one of each kind. We’ll then use an extension to vary their appearance and to distribute them. We will start making their general form. Don’t worry if their forms look a bit off now. Since they are components, we can always fine-tune them later.
⚡ Tag the sphere “Shell” and hide this tag. In the image, zoom in on some tentacles on top of the sphere. Take a look at some characteristic and revealing silhouettes. The shape of the tentacle can be broken down to a central stem surrounded by about seven smaller branches, a bit like a tree.
We want to carefully draw our stem aligned to global axes. This saves us from having to manually reorient component axes later.
To make a tentacle, simply draw a circle parallel to the ground plane. Push-pull it upwards into a cylinder stem, and make it a component. A radius of 1 metre and a height of 10 metre should fit. Repeat this process to create a separate branch, which also ought to be a component. Freely copy, move and rotate branch instances until the resulting shape schematically looks like the tentacle. Don’t scale containers yet. Keep the stem pointing straight up. Select all eight solid components and turn it all into one component. Make a new tag “Tentacle” and assign the component to it.
💡 Protrusions will later be scattered onto the shell according to the location and orientation of their local origin. The origins of the subcomponents do not matter here. We will now control the component’s origin.
⚡ Enter the tentacle component, activate Tools → Axes and set the local origin to the stem cylinder bottom’s very centre. You may need to hover over its perimeter to find it. Make sure its blue axis goes parallel with the centre stem.
Starter tentacle component. The X-ray view reveals correct origin position and orientation.
💡 Now, we want to lend a more organic feel to our heap of cylinders. There are many ways to do this. The most powerful is using Vertex tools in conjunction with SubD, both from Thomas Thomassen. This time, we’ll use Fredo’s Fredocorner.
⚡ Install the latest versions of Libfredo and Fredocorner. Run Round, hover over a target circle, click and then enter a sizable radius. If rounding does not work, try lowering the radius. It should be large but must not self-intersect. Leave the stem bottom untouched. Make sure that the rounding faces are smoothed. After rounding, we can scale the individual branch components for more variation.
The tentacle component with rounded parts, looking a bit like a 🌵.
To avoid unsightly gaps, push-pull the stem cylinder bottom down so that the stem becomes twice as high. This way, all stems will pierce the shell, even if the surface is ruffled later on. To taper the stem, scale its bottom circle inwards.
💡 A close look at the yellowish globules on the reference image reveals a mushroom shape. The globule can be made using a workflow very similar to the one described above.
⚡ Move a copy of the main shell off to the side. Tag it “Globule”. Make it a component. Enter it, select all raw geometry, and resize it so that the radius is about 2 metres. Still inside the component, with all raw geometry selected, move it straight up about 2,5 meters. This should leave the origin visible hanging in the air just below the sphere. Finally, select only the lower faces of the sphere and scale them downwards and inwards, so that the total shape is drop-like.
Globule component’s lower faces being scaled. Note the origin’s position.
💡 The reason we take such care to control component origins is that they determine how components attach to anything else. This principle is powerful, yet simple. You can test this yourself.
⚡ Open the Components window, activate In model, select a component, go to Edit, and set its Glue to property to Any. Do this for both protrusions. Turn on the tag Shell. Now, from the components window, drag a protrusion into the viewport and along the shell. Click to place it, and repeat. This works on any curved target surface.
Glue-to components manually test-placed on a sphere. Their size and orientation align with the background reference image.
💡 The reference object has colours. Let’s create some quick nontextured materials. Overdoing saturation and contrast is a common mistake. Shun this practice. Current shading affects material appearance. Using sun shading when evaluating is recommended. The HSL colour picker is the most natural to work with.
⚡ In the panel Materials, click the plus sign Create. Give your materials dummy colours and short descriptive names like “Shell”, “Globule” and “ Tentacle”. Paint all targets accordingly. In the Materials panel, select a material, click the Edit tab, and click Match color on screen. Sample-pick a representative part on the reference image. The material updates accordingly. You typically need to manually increase material lightness and adjust saturation and hue to match the original impression. Repeat this process for all three materials.
💡 A pro visualisation tip is assigning separate materials to edges. We can use this to control profile colours independently of face materials.
⚡ Create three new materials based on the previous three. Append “edge” to their names, and raise their lightness noticeably. To assign materials to edges, we need first to select all and only edges. This can be done by selection filtering in the Selection Toys extension. But the built-in wireframe face style can help us, too.
Turn View → Hidden geometry on. Turn View → Face style → Wireframe on. This will exclude all faces from showing. Enter a component and select all. Entity info should now still report edges only. In Entity info, click the material swatch, pick the edge material and confirm. Repeat this for all component definitions.
To assess the result, switch to face style Shaded, turn Hidden geometry off, turn Profiles on and set the panel Styles → Edit → Color to By material. Adjust the materials to your liking. 💾 Save your work.
Separate materials assigned to faces and edges. The legends were true: sausage trees exist.
The main geometry is now built – well done! In the next part, we will transform our main geometry to something more organic.
🚩 In the previous part, we built the main geometry. Now, in this final part, it is time to spread the fun and roughen things up a little.
Part 3 of 3 – Going organic
Since we only need some hundred component instances, we could distribute them using Thomas Thomassen’s handy Place component or even drag them manually using glue-to, and then vary them with Jan Sandström’s Chaos. But this time, we’ll explore Thomas Hauchecorne’s extension Skatter, currently version 1.X. Skatter allows us to place, rotate, and scale thousands of instances in one single operation. It gives power and control.
Delete any surplus protrusion instances, so that only one of each protrusion definition remains, and move these to the side, well off the shell. Install Skatter, which has a time-limited free trial version, and activate its panel in Extensions → Skatter → Skatter.
In the Skatter panel, under Hosts, click the first plus for Pick a grouped surface, and in the viewport click the sphere shell. This now becomes the target surface. Next, under Scattered objects, click the plus button and in the viewport click the tentacle component. This is the source object.
Under Distribution, set Type to Random. Set Mode to Wrap. Slide Pointing all the way to Normal. Now set Density to a value that matches the reference image – around 0.065 could work. This should scatter about two hundred outward-pointing tentacles randomly across the surface.
Under Random transform, activate Rotation and set the X and Y values to your liking. Try ± 12 degrees and leaving Z values at the 0 to 359-degree default. Activate Scale, where a value of ± 25 could work. Aspect ratio should remain locked to XYZ. These settings control the growth direction and the size of the tentacles. The discerning user has plenty of further settings to explore, but this suffices for now.
Skattering as per version 1.X. The sphere is the target surface. The source components are hanging in the air. The red placeholders are previews.
The red wireframe boxes preview the result. When they look good, create geometry by clicking (re)Generate. This creates a group with the result. Assign a material and a tag to it.
💡 Avoid shaping too subtly. In real-world objects, our acute senses often pick up slight variations. However, the crude way in which digital 3D models typically are reproduced means that you often need to exaggerate shapes and their variation a little in order to make them speak.
⚡ Repeat the above process also for the globule component. The principles are the same. To save time, we can start from the previous Skatter group. To do this, right-click any Skatter group and pick Duplicate Skatter group. Then, under Scattered objects, delete the tentacle, add the globule, and under Miscellaneous, click New seed to rerandomize placing. Play around with different values to achieve the desired look.
You can re-edit a skattered group at any time. Simply right-click it, click Edit Scatter Group, tweak the values, and regenerate. When you are done, stow away the two original source components in a hidden tag.
Post-scattering result. About 400 protrusion instances pierce the smooth shell.
💡 To further the organic feel, we now turn to surface erosion. Eroding is destructive, so first make a unique copy of the target, as a backup, and assign it to a hidden tag.
⚡ Install Christina Eneroth’s Eneroth terrain eroder, open the sphere, select all faces, and run Extensions → Erode. Try setting Iterations to 3 and Pointiness to 0.35 and start eroding. This may take a minute or two. If you are prone to falling asleep, consider setting an alarm clock first 😴. Undo and retry until you’ve found a good erosion. To avoid jagged self-shadows, select the shell, and in Entity info turn Cast shadows off.
Optionally, we could ruffle also the protrusions. The method used above works best for making minor ripples on similar-sized faces. There are other ways to unstraighten geometry. To gently mess up the tentacle parts, one approach would be to add new edge loops to their elongated cylindrical parts, and then to nudge these around with Vertex tools’ soft selection. Feel free to experiment, or to leave all as it is.
When done, hide everything but the virus model, select all, and create out of this a virus master component. You should now have something like:
The finished virus model with undulating shell. Edges are coloured by material.
💡 Viruses love company. Let us recreate the view seen in the reference image. This is achieved by instancing and fine-tuning the visual style.
⚡In the panel Styles, click Edit and Watermark settings, then activate Display watermarks. Add a new one by clicking the plus button, navigate to the reference image file, double-click it and import as Background. Set Blend all the way to Image, and next set display mode to Positioned using the centre radio button, and slide Scale until the size looks good, and confirm. In the Style panel’s watermark list, make sure your reference image is below Model space. The reference should now be visible as a fixed viewport background. Switch to the Background subpanel and set model background colour to match that of our reference image.
Before touching scenes, make sure the camera is in perspective and has a reasonable field of view, say about 20 degrees. Set camera to front view, turn on and adjust shadows so they fall nicely on the shape, and play with light and dark. Typically, a shape reveals itself most clearly when it catches direct light and grazing light and shadow. We can at best approximate the reference lighting.
Do not move the original virus. Instead, gently navigate the camera until the 3D model virus barely covers the reference image subject and the shading looks right. Try keeping camera orientation close to the front direction. When done, without touching the camera, create a new scene and name it descriptively.
Move out instance copies of the virus component, so that these match the other three viruses seen in the reference image background. Believe it or not, this can be the trickiest part of the whole exercise.
Move on one axis at a time by locking movement with the arrow keys. It is helpful to temporarily toggle on View → Face Style → X-ray. This way, we can see the geometry and the reference image at the same time. Repeat this until all four viruses are in place.
💡 To attain greater variation visually, we can rotate the viruses, so that different sides are facing the camera.
⚡ Since the camera position is saved in the scene, we can safely navigate to another view. We must edit from the root context only. Navigate the so that the camera is inside another virus instance, but do not open its context. Find the central guidepoint. Activate rotate tool, place it right at the guidepoint and rotate the entire virus instance arbitrarily and twice, in different planes. Rotation planes can be locked with the arrow keys. Red and blue rotation planes work best here. Repeat this for all three background viruses.
💡 We can indicate depth by adding fog. Artists who try to show everything at once are often mediocre. Don’t. Instead, create a strong focus.
⚡ Copy the scene by activating it through double-clicking, and add a new scene. Name it well. This will be our final scene. Keep the camera still. In the panel Styles and Edit, turn watermarks off. Activate the panel Fog and turn on Display Fog and Use background color. Drag the sliders until the background fades noticeably and the foreground motif strongly stands out. In the panel Scenes, click update. Home at last. Save the file, which should weigh below 10 Megabytes. Here is our work:
Straight out of SketchUp comes the final result. Don’t forget to wash your hands.
🏆 Congratulations! You have finished modelling the coronavirus.
💡 But there lurks one more danger: that of succumbing to self-expansionism. Even though we’re done, we may find ourselves revisiting the model at night, adding a little thing here, another there, in a process that is open-ended – or, as some would put it, hopeless.
The steps won’t be described here, but I went ahead to create a large though conceptually simple fantasy environment by spreading three translucent shapes and randomizing their size and orientation, like so:
Beyond the tutorial. Recontextualising existing material can be fruitful.
The purpose of this new environment is to convey a clearer sense of space when moving, as this animation shows:
Self-expansionism – some of us just can’t help it. And if you overdo it again and again, you might even end up as a professional 3D modeller.
😦 At the end of our journey, we may now discover something unexpected: the image we used for reference isn’t a photograph at all. It’s someone else’s rendered 3D model. Natural coronaviruses, as revealed by a real electron microscope photograph, tend instead to look something like this:
Transmission electron microscope photograph of coronaviruses of yore. Source: Murphy 1975, CDC Phil-4814
Coronaviruses have been around since at least the 1930’s. If this photo is a reliable indicator, they clearly look a bit different from our take. Their general shape is much more bloblike, the tentacles have greater relative length and wider heads, no globules can be discerned, and we have zero information on hue.
As life wants it, only at the end do we realise what we ought to have done at the outset. Or, perhaps not. We did reach our initial goal. Finishing a fair model, our little adventure taught us some elementary organic modelling. And this dire quarantine has afforded us a peek into the hidden worlds within.
– Don’t sneeze!