September 23, 2019, 03:08:13 PM

Author Topic: need tutorial-> how to create sprites/sheets in blender?  (Read 202 times)

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 140
need tutorial-> how to create sprites/sheets in blender?
« on: June 20, 2019, 08:47:28 PM »
Topic says all.
I know its possible to create a spritesheet of an animated model.
But i´m to new in blender and i need help.
Btw.: if possible for blender 2.80
Maybe anybody can help

Edit: of course the spritesheet should not create in blender itself.only the seperate frames of walking, jumping and so on
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Online Derron

  • Hero Member
  • *****
  • Posts: 2419
Re: need tutorial-> how to create sprites/sheets in blender?
« Reply #1 on: June 21, 2019, 07:19:50 AM »
Either use an addon: https://www.google.com/search?hl=de&q=spritesheet%20blender%20addon

Or use some image tool:
Linux: montage -background transparent -geometry +4+4 *.png output/myspritesheet.png
This would add all png files of the dir to "output/myspritesheet.png"

In Blender you would setup an animation and then render it into multiple png files (not a video).



bye
Ron

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 140
Re: need tutorial-> how to create sprites/sheets in blender?
« Reply #2 on: June 21, 2019, 09:17:15 AM »
Quote
In Blender you would setup an animation and then render it into multiple png files (not a video).

Yes thats seems the way to go
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Online Derron

  • Hero Member
  • *****
  • Posts: 2419
Re: need tutorial-> how to create sprites/sheets in blender?
« Reply #3 on: June 21, 2019, 10:06:12 AM »
It is also not that hard to write your own python script to do advanced stuff.

For one of the competitions ("Creature Corp") I wrote such a script which hides/shows objects, moves them to a center point, rotates them ... and renders them.
That way I was able to render out isometric tiles of my objects with constant lighting setups (so light does not rotate with the object).

Afterwards I used a Blitzmax-driven tool to split stuff for isometric grids so that each grid cell could draw "its portion" of the multi-cell-image (eg. a "desk" was 2 grid cells wide/high) and the game engine could properly use the simple algorithm to calculate drawing order / draw figures behind elements.


Such specific behaviour / requirements wont be achievable with generic addons - so if you need similar stuff you better play a bit with python and writing functionality for blender the way you need it.

This means you can even have y "render-for-me.py" file which starts blender for you (headless), loads your file, does the render, ...
Means your graphician just models stuff the way they need - and you just link that models/scene to your "render.blend"-file. After your graphician updated stuff you execute your "build spritesheet.bat" which runs the python file, your custom "create my spritesheet / prepare sprites" application ... and the result is stored in your project folder ready to get consumed by your application/game.

At least I did so. Only culprit were render times - it just took some bunch of minutes to render out all the sprites - which is why I created filters so that not all items were re-rendered.
Does of course not work if you alter lighting setup - needs to re-render everything.


My script was based on 2.79 with the limited amount of 12 layers. With 2.80 introduced collections life could become way way easier (collections are way more flexible - so something like "desk with blue lamp" , "desk with red lamp" ... are achieveble without hardcoding it to your script to hide/show certain objects).


bye
Ron

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 140
Re: need tutorial-> how to create sprites/sheets in blender?
« Reply #4 on: June 21, 2019, 01:14:26 PM »
Thank you.
That are very interesting informations and i will take a look at the python scripting for blender.
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD