Thursday, February 10, 2022

Procedural Bookcases

Here's a sampling of some of the procedural bookcases I'm generating for 3DWorld's building interiors. These are placed in many of the rooms of houses, and libraries in office buildings. Each bookcase has a unique collection of books that can be individually removed by the player, carried around, put down, and opened up.

A bookcase has between three and five shelves containing books. Most books have the spine facing out, and a few have it facing in. Books are occasionally tilted to lean on another book or laid flat on a shelf. I've also mixed in some gaps and completely empty shelves. Here are some examples.


 


 

Books come in random widths, heights, thicknesses, and colors. Their titles are randomly chosen from a list of 5000 popular book titles. I haven't yet been able to come up with a way to generate realistically sounding titles. Some books have authors listed under their titles on the front cover. Author names consist of a male or female first name randomly selected from a list of around 1000 each, plus a last name I generate using a sort of Markov chain approach that includes a list of vowel and consonant word parts. In addition, some books have cover images that are randomly selected from one of my other procedural generated 3DWorld screenshots show on my GitHub project page. Books can be opened, showing pages randomly selected from various papers around my house that I captured with my phone camera. Here are some of the books I happened to find in this house.


Some books I took off the shelves and arrayed out on the floor. Huh, the two open books have the same page image.