|
![]() |
Batch Rendering on Windows: Part 1May 8th, 2010This question is being asked quite often: how to render a series of boxes or books using the series of images. Of course you may render them one by one by replacing side images, but an easier way exists. Let’s start from the simple scenario: you have a number of images and you need to render the same number of boxes, with those images on the front side. Create a “batch” folder somewhere, for instance on the desktop. Then create an “images” subfolder there and copy your images to that subfolder. Now create a project that will be used for rendering or copy an existent one to the “batch” folder. Name it “project1.box3d” (you may use different name, of course, just replace “project1″ with your name in the script below). Create an “out” subfolder in the “batch” folder. It will be used for rendering results. Now, the most important step. You need to create a batch file that will render boxes with your images. To do that start notepad or any other editor that allows to save plain text files (Word is not good for that). Then put the following two lines to your file:
The first line defines a path to the Box Shot 3D executable. Modify it if you install Box Shot 3D to another location. The second line is a bit complex. It does the following: for each JPEG-file in the “images” subfolder it runs Box Shot 3D and asks to render project “project1″ with that JPEG as a front side image and save the result with the same name to the “out” subfolder. It looks tricky, but it is actually quite easy. The “-q 1″ parameter overrides project’s quality setting and asks Box Shot 3D to render boxes with low quality. This is useful for fast checking of the script, because low-quality rendering is performed much faster than the production one. When you check the script and see that it renders everything as you need, just remove “-q 1″ from the second line and run the script again. This time rendering will last much longer, but you will get the production quality images. Now save the file as “go.cmd” to the “batch” folder and run it. Box Shot 3D should start, load the first image, render the project and then quit. Then it should start for the second image and so on. You will see the results in the “out” folder. By default, Box Shot 3D doesn’t take size of image into account and use size of the object from the project file. You may override this by adding “-fit” option just before “project1.box3d” to the second line of the script. But be careful with this option, because automatic resize doesn’t take camera’s field of view into account and the object may not fit the screen after resizing. If Box Shot 3D doesn’t start at all, you need to check the first line of script. Perhaps the path is defined with errors. If Box Shot 3D starts, but doesn’t load images or doesn’t quit after rendering, you need to check the second line for errors. And do not forget that the script renders project for every JPEG file. If you need to render PNG, TIFF or PSD files, you need to modify the mask in the second line. What if you need to define Left and Top sides as well? I’ll explain this a bit later. Mac-people will get something to read as well. Feel free to ask questions and suggest scenarios for batch rendering. This is a quite complex topic, but as it allows to get a very interesting results, it is worth learning. Your Comments:
Leave A Comment: |
© 2005-2010 BoxShot3D.com |