by Nash » Sun Nov 22, 2015 12:15 pm
Hello, the example monkeeh.blend download isn't available anymore, can you please reupload it? Thanks. Nevermind, found it! The hyperlink is wrong but the text is the correct link. :D I was doing this hastily and didn't see that the text and the hyperlink were different.
EDIT: Had a lot of trouble figuring this out, here are some additional notes for anyone who's looking for information:
1) To setup the camera tracking setup that this script expects to work with:
- Delete any cameras in the scene if there are any, add a new camera (there must be only 1 camera in the scene) and position it however you want the sprite to end up looking like (adding a new viewport and using the camera view (keypad 0) might be helpful for you at this stage)
- With the camera selected, go to the Constraints tab (it should look like a chain, to the right of the Object tab)
- Add object constraint -> Track to
- For the Target, click it and choose the object you want to render (your monster/character/whatever)
- To: -Z
- Up: Y
- After setting the To and Up options correctly, the red colour from the constraint name should disappear, meaning it is now setup properly.
2) New users will most probably still get errors when trying to run this script. There is an oversight in the source code. In sprite_batch_render.py, line 169, the path needs to be fixed to this: C:/temp/sprite/sprite%s%s.png (it previously was using %s%d which was wrong. Alternatively, the user can just correct the path themselves before clicking the Render Batch button, but having the Python script fixed with the correct defaults is more user friendly)
3) HANDY TIP! If you plan to render your model with lighting, be sure to add constraints to your lights as well, with the Camera as the target. Depending on how your lights are setup, tick and untick the X, Y and Z boxes accordingly. If your lights don't have any constraints, the lighting will remain static, and because the script actually physically rotates the camera around the world, some angles in the render will have dark shadows, which you most probably do not want.
Last edited by Nash on Mon Jan 25, 2016 10:11 pm, edited 4 times in total.