VGInterface.com
Search Downloads


Go Back   VGInterface > Developer Discussions > Graphics modification help and discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2007, 03:14 AM
Clandest's Avatar
Clandest Clandest is offline
Senior Member
 
Join Date: Jan 2007
Posts: 114
Default how do you know what is called what in a .tga file

Ok, so i opened up a .tga file cause i was curious and want to make a UI. And I was wondering when you are making your graphics do you make them all in seperate layers i would believe. But when I open up a Mod's TGA file they are all on one layer. How does the texture.xml know which image is which in the texture.tga file.

Thanks
Reply With Quote
  #2  
Old 03-25-2007, 04:53 AM
Slammy's Avatar
Slammy Slammy is offline
Member
 
Join Date: Jan 2007
Location: France
Posts: 35
Send a message via AIM to Slammy Send a message via MSN to Slammy Send a message via Yahoo to Slammy
Default

Basically, Textures.xml gives within one TGA file the square that surrounds the piece ( through upper left and lower right corner if I remember correctly ). Dual Layer TGAs in general with an Alpha transparent layer as background.
Reply With Quote
  #3  
Old 03-25-2007, 12:43 PM
Clandest's Avatar
Clandest Clandest is offline
Senior Member
 
Join Date: Jan 2007
Posts: 114
Default

I still don't get it. Say in the .TGA you want to add the player status bar to the Textures.xml

How will the texture.xml know which is the player status bar since the entire .TGA is just one flat image.
Reply With Quote
  #4  
Old 03-25-2007, 01:33 PM
neowulf neowulf is offline
Junior Member
 
Join Date: Jan 2007
Posts: 17
Default

I am by no means a good .xml coder. But to answer your question:

1. Designate the .tga that the graphic is located at "Textures.tga"
2. Designate the Cordinates of the graphic within this .tga "X=0, Y=275"

This means "X=Far Left coordinate (left/right)" + "Y= Far Top coordinate (up/down)= Absolute Position Of the Squared Graphic (including its alpha channel) you want to use.

This way, you have 1 .tga file with all graphics on it. You can then call each individual graphic located inside this .tga file by its coordinates inside of the .tga.

Why you may ask? Because of faster loading and ease of use by the program. Instead of having to open each individual graphic file..it uses one .tga.

At least this is the best way I can think to describe it.
Reply With Quote
  #5  
Old 03-25-2007, 01:54 PM
Clandest's Avatar
Clandest Clandest is offline
Senior Member
 
Join Date: Jan 2007
Posts: 114
Default

thanks, so i just find the coords of each image.

so would i find the coordinate for the entire image, or just say the top corner of it. ANd then just add the Width and Height?
Reply With Quote
  #6  
Old 03-25-2007, 02:20 PM
imported_Bee imported_Bee is offline
Junior Member
 
Join Date: Feb 2007
Posts: 1
Default

Yes. Essentially you need the top left x,y coordinates and the bottom right x,y for the width and height.

One other thing. DO NOT forget that the size of the full tga file must be a power of 2 (1024x1024 is most popular, but other variations on the theme work). If you do not do this, the images you make will be resized oddly in the game.
Reply With Quote
  #7  
Old 03-25-2007, 08:34 PM
Clandest's Avatar
Clandest Clandest is offline
Senior Member
 
Join Date: Jan 2007
Posts: 114
Default

so what would i write in the .xml file?

<Rect x="470" y="320" width="194" height="14" />

is the x and y the location inside the .tga?
Reply With Quote
  #8  
Old 03-26-2007, 01:10 AM
Nadger's Avatar
Nadger Nadger is offline
Senior Member
Interface Author - Click to view interfaces
 
Join Date: Jan 2007
Posts: 490
Default

yes...you'll have to make sure your alpha channels are correct as well, otherwise the graphic wont show it up, it will be 100% transparent. black = transparent = white = solid...anywhere in between is your transparency scale.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:35 PM.


Our Network
EQInterface | EQ2Interface | War.MMOUI | WoWInterface | VGInterface | LoTROInterface | MMOInterface