tags:

views:

23

answers:

1

I would like to generate 2D images of 3D books with custom covers on demand.

Ideally, I'd like to import a 3D model of a book (created by an artist), change the cover texture to the custom one, and export a bitmap image (jpeg, png, etc...). I'm fairly ignorant about 3D graphics, so I'm not sure if that's possible or feasible, but it describes what I want to do. Another method would be fine if it accomplishes something similar. Like maybe I could start with a rendered 2D image and distort the custom cover somehow then put it in the right place over the original image?

It would be best if I could do this using Python, but if that's not possible, I'm open to other solutions.

Any suggestions on how to accomplish this?

+1  A: 

Sure it's possible.

Blender would probably be overkill, but you can script blender with python, so that's one solution.

The latter solution is (I'm pretty sure) what most of those e-book cover generators do, which is why they always look a little off.

The PIL is an excellent tool for manipulating images and pixel data, so if you wanted to distort your own, that would be a great tool to look at, and if it goes too slow it's trivial to convert the image to a numpy array so you can get some speedup.

Wayne Werner
Aha, I had seen Blender, but didn't delve too deeply, and I couldn't tell if it could be run headless. Looking at it closer, I can do exactly what I was thinking of, and can run it in background mode (-b option), so this looks perfect. It may be overkill, but oh well if it works. Thanks!
Adam Endicott