Sprite Batch Render addon for Blender

Any utility that assists in the creation of mods, assets, etc, go here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Re: Sprite Batch Render addon for Blender

Postby Nash » Thu Jan 12, 2017 6:24 am

User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Jaxxoon R » Thu Jan 12, 2017 8:10 am

cce wrote:Edit: I also updated the plugin to be more user friendly. Now the camera stays still and just an user selectable object rotates.

But won't that lead to the object getting mangled as it's rotated independently from its bones?
User avatar
Jaxxoon R
 
Joined: 05 May 2014

Re: Sprite Batch Render addon for Blender

Postby Nash » Thu Jan 12, 2017 8:50 am

You parent the Empty to the Armature OBJECT, not a bone.

An Armature, as an object (in Object Mode, for example), will rotate the mesh it's assigned to deform without any problems.

It's only when you move the MESH that it will start to get mangled.

I just rendered some sprites 5 minutes ago, it works perfectly if you parent things correctly (except for the reversed angle issue, which fortunately is just a matter of changing a + to a - in the .py).

Again: parent the Empty to the ARMATURE, not the MESH.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Nash » Wed Jan 18, 2017 11:23 am

Hey cce, thanks for the quick fix. However, now I have a feature request... I wish I could do it on my own but Blender scripting is just beyond me currently. :'(

Would it be possible to somehow add an option to render more than 26 frames in 1 click? I was thinking, make a separate text box for just the sprite name. Then, if the name is 4 characters (POSS), the script would assume only 26 maximum frames.

If the name is 3 characters (POS), what the script will do is, it will append 0 to 9 to that name. The first 26 frames would be POS0 A to Z... then the next 26 will be POS1 A to Z... etc etc... right up to the maximum limit allowed by this naming convention.

Or... I don't know, any better ideas? Because right now I'm doing it all manually - set frame range to 1 to 26, type in POS0, click Render Batch, wait... then set the frame range to 27 to 52, type in POS1, render... wait... lather rinse repeat... it never ends. >_<

A second suggestion would be a "mirrored" option that would only render 5 angles instead of 8 - and duplicate the side angles and name them properly (angle 2 = angle 8, angle 3 = angle 7, angle 4 = angle 6)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Major Cooke » Thu Aug 01, 2019 2:08 pm

Now that blender 2.8 is out, I suppose it's time I either try updating this for myself or, if CCE wants to, he can too.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Sprite Batch Render addon for Blender

Postby cce » Wed Aug 07, 2019 1:58 pm

Major Cooke wrote:Now that blender 2.8 is out, I suppose it's time I either try updating this for myself or, if CCE wants to, he can too.

The plugin now works with Blender 2.8 :) Download the latest version at GitHub.
cce
 
Joined: 11 Dec 2012

Re: Sprite Batch Render addon for Blender

Postby Nash » Wed Aug 07, 2019 2:40 pm

While we're here...

@ cce : I've created a fork and have been using it for quite some time now, that changes how the script works: https://github.com/nashmuhandes/SpriteB ... dfe60c3c7e

- Angle and frame names are now determined automatically. Didn't make sense to expose those data for the user to tinker with.
- Each mesh to be rendered now has a new property, SpriteName, to determine file name output.
- Support for more than 26 frames; in such a case, only the first 3 letters of SpriteName will be used. The 4th letter will be substituted with a number that increases every 26 frames.
- Added property (set on the Empty parent) for mirrored sprite names, and single angle sprites.


I'm still using 2.79, but I figured I'd just let you know my fork exists, in case you'd want to compare notes. I feel like the changes I introduced improves the productivity of the script. Feel free to hand-merge if you think my changes are useful, although I know that's not going to be convenient because my fork still works for 2.79. :)

Image

Image

Image
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Major Cooke » Wed Aug 07, 2019 3:37 pm

Those would actually be highly appreciated. Being able to use this would be great for the larger scale production.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Sprite Batch Render addon for Blender

Postby Awez » Thu Aug 08, 2019 9:38 am

I cannot believe I haven't seen this earlier, would have saved me so much time on my project. Great work, thanks Nash for updating this.
Awez
Lurking
 
Joined: 03 Jun 2016
Location: 'Murrica

Re: Sprite Batch Render addon for Blender

Postby Major Cooke » Thu Aug 08, 2019 10:12 am

He didn't update it. He just made his own, but it was for 2.79.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Sprite Batch Render addon for Blender

Postby cce » Mon Aug 12, 2019 12:20 pm

Nash wrote:While we're here...

@ cce : I've created a fork and have been using it for quite some time now, that changes how the script works: https://github.com/nashmuhandes/SpriteB ... dfe60c3c7e

Hey pretty cool! Since you are working actively with ZDoom I suppose you have a better idea what the plugin should be like :)
I made an issue in the repo so I don't forget. Let's see if I have the time to work on the addon though.

One question: how do you use the multiple model support? Do you go and manually point the camera to the selected mesh, and then click render? How does it work out with multiple meshes selected?
cce
 
Joined: 11 Dec 2012

Re: Sprite Batch Render addon for Blender

Postby Nash » Mon Aug 12, 2019 2:51 pm

cce wrote:Hey pretty cool! Since you are working actively with ZDoom I suppose you have a better idea what the plugin should be like :)
I made an issue in the repo so I don't forget. Let's see if I have the time to work on the addon though.

One question: how do you use the multiple model support? Do you go and manually point the camera to the selected mesh, and then click render? How does it work out with multiple meshes selected?


I've left a note on your Issues page about my fork being a little buggy at the moment. :) I am working on fixing all loose ends.

About your question - good one actually. I never took this into account. I can't test it right now, but I suspect what would happen is, it would just keep on rendering the same shots over and over again, every pass with each individual mesh's SpriteName as the output, because it's just for-looping through all the meshes... not sure what's the best way to deal with this for now; originally, I made it this way because for the specific game I'm working on, this was actually the desired behaviour (I had some extra steps in the script that would show/hide each object individually with each mesh, this was for multi-part actors). I'm not sure how to handle this situation so that it can be more useful generically. Any ideas welcome.

[UPDATE] I have fixed pretty much all buggy behaviour and have thoroughly tested it with an animated character... as far as I can tell, everything now works perfectly. Only 2 issues left (multiple mesh selection and 16-angle support) and I think I can declare my overhaul as final.

[UPDATE 2] After thinking carefully, I am thinking of moving the SpriteName property to the render panel (along with NoRotation and Mirror). It doesn't make sense for every object to have individual SpriteName properties.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Nash » Tue Aug 13, 2019 11:44 pm

I have fixed all bugs, and moved the sprite name to the render panel, so it is no longer relevant what objects you have selected or not - it will just render the entire scene as seen by the camera. I don't plan to support 16 angles for now, as I am not using that feature for my current projects. :)

I think I will declare my fork complete, for now. Unless I find other bugs. :P
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Sprite Batch Render addon for Blender

Postby Major Cooke » Wed Aug 14, 2019 1:31 pm

I use 16 angles for a number of things. If this is adapted, CCE, I would appreciate having the ability to render out 16 angles as that was a feature part of the original design. I use it quite heavily.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Previous

Return to Editors / Asset Manipulation

Who is online

Users browsing this forum: No registered users and 0 guests