.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Star & the Crescent- Save $9.00
winSPWW2- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 1st, 2006, 02:37 AM
Singularity24601's Avatar

Singularity24601 Singularity24601 is offline
Corporal
 
Join Date: Oct 2006
Posts: 55
Thanks: 1
Thanked 10 Times in 2 Posts
Singularity24601 is on a distinguished road
Default A method of extracting perfect sprites

In non-total conversion modding, I strongly prefer additions to be aesthetically consistent with the unmodified game. Given that Dominions sprites are designed systematically (units have consistent poses), the creating of new perfectly consistent sprites requires perfect extraction of existing sprites as template material for modification. This is difficult to achieve in Dominions 3, in the absence of a specific sprite extracting system, for several reasons:
- All sprites in any game screenshot have undergone some sort of scaling and resampling, leading to blurring and size inconsistencies.
- Battle screenshots offer superior resolution, but in addition to scaling, are skewed due to 3D perspective (imagine each sprites as a picture drawn on a flat transparent card, standing perpedicularly to the ground).

I've found a difficult but successful method to extract sprites perfectly. The 'quantum method' uses human judgement plus 'nearest neighbour' resampling to force a sprite from a screenshot back to it's original pixels. I used Adobe Photoshop and Microsoft Paint. See attachment for illustrations:

1) Preparation
In a battle, I position the camera at minimum distance to the ground and take a screenshot of the sprite positioned at the centre (minimise skew distortion) of the bottom (maximise resolution) of the screen. This method will not work unless you first turn off Filtering in your game Video Options. You should also turn off Grass rendering. Prepare the sprite by cropping the surroundings. Then divide the sprite into smaller segments to reduce skew errors in the next step. The red diagram describes the skew expected in the sprite while the blue describes the approximation we will assume in our logic in segmentation.

2) Quantum-isation
For each segment, manually count the number of pixels that would be present in the original sprite. Double check as correct measurement is essential. Then (in Photoshop), scale each segment down to the dimensions you measured, with 'nearest neighbour' resampling, forcing the computer to calculate, as best it can, the original sprite.

3) Error correction
The resampling may not be perfect. I reattached the segments and rescaled (with 'nearest neighbour' resampling) to triple size, juxtaposing with the screenshot to check for errors. All resampling errors should result in 'stretched pixels', so rather than check each pixel, I looked out for areas of identical colour and compared with the screenshot to see whether it is correct or a distortion.

4) Finishing
In this case, there were no distortions for me to fix (distortions were present when I did not segment the image before resampling). Remove the background, magenta the shadow, and place in a TGA file with the feet 2 pixels from the bottom border. Correct lateral centering can be achieved by simple trial and error by observing in-game results.

A somewhat time-consuming process, complex but learnable, or will Illwinter save us the trouble by providing another means?
Attached Images
File Type: gif 465577-Dominions - Spriting.gif (19.9 KB, 251 views)
Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:01 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.