3D to Sprite

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

3D to Sprite

Post by Lonesome Ducky »

This is a program I made to turn a 3d model into a 2d sprite sheet. It is very basic, but I will work to make it better. The link to download is here: http://www.mediafire.com/?c0bc0mboatg

It does only save the image where the last thing you loaded was. It also only saves as a png right now. You can change the cameras orbit, but the elevation cannot yet be changed.

Use A and Z to zoom in and the arrow keys to move the camera. The image in the corner is a preview of what one frame will look like. I know its not much, but tell me what you think so far.

Here is a sample sheet I made for fun:

Image
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I can't figure what's the purpose of this app?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Well, you can make a detailed 3d model and turn it into a 2d sprite. You can use it for isometric games and such when you want to render something fast that looks good.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Cool... :)
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

great tool! hope to see progression :)
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Nice one! It would be cool to update the 2D tutorial with the fairy in it! :lol:
Image Image Image
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Well I've been working on it more and came across a huge load of bugs. But I've now changed it so you can choose where to save the file and what to call it. The camera orbit is not working too well right now though. But I'll release a new version in a few days or so. And thanks for all the nice comments! :wink:

By the way, when I load an md2 in irrlicht, the last frame is 4 times what it is normally. Is this a bug or what?
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Lonesome Ducky wrote:By the way, when I load an md2 in irrlicht, the last frame is 4 times what it is normally. Is this a bug or what?
yup.. heh infact I'm not sure whats currently happening but this extended to most animated model formats.

you have to "play" with the frames to find your animations.

nice proggy make for some nice fast good looking sprites/billboards.

another use would be for rain/snow/leaf sprites and bb's.

good job bud. 8)
pinballwizard
Posts: 67
Joined: Wed Aug 02, 2006 1:47 am

Post by pinballwizard »

Nice. Any chance that you could integrate this into the engine proper for real-time sprite generation, i.e. imposter support? That way you could dynamically replace complex far-away geometry with a sprite, on the fly. See
http://irrlicht.sourceforge.net/phpBB2/ ... fa6#116872 and http://www.gamasutra.com/features/20060 ... s_01.shtml
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Hmm, well I'll try that. I could probably do it.I'll give some sample code when I'm finished.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Well I did some more work on this and it is A LOT better now!

BUG FIXES:
-Now resets textures so you can make more than 1 image
-Now if you have to many columns or rows for the frames, it will reduce them for a smaller image
-You can now choose where to save your file, you may also choose a name and an extension
-Fixed a problem where if you a had a model with 0 frames, it would not render correctly

KNOWN PROBLEMS:
-When using a sprite height or width that is not 2^n, the image will be cutoff

PLANNED ADDITIONS:
-An image animator that shows how your animated image looks after you have rendered and saved it
-Particle Engine
-Ability to change elevation
-Ability to choose render (ie D3D9 or OpenGL) for increased compatability

Download link: http://www.mediafire.com/?4iqtmujkngz
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

good work man, its coming along nicely.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Image

It's been a while since I've updated this. But anyway, here is a link to the new version: http://www.mediafire.com/?y2ydtdwmm7j

New Features:
Isometric View

Can change elevation

Model runs through all the orbits on the preview

Now when you don't have enough columns or rows to fit all the frames in one image, it will split them and add the number of the image after the name


Planned Additions:
Add a cropping rectangle so you can remove excess data

Add real lights instead of the ambient


Controls:
A: Zoom out
Z: Zoom in
W: Raise elevation
S: Lower Elevation
Arrow Keys: Move Camera
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Hey, thanks for sharing this. It looks like a really useful tool.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

Post by wyrmmage »

looks very cool! I definitely like the idea of integrating this into the engine :)

-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Post Reply