How to render a single static image


Rendering a Single Static Image

This tutorial shows how to export a single image of your object using its current pose and the configured style settings, without rendering any rotations or animations, and show this image in your Playdate game.

This may be useful if you are just looking to render a title or background image.

  1. Let's do a render of Suzanne. Press Shift-A to open the menu and click Mesh -> Monkey to add her to the scene.
  2. Press N to open the Sidebar (if it's not already open) and click on the "Blendate" tab. Then click the Initialize button.
  3. In the Configuration panel, click the eyedropper next to "Camera (Required)" and select the camera you want to use for rendering. If you don't have a camera in your scene, you can add one using Shift-A and  clicking Camera.
  4. Ensure both "Render Rotations" and "Render Animations" checkboxes in the Configuration panel are unchecked.
  5. Go to the Preview panel (you might need to expand it) and click the "Render Preview" button. A preview image will appear in the Preview panel. 
    1. By the way, this image is also saved as preview_dithered.png (if dithering is enabled) and preview.png in your specified Working Directory (defined in the Render panel) if you would like to see the raw image file.
  6. You can adjust styling in the "Freestyle", "Outline", and "Dithering" sections within the Configuration panel. After you've made a change, click the "Render Preview" button to see it's effect.
  7. Once you're happy with the look of Suzanne, go down to the Render panel. Let's tell Blendate where to put our files. In our case, since we're only writing out one image file, we only need to specify the "Spritesheet Directory" to our project source directory.
  8. Click "Render" then wait for the "Spritesheet Rendering Complete!" message.
  9. Now, let's put this image in our Playdate game. Open your project source directory. You should see "Suzanne.png" in there.
  10. You can load "Suzanne.png" just as you would any other image using the Playdate SDK. For example:
    local screenWidth = playdate.display.getWidth()
    local screenHeight = playdate.display.getHeight()
    local suzanneImage = playdate.graphics.image.new("Suzanne")
    function playdate.update()
        suzanneImage:draw((screenWidth - suzanneImage.width) / 2, (screenHeight - suzanneImage.height) / 2)
    end
  11. Compile & run- hopefully you should see Suzanne in all her static glory. Done!

Get blendate

Buy Now$35.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.