Author Archives: Eric

How to Put a Book on Google Books

I asked Andrew Glassner to outline the process he went through to free up his book from his publisher and put it on Google Books. Here’s his reply. I hope this information will encourage anyone else who has authored a book that’s now out-of-print to spend a bit of time and effort to get it out to us all.


If you plan to release your book through Google Books, the most important thing is that you own and control the copyright. Most book publishing contracts state that when the book goes “out of print,” the rights revert to the author. This is usually not automatic: you have to ask the publisher for the rights, and they have to explicitly return them to you. I usually ask for a real, paper letter with a real, human signature on it that states the rights have been returned to me (I don’t know if an email version would carry the same official weight). This is a good time to ask them for any other physical or electronic documents they have for your book, from illustrations to PDFs and so on. They’re usually under no obligation to give you these, but often they’ll give you what they have.

You’ll also need control of at least some “Territorial Rights,” which are discussed below. It’s probably easiest to get the publisher to revert the copyright and territorial rights at the same time.

Note that it’s usually up to the publisher to determine if a book is “out of print” or not. Even if it’s many years old, and they’re not putting ink on paper any more, they may still formally consider the book to be in print. I suggest contacting your publisher and first inquiring if it’s out of print. If they say it isn’t, but you think it should be, ask them why. They might just not have gotten around to giving it that status. Be polite and professional and work with your publisher to establish the status of the book as clearly as possible. When it is out of print, ask to have copyright reverted back to you. If the publisher wants to retain some rights, offer an agreement whereby they revert the rights to you, but you then assign some rights back to them. For example, you might grant them non-exclusive electronic rights, so they can provide the book on their website.

Now that you own the copyright, create an account at the Google books partner program. If you already have a Google account (say with Gmail) you may be able to simply use that; I chose to create a new account. I don’t recall if Google asks you for payment information at this point or not. If you end up charging money for any of your books, Google has to report that income to the IRS (if you’re from outside the US, I don’t know how this works). Although I was planning to release my book for free, I set up my partnership through my one-man LLC. I don’t recall if I had to give them any kind of tax information (e.g., a Federal Taxpayer ID, which is the business equivalent of a Social Security Number) at this point or not.

Once your account is created, choose “Books”. Go to “Add Books” and enter your ISBN. Often, this is the bar code printed on the book. Another source is Amazon, which usually lists the ISBN on the book’s page. Some ISBNs are 10 digits, some are 13. Try all the versions you can find until you get one that Google recognizes as your book.

Click the question mark next to Territorial Rights, look over the options, and enter the rights that you control. Note that the publisher must explicitly relinquish those rights when they return the copyright to you. I don’t know the mechanics of this step, but Google must be checking with someone, somewhere to confirm that you own the rights. When I initially listed my book, I chose “all” for this field, and a few days later Google sent me a nice email stating I didn’t own these rights. I contacted my publisher and explained I was releasing the book through Google Books and needed to control the Territorial Rights (in addition to the copyright they’d already returned to me). They were very nice about it, and a few days later let me know it was done. I don’t know what they did, but it worked.

Google will now ask if you have a PDF or physical book you can send them. I said I did not. They then said that they would let me know if and when they scanned the book in the future. They seem to say this even if they’ve already scanned the entire book. My understanding is that if they’ve scanned any of it, they’ve scanned all of it, even if they’re only displaying a few pages. So I figured that if I gave them some time, their database of scanned-in books would catch up with this request to scan in the book, and the full PDF would appear. That indeed happened about a week later.

At that point your book’s status will go to “Live”. At the far left of your book’s listing (just to the left of the ISBN) there’s a little pencil icon. Click on that. You can now control how much of the book is shown to viewers by choosing a level from the “Book Browsable” drop-down. If you choose 100%, then they will give you the chance to apply one of several different Creative Commons licenses. There’s a nice summary of them right there on the page. I chose “Attribution-Noncommercial,” so that I get credit for my work, nobody can re-sell it for profit, but other people can build upon it.

Let Google digest and process these changes.  They say it can take up to a few days.  Then your book should be ready to share with the world!

“Principles of Digital Image Synthesis” now free for download

Andrew Glassner released his two-volume book “Principles of Digital Image Synthesis” to be free for download from Google Books. This book is pretty amazing in its scope and depth. Published in 1995 by Morgan-Kaufmann Press, it provides an education in almost all the key scientific and mathematical concepts used in rendering. The human vision system and color, display systems (pre-LCD, though), signal processing, sampling and reconstruction, Monte Carlo integration, energy transport, BRDFs, and much more, in 1600 pages. I turned to it for some bits of theory for our first edition. Despite its age, it is a worthwhile volume, as the underlying science and math are still valid.

Update: get a nicer version of the PDF version of the book from Iliyan’s site, or from here. Read more about it here.

Unfortunately, Google Books doesn’t quite list the book correctly and makes it hard to find both volumes when searching. So, here are the direct links:

Just hit the PDF download link in the upper right corner of each page, prove you’re not a computer, and you’ll then have each volume. You’ll want to rename the PDFs, as Google Books calls each volume the same name, Principles_of_digital_image_synthesis.pdf. Volume 1’s PDF is 12.0 MB, Volume 2’s is 17.8 MB.

Finally, to get the errata for the book, go to the author’s page about the book.

Special bonus project: I just asked Andrew Glassner if it would be OK for someone with Acrobat or other editor to put both PDFs into a single PDF, and to fold in the errata. He said that would be great, and that he could provide a bit more new errata which is not on his webpage yet. Let me know if you’re interested in doing a good deed for the graphics community and I’ll coordinate any efforts. Update: looks like we’ve got a volunteer, and so I’m hoping a new PDF version will be available in a few days.

Tools, tools, tools

Last month I mentioned gDEBugger being free and the joys of cppcheck. Here are some others that have crossed my path for one reason or another. Please do let me know (and so let us all know) about any worthwhile tools and libraries I haven’t blogged about – part of the reason for putting out this list is in hopes of learning of tools I haven’t heard of yet.

  • There is now a free version of AQTime, a commercial application that finds memory leaks and performance bottlenecks.
  • The Intel Graphics Performance Analyzers are supposed to be good stuff, and free – you just sign up for the Visual Adrenaline Program. I haven’t used them, but know people that have (hey, there’s Dan Baker on Intel’s page – nice).
  • Intel’s Parallel Inspector, despite its name, is particularly strong at finding memory leaks in any programs. Free month trial.
  • NVIDIA’s Parallel Nsight, also despite its name and focus of its advertising, is not just for CUDA and DirectCompute debugging and analysis, it also works on DirectX 10 and 11 shaders – you’ll need two machines networked together, one to run the shader and the other to control it. The Standard version is free, though when you sign up for it you also get a time-limited “we hope you get hooked” Professional license. Due to a currently-goofy pair of machines in my office (on different networks, and one’s a Mac I use purely as a Windows box), I haven’t gotten to try it out yet, but the demos look pretty great.
  • The Windows Performance Analysis Tools are evidently worthwhile for checking coarse-grained performance and bottlenecks for Windows programs. Again, free. I’ve heard that a number of groups have used xperf to good effect.
  • On an entirely different subject, HLSL2GLSL does a good job of translating most DirectX 9 (only) HLSL shaders to – wait for it – GLSL. Open source, and more info here, which discusses related efforts (like Mojoshader) and translation in the other direction.
  • Not really a tool per se, but still cool to see: here’s a way to find out how much free GPU memory is left for your OpenGL application. Anyone know any way to do this sort of thing with DirectX and Vista/Windows 7?
  • Will WebGL take off? Beats me, but it’s nice to see there’s an inspector, similar to gDEBugger and PIX.
  • GLM is a C++ math library particularly well-suited for use with (but not at all dependent on) OpenGL.
  • Humus points out that the old workhorse PIX now has new functionality that lets you assign names to objects, making debugging easier.
  • While I was messing with his binvox and viewvox programs, Patrick Min pointed out there’s a free 3DS file format library out there, lib3ds. I tried it out and it did the job well, taking very little time for me to integrate into my own private copy of binvox.

cppcheck: free, easy, and great

Jari Komppa pointed this tool out to me while we were talking about my previous post on gDEBugger being free. The tool: cppcheck (download here). It’s free, it’s very simple to use, and it’s effective. Install, then run it like so:

cppcheck -q theRootDirectoryOfAllCodeYouWantToCheck

It will then plow through all your C++ files in this directory on down and look for memory allocation/deallocation problems, use of unallocated array elements, and other defects. “-q” means “show me just the errors found”. It does the things your compiler should find but probably doesn’t (someone will no doubt correct me about this for gcc or somesuch, but  I use MS Visual Studio and it’s definitely true for that). For our current project it found about 15 problems, one pretty serious. For an investment of just a few minutes, this free tool caught a number of flaws that weren’t getting caught by other means. One particularly nice feature is that it tries all possible “#ifdef” paths, checking to see if any combinations cause code problems like undefined variables or similar.

I particularly love the fact that I didn’t have to do the usual thing of telling it all about the various include file paths and the eighteen other things I usually have to do to get similar programs working. It was so easy to run that I spent a whole two minutes more and tried it on another group’s project for which I had the code. It turned up a bunch of spots where the codebase needs some repair. Nice! About the only drawback is that the error messages are sometimes a bit terse and take some decoding. It’s open source, and they have specifically asked for help with documentation, so I expect this area will improve over time.

gDEBugger is now free!

Just noticed this on Morgan McGuire’s twitter feed. I don’t know why, but gDEBugger, sort of the PIX equivalent for OpenGL, is now free, go here for a license. They’ll be putting out a newer free version (5.8) by the end of the year, so it’s not like they’re discontinuing the product. Maybe it’s the “get them hooked” business model. Also, there’s talk that the current version doesn’t work that well with OpenGL 3.2 and above. Nonetheless, it’s an excellent product overall. Anyway, screen shots here.

To quote their literature: gDEBugger is an OpenGL, OpenGL ES, and OpenCL Debugger, Profiler and memory analyzer. It traces application activity on top of the OpenGL API to provide the application behavior information you need to find bugs and to optimize application performance. gDEBugger transforms the debugging task of graphic application from a “Black box” into a White box model; using gDEBugger you can peer inside the OpenGL usage to see how individual commands affect the graphic pipeline implementation. gDEBugger has a lot of “standard debugger” abilities, but also contains many special features for graphics software developers: view render context state variables, view allocated textures, textures properties and image data, Shaders programs and source code, break on OpenGL errors. In addition, using its profiling abilities, gDEBugger enables you to pinpoint easily the exact location of the application’s graphic pipeline performance bottleneck to let you optimize the application performance.

Update: Jari Komppa wrote, “This may shed some light on things: http://www.export.gov.il/Eng/_Articles/Article.asp?CategoryID=461&ArticleID=12274

Full text:

AMD to buy Israel’s Graphic Remedy company

The American chip manufacturer AMD is buying Israel’s Graphic Remedy company, the Calcalist financial website reports.

It appears that AMD – Intel’s competitor in manufacturing PC and server chips – will pay a relatively low amount for Graphic Remedy, some $4-5 million.

Graphic Remedy, founded six years ago, is a small company with seven employees. It gained renown for its series of simulation and debugging applications for graphic programs and computer games and became dominant among Cronus’ [sic – they mean Khronos Group’s] Open GL platform developers.

According to Calcalist, AMD seems to be buying Graphic Remedy in an attempt to expand its presence in the home and business graphic
processors market.

What’s in a name?

Now that I3D reviews are over (and my Minecraft addiction is beginning to wane), back to blogging. So I was reading “Yes!“, which is a pretty fun bathroom book. It’s a bunch of short articles on various recent bits of social psychology. The “you can use this in your business” tone of this book is annoying, unlike the same authors’ wonderful book, “Influence“. Nonetheless, there are cool little ideas that make you see the world in a different way.

One chapter I just finished was “When is your name your game”. It turns out that if you’re named Dennis, you’re 43% more likely to become a dentist than some random guy. If you’re name George or Geoffrey, you’re more likely to go into the geosciences such as geology. Your name also influences where you live: there are a disproportionate number of Louises in Louisiana and Florences in Florida. Someone named Washington is more likely to live on Washington Street. Even first letters matter: if your name starts with an A, you’re more likely to like Almond Joy than someone without that initial A. Of course, you say you’d never take on any of these sorts of biases, that’s what everyone in these studies says, but the statistics say different.

This seems true for at least one acquaintance of mine, Rod G. Bogart. With initials like that, not to mention a first name that goes with “and cones”, his name is perfectly suited to computer graphics work. Now if he just had friends named Roy G. Biv and Hugh St. Val, life would be complete.

So, be careful naming your kids. I highly recommend for a boy the name Raymond Tracey, “Ray” for short. Or Norman Victor might help point him in the right direction. If you’re more into math, perhaps Algy (though with a name like that, expect him to get beat up a lot, unless he can hang out with the cool kids and be called “Algy, bro”). For girls, Alfa Belinda could work, though names like Polly Nomial clearly give away what you’re up to, and could have a backlash effect; she might go into the study of implicit surfaces (shudder), just to rebel against you.

Benoit Mandelbrot dies at 85

I just received this news from Solomon Boulos, that Mandelbrot passed away. Would anyone have discovered this area of math if he hadn’t? Whatever the answer, many of us have whiled away at least a few happy hours rendering 2D and 3D fractals, and Benoit was the one who started it all.

Here are a few links in honor of Mandelbrot. I happened to have these stored away for the blog, time to put them up.

They Tried to Make Me Go to Rehab…

There’s only one way through Minecraft addiction, burning your way through to the other side. At least that’s my current theory. I’ll get back to posting for real after just one more little project… How I did this sculpture is shown here and here, using Patrick Min’s binvox and modified viewvox. Yes, I placed all 2302 cubes by hand; it’s sort of like knitting, with vertigo. You can even take the tour on YouTube.

Really, another Minecraft article?

Here at RTR HQ we like to consider ourselves trailing edge, covering all the stories that have already been slashdotted and boingboinged, not to mention Penny Arcaded. My last post included the simulated 6502 project. The madness/brilliance of this ALU simulator boggles my mind. Yes, Minecraft is awesome, and for the low low price of $13.30 it’s had me in its terrible grasp for the past week, e.g. this.

I wanted to run through a few graphical bits about it. First, the voxel display engine is surprisingly fast for something that runs in the browser. Minecraft uses the Lightweight Java Game Library to drive OpenGL. Max McGuire figures that the program tracks the visible faces, i.e. all those between air and non-air, and then brute-force displays all these faces (using backface culling) within a given distance. The file format keeps track of 16x16x128 (high) chunks, so just the nearby chunks need display. I don’t know if the program’s using frustum culling on the chunks (I’d hope so!). Looks like no occlusion culling is done currently. The lighting model is interesting and nicely done, we haven’t quite figured it out; the game’s author, “Notch” (Markus Persson), notes that it was one of the trickier elements to make work efficiently.

Me, I’ve been looking at voxelization programs out there, to see if there’s a good one for turning models into voxel building plans (it’s a sickness, seriously). Patrick Min’s binvox (paired with his viewvox viewer) looks promising, since Patrick’s a good programmer (e.g., his CalcuDoku app), the program’s been around 6 years, and it’s open-source. Binvox uses the GPU to generate the voxel views, so it’s quite fast. It supports both parity counting and “carving”, and can also remove fully-interior voxels after processing. Parity count is for “watertight” models (closed and manifold, i.e. the polygon mesh correctly defines a solid object without gaps or self-intersections, etc.). Carving is taking 6 views and recording the closest occupied voxel from each direction. It won’t give you holes or crevices you can’t see from the 6 directions, but is otherwise good for polygonal models that are just surfaces, i.e., that don’t properly represent solids. See his page for references to all techniques he uses. I found a bug in Patrick’s OBJ reader yesterday and he fixed it overnight (fast service!), so I’m game to give it another go tonight.