| View previous topic :: View next topic |
| Author |
Message |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Mon Apr 04, 2005 4:30 pm Post subject: Some tips on modifying images, specifying crop, etc. |
|
|
A couple of questions have been asked about modifying images in the game, changing image sizes, and what not. I'm no expert, but thought I'd pass along what I have found out in case some of you want to do some dial reskinning or image mods.
You'll notice that a lot of the game images are composites of many images. Not only the vehicle skins, but the ship's dials and controls are this way too. You can modify them in-place, resave, and you're ready to go. However, you can also split them out to their own image too.
Note that most composite and other single images in the game are sized overall by a power of 2, like 256x256, 512x512, 128x128, etc. May I suggest you stay with this methodology.
Concerning resizing, it can be done, but there is more to consider than just changing the .TGA graphic. It is possible to enlarge such items as the dials, but other parameters (and other associated images, like the pointers, etc.) must be changed too. They also must be repositioned. It can get complicated, but it can be done.
The sizing and cropping values in the menu_1024_768.ini file, define the size, and extent of the image which is "picked out of" the composite image, or "picked out" from a single image's background if the actual graphic is smaller within the overall image size.
Here's an example I was working on recently, a new compass rose:
Image size is 128x128, but note the actual dial itself is smaller, 114x114, centered. There are 7 pixels of space all around, top, bottom, left, and right.
Once the image is modified or created, you must either add it to menu_1024_768.ini or if you are modifying an existing image, update its cropping (and/or) sizing values in menu_1024_768.ini.
I'll try to define some examples.
CROPPING
-------------
Crop defines where we pick the actual image out of the main graphic. This is the complicated one.
Crop 0=0.0546875,0.0546875,0.890625,0.890625
Crop 0=A,B,C,D
I'll describe the fields calculations seperately.
Field A-
Amount of the left side of the image to be cropped (the red square, the distance from the left edge to the start of the image).
Formula = (amount of crop in pixels,7 / overall width in pixels,128)
Field B-
Amount of the top side of the image to be cropped (the yellow square, the distance from the top edge to the start of the image).
Formula = (amount of crop in pixels,7 / overall height in pixels,128)
Field C-
Amount of image width (the red arrow length) we want to display after cropping the left edge.
Formula = (amount in pixels,114 / overall width in pixels,128)
Field D-
Amount of image height (the yellow arrow length) we want to display after cropping the top edge.
Formula = (amount in pixels,114 / overall height in pixels,128)
Figure these values on a calculator, and be sure to use ALL the numbers in the result.
SIZING and POSITIONING
----------------------
Pos=287,659,114,114
Pos=A,B,C,D
The first two fields are the screen position. Field A, is the distance from the left edge of the screen (or parent menu_1024_768.ini item), I believe). Field B, seems to be the distance up from the bottom the the screen (or parent menu_1024_768.ini item). Interesting they would position relative to the bottom. At least it seems this to be this way.
The last two fields here (114,114 - C and D) are the size you want the graphic to be displayed in-game (width x height). This corresponds to the example's red and yellow arrows. It can be the actual size, or you can scale the image in-game by adjusting these values up or down. Remember if you scale it, you may lose some of the good focus. The game does not hold focus well for images scaled too far away from their original width and height. Note also if you scale the image different than its original size you must adjust the positioning.
Hope this helps.
-timetraveller
... |
|
| Back to top |
|
 |
Redwine
Joined: 10 Jan 2002 Posts: 1143 Location: Buenos Aires , Argentina.
|
Posted: Mon Apr 04, 2005 8:48 pm Post subject: |
|
|
Give my thousand of thanks..............  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|