Producing an EBook Cover With POVRay and Inkscape 2008-12-03
来源:<a href="http://penguinpetes.com/b2evo/index.php?title=producing_an_ebook_cover_with_povray_and&more=1&c=1&tb=1&pb=1" target="_blank">点击进入</a><br>Date/Time Permalink: 12/03/08 06:49:52 pm<br><br><div class="colorscheme2"><p>This is going to be half-tutorial and half-exhibition, for at least the intermediate graphics artist.</p>
<p>In
selling ebooks, even though you're buying an electronic document that
exists only in the virtual world, sellers prefer to market the book
with a graphic of the book as if it were a physical object. Which has
given rise to a small market for ebook cover design and renders. Here,
I've produced a hypothetical example:</p>
<p><img src="http://www.penguinpetes.com/images/EBook_render.jpg" alt="sample ebook"></p>
<p>So
I'll just walk you through the steps. It isn't worth pinning it down in
detail, because that might change for an individual project. You might
draw the cover and spine in something besides Inkscape, you might need
a different size, and you might want to show a paperback or a
spiral-bound book or some other design. I'm also going to use <a href="http://www.kpovmodeler.org/">KPOVModeler</a>
and show how to do it in the GUI, since my usual POVRay tutorials
degenerate into a gobbledegook of code which I'm not sure if that's
lost on anybody or what. So let's try reaching the <em>visual</em> learners this time.</p>
<p>So
I first draw the cover and the spine as PNG files which have dimensions
of 765x990 and 100x990. Here's the aspect, chosen to mimic A4 letter
size paper, and a book of about 100 pages or so:</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_cover_and_spine.jpg" alt="aspect of cover and spine"></p>
<p>But
they're actually saved as two separate files. Now in POVRay, we're
simply going to shape a book out of a few polygons and use the two
images as textures for the front and side. Let's try to get KPOVModeler
showing it. Start with a merge of a box and a cylinder.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step1.jpg" alt="book step 1"></p>
<p>The two objects are textures with the flat images we made earlier.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step1_texture.jpg" alt="book step 1 texture"></p>
<p>Next we're going to cut a slice out of those two merged objects with another box.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step2.jpg" alt="book step 2"></p>
<p>Last,
we put another box inside of the sliced-out box and color it white.
This will be our "pages" object. We could go to a lot of trouble and
use a texture on top of the white block to look more like paper pages
and we could also add some detail inside the top of the spine to make
it look like it has binding. Those are all more painstaking details.
We'll forget that here.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step3.jpg" alt="book step 3"></p>
<p>Now
comes the really hard part. If we just slap a white-colored plane for
the book to sit on and use a default light and camera, we get this:</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_wrong.jpg" alt="don't do this"></p>
<p>God,
that's terrible! To fix things so they're realistic, let's give the
plane a texture instead. It will still be pure white, but with the
addition of a finish which will have these tweaks:</p>
<ul><li>ambient color: a neutral gray</li><li>diffuse: 1.5</li><li>reflexion:
set the maximum to a slightly less than black shade. We only want to
reflect enough light to give it a gloss, not make it look like a mirror.</li></ul>
<p>The
next fix is to eliminate the horizon, so we make a huge cylinder around
the whole scene, camera, book, light, and all. We want an endless sea
of uniform white, just like if we had a studio backdrop. We give the
cylinder the same texture as the plane.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step4.jpg" alt="book step 4"></p>
<p>Now we have this:</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_better.jpg" alt="some progress"></p>
<p>The
next thing is to soften the shadow. Look around you now: you never
really look at the edge of a shadow again in quite the same way after
you start 3D modeling. Let's make our point-light be an area light,
with many light-points spread out over a disk shape.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step5.jpg" alt="book step 5"></p>
<p>Your
light in the preview windows now looks like a mesh. Every intersection
of that mesh represents a light source. In fact, we're making a round
disk of light-emitting objects which is more like our real-world bulb.
We're almost there:</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_fuzzy_shadow.jpg" alt="almost there"></p>
<p>One
thing you'll notice is that the render takes about ten times as long to
finish! That's because your computer's doing many times the work,
tracing a lot more rays than it was before.</p>
<p>One more thing
we'll do is illuminate the spine with a second light. This time, it's a
plain point light, with the color set to neutral gray - the concept is
called a "fill light". We're just filling in the shadowed part of the
spine so you can see it, but not making it strong enough for the book
to cast two shadows.</p>
<p><img src="http://www.penguinpetes.com/images/Ebook_step6.jpg" alt="book step 6"></p>
<p>And
now for the last tweak, we're going to create a render mode that is
1600x1200, quality 11, antialiasing set to 'recursive', threshold 0.1,
depth 8, turn on 'jitter' set to depth 2, and turn on radiosity. Oh,
boy, is that ever going to take a lo-o-o-ong time, even on a fast
machine! Go take a coffee break or even a nap; on a slower machine I
just leave it rendering overnight.</p>
<p>When it's done, save it,
then open it in Gimp and crop it down to usable size. I'd recommend
saving it as a high-quality PNG, that way it will stay crisp until
you're ready to use it. Scale it down and put it next to your order
button on your sales page, you crafty Internet entrepreneur, you!</p>
</div><br>
页:
[1]