ScriptSpot home

Sprite Render Script

Downloads

Earlier releases (1)
  • Version 0.6

    Release notes

    Version 0.6 is out, with Version 0.6 is out, with many bug fixes! I've written a readme that has features, instructions, and tips for use.

3ds Max compatibility
See original listing claims
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
0.7
From original requirements
8 or newer
Original version requirement
Max 8+
Author’s update date
Legacy votes
22
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

Slather

More by this author

This script will render animations and pack them into a sprite sheet. It exports the image file, the animation frame data as an XML file, and optionally a heightmap.

Improvements and Bug Fixes (v0.7)

+ Render Lists use XML. (they work now)
+ Included an option to turn cropping off.
+ Config settings are now written and read in a consistent way. (now it works)
+ Border padding has been fixed.
+ Added an option in the viewer to toggle the frame borders


* See the readme for features and instructions. (its included with the script, too)

You can create "Data Points" (point helpers with custom attributes) and link them to your scene objects. These points' positions are raycast into frame coordinates and stored with the animation data in the exported file. This technique can be used to make complex, dynamically-assembled sprites in a game.

Setup & notes

The zip contains a folder with 2 files: "SpriteRender.ms" and "Custom.ms". Just copy the folder into your "userscripts" directory and run from there. The script will create a config file (.txt) and a readme (.hmtl) in the "Sprite Render vX.X" folder.

You may need to log-on as an administrator to run the script. In theory, because it's in the "userscripts" directory, you shouldn't need to.

Comments (13)
Marwan

Download links are gone

Is there any way to get this script now that the links are broken? Anyone who has it mind sharing it?

Thank you

Shawn Olson

Great Tool

You've got a great tool here. I just pulled it back out to share with a friend and noticed that there are still some errors:

The first time I run it I always get this error:

-- Error occurred in btn_save.pressed(); filename: C:\Program Files\Autodesk\3ds Max 2012\Scripts\Sprite Render v0.7\Sprite Render.ms; position: 34495; line: 1135
-- Frame:
-- depthmap: undefined
-- canvasbitmap: undefined
-- f: "C:\Users\Shawn\Documents\Vault\Demonstration\sceneassets\images\sprites\tp_melt.png"
-- roll_SpriteSheetViewer: undefined
>> MAXScript Rollout Handler Exception:
-- Unknown property: "canvasbitmap" in undefined <<

Also.. even though the docs mention installing it into userscripts, I still get an error when loading it from userscripts on a machine that hadn't previously run the script as admin. It appears that the docs file is hard-coded to come from the 3ds max root help.

Reply to Shawn Olson
Shawn Olson

I returned to this script today using 3ds Max 2013... and I've got the same problems I posted last year. I did find a solution, though. Add this code to line 1134:

global roll_SpriteSheetViewer

Slather

Runtime Error

Ok, I've changed the script to use the "userscripts" directory and to not write the readme right away, only when accessed. If the readme can't write, the script won't break anymore. You can use the link on this page, or go to the website anyway.
- Matt

Thaddeus Ladzinski

getting a wired error when running your script

I am new to 3ds max.i have the 2011 version. i opened your script and ran it. It cant create the readme file it needs so it wont run? do you know a solution to this problem.

I also sent you and email on this yesterday with the exact error message im geting. Here is the messae

--Runtime error: FileStream cannot create: C:\Program Files\Autodesk|3ds max 2011\scripts\Spriterenderv0.7readme.html

It also highlights this part of your code:

fn writeStringToFile str filename =
(
local f = openFile filename mode:"wt"
format "%" str to:f
close f
)

tortenazor

Hello,

I'm using an older encrypted version of this script which has several bugs, including the "render from file" option not working. It seems that the download domain has expired. Is there anyone kind enough to post the original unencrypted script ? I'd like to try to fix those bugs myself.

Thanks !

Waxmodeler

Excellent Script, it works with Max 8 and also the output is great for Unity3D. Coooool.

Michele Marcelli

Good Script very, very useful :)

Slather

Version 0.6 is out, with many bug fixes! I've written a readme that has features, instructions, and tips for use.

fajar

Good script !! thank!!

SpookyCat

Very nice and handy script which works very well. Do have a small bug, if you delete the pivot object and then render the sheet it does the rendering and then errors with pivot deleted message, perhaps it should just not start, also the button label should change to show the object has been deleted.

Reply to SpookyCat
Slather

Thank you SpookyCat :) I didn't test the encrypted version much before posting, and apparently a few things are broken. The bug you mentioned will be an easy fix (I just need to check to see if the object is deleted, and add a callback for the button label).

I'm going to rename the button 'pivot object' to 'origin object' because its really supposed to be the origin position of each frame. Also, an extra rollout is supposed to be added when you select a pivot, and allow you to change some export values.

I plan to write instructions, explain the render list and what it can store, and explain the available output values for export. Anyway, I should have an update soon.