Book cover report - Blender and the Jagged shadows
I have been making steady progress on the spaceship I am designing for the cover of my latest book, number six in the dark galaxy series of sci-fi novels. It looks a lot more like a spaceship every time I work on it, but I am far from happy with it yet. I'm using Blender to create the book cover, which is a 3D application, like the sort of thing used to do CGI in Hollywood movies. How it works is, you use points in a virtual space connected by edges and surfaces to define a 3D shape, then this shape is colored and virtual lights are shone on it, before a virtual picture (called a render) is taken of it. It’s a complicated way to male a picture, but the results are worth it.
Like I said, I’m quite happy with the slow progress I’m making as I create the image for the book cover, but even so every time I fire up Blender to do some work on it, there is always something that catches my eye that I think could be made better. This time the thing that caught my eye was the shadows on the slanted areas of my spaceship, areas such as the arrow-shaped nose. The shadows on these angled surfaces looked striped. The darker areas in places looked like crosshatching done with a wide paintbrush rather than naturalistic shadows. I needed a way to minimize or remove them, and so I went searching across the interwebs, and I soon found that I was not the only one with these issues. There were plenty of questions on Stack exchange, like this one, searching for a solution.
This post is about writing and designing the cover of book six of the Dark Galaxy series, but part one, Galaxy Dog, is already available:
What starts as an ordinary invasion of an alien planet brings to light an ancient archeological site of huge importance. A young man called Knave makes a life-changing discovery there and rises from a lowly position as an infantry trooper to become a player among the powers of the galaxy.
The entire series so far is available to buy from Amazon.
I found one suggested solution here. The solution says to play with the softness setting of the virtual lights being used to illuminate the model. That sounded very logical, but there was just one problem. There was no softness slider in my version of Blender. It turns out that this softness control was recently removed. I discovered on Reddit that the control was removed due to continuing work on the system Blender uses for shadow casting. You used to have to chose between two types of shadows, which were ESM or VSM, but since version 2.81 Blender doesn't use either of those anymore. They've switched over to using a method called PCF shadow mapping, or Percentage Closer Filtering, which is both faster and less prone to light leak. The softness slider is called ‘sub-pixel jitter’ by the team of dedicated volunteer devs who keep evolving and bettering Blender, and it looks like they're ditching it in favor of a system which softens shadows depending on the size of the virtual light. It was all very interesting, but it didn’t help me solve my problem, so I kept on going down various internet rabbit holes, looking for some clue.
I found a few more hints relating to size, again on Reddit, though not the size of the virtual lights. The threads that looked like they might contain a promising solution were talking about something called ‘cube size’ for most of the virtual lights, or ‘cascade size’ for the special virtual light used to simulate sunlight. The advice was to enable high bit depth under properties/render/shadow, which I did, then increase clip start and decrease clip end under properties/light/shadow, which I didn’t do. No for any good reason, I simply got distracted before getting round to making those changes. After experimenting it turned out cube size was the important setting for making shadows work better on sloped surfaces, but the higher the cube size I chose, the slower Blender started to react.
After a lot of fiddling I managed to create a set up of lights that weren’t hitting sloped edges too indirectly, which meant I could get pretty good results with a cube size that didn’t slow my computer to a crawl. The shadows still haven’t completely lost their jagged edges, but the problem is a lot less eye catching now. It is also a problem that is more noticeable across a flat area of the model, so the more greebles and complications I add, the less of a problem the jagged shadows become.
So my cover image keeps slowly marching toward a state where I will be happy enough with it to upload it to the agregators I use to reach the reading public. I guess I’m going to have to do some more work on writing the actual story to go with the cover. I only have just south of 40,000 words so far, which is far short of where that needs to be.
I feel very positive about the whole project, though. Both the story and the cover are gradually taking shape and, if everything goes to plan, they should both reach completion and get uploaded to Amazon, Kobo, Smashwords, and all other reputable purveyors of ebooks at pretty much the same time. To end, just a reminder that the best way to support this blog is to buy one of my books. Simply go over to Amazon, or Kobo and get one.