Hello! This isn't exactly an update but I thought it might be interesting to take a look at the process that goes into preparing 3D sculpture scans before they're added to Figure Drawing Garden.
We'll be starting off with a scanned sculpture. In this case it's titled 'Statue of an Unknown Cynic Philosopher' and was generously scanned and uploaded in the public domain by Statens Museum for Kunst. The detail of the geometry on this scan is exquisite, it contains 4,000,000 vertices providing astonishing detail from veins in the forearms to creases in the philosophers brow. However, for this scan to be added in game we're going to need to reduce this x40 to about 100,000 vertices while keeping as much of the stunning detail as possible.
To begin with we first add the statue to the garden inventory chart. We assign it the ID 'R0018' as this is the eighteenth 'regular' sculpture rather than classing it as an F, M or B (fountain, monument or bust) sculpture. We then note the sculptors name and year if the information is available. We make some notes about the region, pose and drapery which may be useful later on when searching the inventory. Next we note the quality of the scan in this case the geometry is 'Exquisite'. We note that there is no texture included and finally we make a note that the raw scan contains 4,000,000 vertices.
Back in Blender we do our first cull of vertices. We use Blender's 'decimate' modifier to reduce the vertices count. As we do so we focus on specific areas of heavy subtle detail. We cull as many vertices as we can until we begin to notice minor details such as the wrinkles beneath his armpit or the veins on his arm being lost.
I set the decimate ratio to 0.2. As you can see below we do lose some minor detail but this reduces the vertices count right down to 800,000. I also check the 'triangulate' checkbox as we'll be bringing the model into Unity later. Now we just need to reduce the vertices x8.
Next we're going to select the areas that we don't want to lose any more detail from. As you can see below I select features in the face, skin folds, knuckles, veins, etc.. We assign these vertices to a new vertex group. Then select the inverse of these so that everything we don't want to preserve is selected, assign these to a new vertex group.
This massive second cull has brought our philosopher down from 800,000 to 160,000 vertices. Again we have lost some details but because we carefully selected the areas we wished to preserve, the loss of detail is minimal - mostly affecting his hair and drapery.
Now at this point we still have to find 60,000 vertices that we can remove. The first place I'll look to cull more vertices is the statue's stand as this isn't all that important for a game focused on drawing figure drawing. Then I'll cull vertices hidden beneath his robe and a couple on the very top of his head which won't be seen often. Finally we cull all of the flat areas that have more vertices than are required to describe the form.
After doing all this we're still left with 129,000 vertices. While the 100,000 vertices target isn't a strict rule - often simpler statues can run right down to 60,000 while complex monuments with multiple figures might hit 150,000 - for the sake of this example let's stick to the 100,000 target.
Because we've already removed all unnecessary vertices this unfortunately means that the remaining 29,000 vertices are going to have to be taken from places we'd rather not take them from. I go back to the initial vertex group we culled which included everything except the preserved details. Decimating this group brought the vert count down to 103,000. I then very slightly culled the preserved group to hit 100,000.
So here's what we end up with once the mesh has been optimized! Each model on the left consists of 4,000,000 vertices while those on the right consist of just 100,000. It's unfortunate that some of the originals scan's quality gets lost - I was especially fond of the detail in his left hand.
But we're not done with optimization just yet! We have our high quality sculpture that the player can draw up close but when it's further away we don't need it to be as detailed. To solve this problem we use a LOD ( level of detail) system which swaps the model with higher or lower quality versions based on the players distance.
There's no need to be as careful here, we simply duplicate our model and decimate the new one. I reduce the vertices down to 40,000. We then duplicate the sculpture again and bring this last one right down to 12,000 as it will only be seen as a silhouette in the distance.
Importing this to Unity and setting up the LOD system is extremely easy. We simply give all the statues the same name followed by 'LOD0', 'LOD1' and 'LOD2' from high detail to low. Then we set all of their positions to 0,0,0 so that they inhabit the same space before exporting the file as a .FBX. Once we import this to Unity the LOD system will automatically be set up.
We'll leave our philosopher here for today but there's a lot left to be done before he's ready to be drawn! Next we'll need to give him some texture.