nav2

Tuesday, February 16, 2016

Spiter Render Kit - for Blender 3d

Here is something that I made for myself - primarily for game jams. I used it on a bunch of personal projects too. After a while I decided to pick it up, give it some polish and share it with the rest of the world.

What is Sprite Render Kit?

Sprite Render Kit is a sprite rendering system for Blender - specifically designed for rendering animated and static sprites for 2d games.
Its benefits become most obvious when you need to create a sprite with 4 or 8 directions of animation. It's main goal is to save you time!

In one click you render an animated character from 4 different angles and the files are properly named!

The Kit contains:


- A Scene Setup - Created to allow Blender to render an animated model from 4 different angles simultaneously.
- It is made out of one main scene (where you set your settings) and 3 more scenes for the remaining camera angles!
- The work Layout is created in a way that allows the user to conveniently view the model from all the 4 target rendering angles on one screen.


- An extensive Python Script, created specifically to allow the user to sync all scenes to the main one. Set it up in the main scene, the rest get synced to it in just a single click:
- It syncs all of your Render settings (BI and cycles)
- It syncs all of your Freestyle line sets from the main scene to the other scenes in the file (useful for sprite sheets with lineart)

- A Camera Rig, capable of simultaneously controlling all 4 cameras:
- Designed for Rendering an animated model from 4 different directions
- In ortographic or perspective mode (Ortographic is recommended)
- Tweak the center and angle of rendering with easy to use controlers
- Control zoom level
- Control render angle (45 degrees = isometric)
- Control the height angle of all cameras or on a per camera basis
- Control an offset on the left and right cameras - easier to center the model

- A node output setup - capable of rendering all sprites to a dedicated directory -set with proper naming conventions

Great! Now, how do I use it?

Here is a How To video:
The process is fairly straightforward!
  1. Open the blend file included in the zip
  2. Go to the first layer and Append your animated model in it.
  3. Play the animation, set the animation range to the proper value - the one you used in the appended file. Keep it playing while you configure your cameras.
  4. Select the model's armature in object mode and scale it up/down if needed, position it in Z and Y so it is centered in all 4 views.
  5. Go to the layer of the camera controls and use the "y offset" controller to position in center your character on the bottom two views.camera controls layer
  6. Use the "heightCtrl" to set the Z angle of rendering (height) you want to see your character in.
  7. Use the "spriteRenderCams-globalCtr" properties (N-panel) To configure these optionally:
    1. Isometric angle - Rotates the camera rig on Z - this allows for isometric angle. Set to 45 to get diagonals.
    2. Ort scale - This can be used to zoom in/out the 4 cameras (orthographic)
    3. Persp/ortho - If set to 0, the cameras switch to perspective mode. It's recommended to keep at 1 (ortho)
    4. Persp focal lenght - This can be used to set the focal length of the 4 cameras (when in Perspective mode)
  8. Set your Rendering settings (Make sure you are at the a-Main scene if you aren't)
  9.  You can enable Freestyle optionally and set your linesets
  10.  Run the script that I have provided in the blend file ("syncScenesRender.py") - always run it before rendering. It syncs the 4 scenes. Syncs your render settings, your freestyle linesets, makes sure everything on layer one is in all 4 scenes.runScript
  11.  Render single frame. A new folder called "output" will be created in the same directory where your spriteRenderKit.blend file is. Inside that folder you will find a single image from all 4 angles. See if you are happy with how it looks. See if the naming is correct. The sprite pointing to the left is named "left**.png" and the one pointing up is "up**.png" - whatever makes sense to you.
  12.  If they are not correctly named, you can rename them by selecting the appropriate output node and in it's n-panel change the "File Subpath" to the appropriate name. Keep the ##.renameSrk
  13.  Run the Sync script again and this time Render it as animation sequence. You will discover that the output folder is now populated will the frames. The script works with Blender Internal, Cycles and Freestyle.
  14. From here on you can use a tool such as shoebox to put all the frames in a single spritesheet. Alternatively you can use them as an image sequence - it all depends on the game engine you are using.

Where can I get this?

I am glad you asked. :)

Blender market (buy from here to also support blender!):
https://cgcookiemarkets.com/all-products/sprite-render-kit/

itch.io:
   
By getting it you also get my support in using it, any ideas you might have in improving it too.


No comments:

Post a Comment