Ouchface
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > XWE > Auto alignment of sprites in png format
 
Author
All times are GMT. The time now is 05:18. Post New Thread    Post A Reply
ReX
Senior Member


Posts: 1743
Registered: 05-00


I had read somewhere that XWE supported auto alignment of sprites in png format, and I did a search of the forums to come up with this thread. The closest reference is what Csabo said: There's a "W: Auto button", which controls whether the image is displayed as an weapon sprite or not. You can toggle three settings: Auto (like XWE old behavior), OFF or ON.

Is there something I need to switch on or off to enable auto alignment? Here's what I do to import png format sprites:
    1. Always Load PNG Files as Raw Data box is checked off in the View\Options\Special tab.
    2. Double Click on the Sprites button in the Filter Tool Bar.
    3. Import the png images I want.

The problem is that the sprites are not auto aligned. This means I have to manually align dozens of images. How do I auto-align them?

Old Post 04-26-07 16:43 #
ReX is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csabo
Moderator


Posts: 541
Registered: 02-02


Hi Rex,

Sorry for the delay. XWE cannot do what you're looking for yet. I understand your request perfectly, but this functionality is a bit weird... When PNGs are imported, the whole approach is "import as Raw". But if we're going to auto align them, then it's not just raw data anymore, the PNG will actually be modified. I've been thinking about this for a while, but haven't figured all the details yet. I'll try to add it as soon as I can.

Old Post 05-04-07 02:42 #
Csabo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ReX
Senior Member


Posts: 1743
Registered: 05-00


Csabo, I think I understand the problem you are facing. Meanwhile, while aligning the sprites I realized that a simple formula to auto-align sprites would not always work, particularly in the horizontal axis. Here's what I'm referring to:

Vertical axis auto-alignment can be generally achieved by defining a fixed value for the y-offset (e.g., 5 units), or even allowing the user to define that value. As the "anchor point" for the sprite is always the floor, having a fixed y-offset for each frame will generally work fine.

Horizontal axis auto-alignment, however, might be a different story. The standard formula of (sprite width)/2 works only on actors that are symmetric across the y-axis. If an actor has some part that extends beyond the main body in one direction (e.g., a one-tentacled creature with the tentacle only on the left side; a marching soldier with a rifle on one shoulder), then applying the standard formula will result in lateral "shifting" of the sprite frames. Ideally, what one ought to be able to do (which would be virtually impossible via auto-aligning) is to define the y-axis of the sprite, and rotate the frames around that axis.

Anyhow, please forgive the long-winded narrative above. Don't worry about working on auto-alignment for png format sprites. I don't think I will be creating too many more, as the other aspects of it have been quite tedious and time-consuming.

Old Post 05-10-07 04:08 #
ReX is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 05:18. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > XWE > Auto alignment of sprites in png format

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.