Sprites for Dummies by Wk15 -1 reply

  • 1
  • 2

Please wait...

willsk8forfood15

-Meh

50 XP

16th April 2006

0 Uploads

624 Posts

0 Threads

#1 12 years ago

*****************//=============== \\********************** ****************//Sprite Files for Dummies\\********************* ***************((---By willsk8forfood15 ---))*********************

------------------------------------------------------------------ Introduction: ------------------------------------------------------------------ Yes, I am releasing a small tutorial on sprite modding. Now I am definitely not the most experienced in this category by any means but I noticed the community was somewhat let down by the release of such a tutorial only on pga. I am doing my own version through what I have figured out myself but mostly through glows that Ryan taught me via IM. So if this is credited to anyone, let that person be AdmarilRyan, If you want a better tutorial then go to the only site Ryan released it on: http://www.phoenixgalacticalliance.com/pGA/index.php and look for it :p Ok well I'll try to keep it organized so here ya go.

------------------------------------------------------------------ Table of Contents: ------------------------------------------------------------------ 1. Intro to sprites 2. What you will need 3. General Sprites Modding 4. Glows 5. Ending Notes 6. Legal 7. Contacts

------------------------------------------------------------------ 1. Intro to Sprites: ------------------------------------------------------------------ .spr or Sprite files are a way to manipulate textures and models to make certain effects in the game. Wepons effects and other animations all trace back to a sprite file. Sprites also make up map items like nebulas and asteroids. And gui files which are different than other sprite files. Gui files are mostly for the global build button and wireframe management and the gui_race files are for different races Interface. But this tutorial focuses more on effects, one of which are engine glows.

------------------------------------------------------------------ 2. What you will need: ------------------------------------------------------------------ When adding new sprites to ships like glows for instance, it recquires knowledge of harpointing. To make life easier for us both, go to Major A Payne's tutorial and make sure you understand everything there and can fully hardpoint a model by yourself. MaP's tutorial can be found here: http://armada2.filefront.com/info/maptut 1. Text editor(such as note pad or wordpad) 2. Some basic modding skills(it helps;) ) 3. A modelling program (must be sod compatible) 4. .SOD importer and exporter. Available at http://assimsoft.com -Thats really all you need. So let's get started

------------------------------------------------------------------- 3. General Sprites Modding ------------------------------------------------------------------- > Adding a basic explosion sprite:================================= First, Im gonna walk you through some basic sprite modding. Go to your sprites folder and open up explosion.spr This sprite file controls how the explosion textures are used. For learning purposes, we're going to make a large explosion. Now for this we're gonna use one of Freyr's explosions from the a2 upgrade project. Go to this link and download the explosion's tga file: http://abettermod.com/tutorial/tutexplosion.tga

Heres what that looks like: tutexplosion.jpg Ok, place the tga file into your textures/rgb folder and go back to that explosion.spr file. At the top you should see some text like this: __________________________________________________________________ sprite_table ##### Explosion Sprites ##### ## SPRITE DEFINITIONS ## # @reference=texture size in pixels from which the u,v,w, and h values # were measured. This value will effect all subsequent textures until # a different value is specified. # texture cutsize and animation @reference=128 @tmaterial=additive bigorange Xcritical01 0 0 32 32 @anim=tex4x4_1.1 sparkball1 Xcritical06 0 0 32 32 @anim=tex4x4_1.3 sparkball2 Xcritical07 0 0 32 32 @anim=tex4x4_1.5 ___________________________________________________________________ Basicly, that tells the game what textures are used and the size for them. For example, the reference bigorange uses the texture, Xcritical01 and tells the game that the u,v,w,h values are 0 0 32 and 32. Thats saying that the size for the texture is 32 by 32. OK, right under the sparkball2 sprite, add this line(align as needed): bigexplosion tutexplosion 0 0 32 32 @anim=tex4x4_1.5 Now you may be wondering what that "@anim=tex4x4_1.5" means. Well if you take a look at the texture, you'll see it has different "stages". The anim line tells the game how to handle the sections, or "stages". Allrighty, now that we've told the file what texture to use and how to use it. Lets add the node. Near the end you shoul see this: ___________________________________________________________________ # @sprite_node name sprite animation (width,height) (r,g,b) # RGB color values range from 0 (none) to 1.0 (full intensity) #exposion sprite nodes @sprite_node critical1 bigorange explode1.1 (40,40) (1,1,1) billboard @sprite_node critical2 sparkball1 explode1.3 (32,32) (1,1,1) billboard @sprite_node critical3 sparkball1 explode1.3 (32,32) (1,1,1) billboard @sprite_node critical4 sparkball1 explode1.3 (21,21) (1,1,1) billboard @sprite_node critical5 sparkball1 explode1.3 (18,18) (1,1,1) billboard @sprite_node critical6 sparkball2 explode1.5 (15,15) (1,1,1) billboard @sprite_node critical7 sparkball2 explode1.5 (12,12) (1,1,1) billboard @sprite_node critical8 sparkball2 explode1.5 (12,12) (1,1,1) billboard ___________________________________________________________________ Lemme explain this one in steps; @sprite_node -This is script which tells a2 that it is an actual node and lets it know that it is a seperate sprite. critical(x) -This is the name for the sprite. So when you want an explosion odf to use the sprite, you'll have to make sure you include the sprite's name. bigorange -This references the texture handling that we did earlier. explode(x.x) -This tells the game more details about the animation. This line references keyframes etc in your animation.spr file. (xx,xx) -This tells the total width and height of the srite. This is what controls the scale of the sprite. (x.x.x) -This is the color defines for the texture file. Since explosions are already colored, we can have the rgb values all at 100% so it shows the colors exactly how they appear in the texture. billboard -This states that the effect is 3 dimensional. Its neccesary for viewing the effect from different perspectives. Small Note: I know this may begin to get confusing, but have patience and dont give up. You'll know sprites like the back of your hand before you know it. (*looks at back of hand*, hey thats new!;)) Now replace that last line with: @sprite_node critical8 bigexplosion explode1.5 (60,60) (1,1,1) billboard Now when a big explosion sprite is used, it will use the sprite we just made. You'll notice it because it stands out from the stock a2 explosions and it'll be really big.

Congratulations!!! You just did your first sprite, Yahoo! Now you should be familiar with sprites a little more. Hopefully enough to teach yourself your own tricks. Other than that lets get to the Glows.

---------------------------------------------------------------------- 4. Glows:eek: ---------------------------------------------------------------------- Ok, now you're ready to learn one of my favorite things about sprite modding; Glows. First we're gonna make one using the stock games glow texture hanldler. Now glows are a sprite that the game considers a light effect. So makes sense it would be in the lights.spr file:) So lets open that bad boy up and get started. At the beginning you should see: ______________________________________________________________________ sprite_table ##### Ship light sprite effects ##### ## SPRITE DEFINITIONS ## # @reference=texture size in pixels from which the u,v,w, and h values # were measured. This value will effect all subsequent textures until # a different value is specified. # Name File U V W H @reference=64 @tmaterial=additive Ballflare xlite1 0 0 32 32 SmallStar xlite1 32 0 32 32 RedMulti xlite1 0 32 32 32 AmberMulti xlite1 32 32 32 32 Spot xlite2 0 0 64 64 Borglight1 xborglight 0 0 32 32 Borglight2 xborglight 32 0 32 32 Borglight3 xborglight 0 32 32 32 flare xflare 0 0 32 32 Borglight4 xborglight 32 32 32 32 dmoonglow Mdmoonglo4 0 0 64 64 softglow xglow_soft 0 0 64 64 _____________________________________________________________________ You see the softglow lone at the end. Thats what we're gonna do to add our first glow. Scroll down until you get to this: _____________________________________________________________________ ## SPRITE NODE DEFINITIONS ## # @sprite_node name sprite animation (width,height) (r,g,b) # RGB color values range from 0 (none) to 1.0 (full intensity) # blue lights @sprite_node blueconst AmberMulti const (.7,.7) (0,0.5,1) @sprite_node blueconstbig Ballflare const (1,1) (0,0.1,1) @sprite_node bluestrobe SmallStar strobe1 (.5,.5) (0,0.1,1) billboard @sprite_node bluestrobebig RedMulti strobe1 (1,1) (0,0.1,1) billboard # green lights @sprite_node greenconst AmberMulti const (.7,.7) (0,1,0) @sprite_node greenconstbig Ballflare const (1,1) (0,1,0) @sprite_node greenstrobe AmberMulti strobe (.5,.5) (0,1,0) billboard @sprite_node greenstrobebig AmberMulti strobe2 (1,1) (0,1,0) billboard # red lights @sprite_node redconst AmberMulti const (.7,.7)) (1,.8,0) @sprite_node redconstbig Ballflare const (1,1) (1,.8,0) @sprite_node redstrobe RedMulti strobe (.5,.5) (1,.8,0) billboard @sprite_node redstrobebig RedMulti strobe2 (1,1) (1,.8,0) billboard # white-ish lights @sprite_node whiteconst Ballflare const (.5,.5) (.7,.8,1) @sprite_node whiteconstbig Spot const (7,18) (.7,.8,.8) @sprite_node whitestrobe Ballflare strobe (.5,.5) (1,1,1) //billboard @sprite_node whitestrobe2 SmallStar strobe2 (.5,.5) (1,1,1) billboard @sprite_node whitestrobebig RedMulti strobe (2,2) (1,1,1) billboard # amber lights @sprite_node yellowconst AmberMulti const (1,1) (1,1,0) @sprite_node yellowconstbig Ballflare flicker (2,2) (1,.8,.8) @sprite_node yellowstrobe SmallStar strobe (.5,.5) (1,1,0) billboard @sprite_node yellowstrobebig RedMulti strobe (1,1) (1,1,0) billboard @sprite_node bigbillboard Ballflare flicker (1,1) (1,.8,.8) billboard _______________________________________________________________________ Now heres where we are gonna add our engine glow. Now right after the # amber lights definition, add this line(align as needed): #Tutorial Blue Engine Glow @sprite_node gcglow softglow const (1.9,1.9) (0,0.1,0.2) billboard Thats it, you just did your first glow(Yahoo etc ect:p)!!! But now we gotta add it to a ship. For this example we are going to add it to the federation enterprise. Open up ms3d and go to file>import>Armada sod. Make sure it says Armada 2 sod and not armada 1 sod. Ok, yuo should be browsing in your a2 sod directory. Find fente.sod and double click. Yay, now you should see the Federation Enterprise. Go to the joints tab and make sure the box that says "show skeleton" is checked. If it is, you should see alot of confusing blue circle things. screenshot1.jpg Those are joints, or hardpoints as a2 uses them. Quick note: As stated above, you should be very familiar with hardpointing as well as the armada 2 hierarchy. If you aren't then I suggest going back to the "what you will need" section. Ok, assuming you are familiar with hardpointing lets continue. On the joints tab still, select the one named "h_lights". Now you should see some off those blue joint turn colors(normally to green) like so: screenshot2.jpg Now with the h_lights joint selected go to the model tab. Then click joint and click on the top viewport somewhere near the middle of either of the nacelles.

Now you have to name the joint so it uses the glow sprite we made. Highlight the joint you just made in the joints tab and in the box to the right of rename, replace whats in it with this: gcglow_01 OK, now if all has gone well, you can export the model to sod and if you look very closely wherever you added the glow. You'll see a blue glow. But thats only one sphereical spot. To fully add the engine glow to the whole nacelle, you have to add a new hardpoint in equal intervals along the nacelle. But to do this you have to make sure the h_light joint is selected and that you name each new glow joint according to its consecutive number. This means that the first glow node was gcglow01 and the second should be gcglow_02 and so on and so forth. You can view my example: screenshot3.jpg Now use your Enterprise in game and admire the realistic glowing nacelles. If the glow seems to big or too small, you shoul've learned enough in this tutorial to change them to taste.

-------------------------------------------------------------------- 5. Ending Notes: -------------------------------------------------------------------- Thank you for reading this tutorial. I hope it really helps you to learn how to edit sprites and add glows to the awesome models I've seen out there. Credits go to Admaril Ryan- for teaching me alot of what I know about glows, MaP for helping out the a2 community in so many ways, and the community that supports this. Thank you all!!! -------------------------------------------------------------------- 6. Legal: -------------------------------------------------------------------- I nor anyone else can be held resposible for damage the use of this tutorial may do to your game or computer. This includes but is not limited too Activision, Mad doc, and any of their respective subsidiaies and or affiliates. And I am only releasing this on a few sites. You can use this tutorial on your site ONLY if you make sure you let me know first. -------------------------------------------------------------------- 7. Contacts -------------------------------------------------------------------- If you need to reach me, my email is [EMAIL="willsk8forfood15@abettermod.com"]willsk8forfood15@abettermod.com[/EMAIL]. You can also go to my teams' mod's forum at http://abettermod.com/phpbb Thats it, Happy Modding everyone

Wk15




F/\}{I´3$

Illiterate? I'm FahreS

50 XP

24th March 2006

0 Uploads

1,230 Posts

0 Threads

#2 12 years ago

lol u used my const glow^^ so far the tutorial looks good to me




willsk8forfood15

-Meh

50 XP

16th April 2006

0 Uploads

624 Posts

0 Threads

#3 12 years ago

Yes I did use a modified version of the sprite line Fahres gave me. A hopefully better tutorial is "coming" from Ryan. I thought there already was one but come to find out, its currently the only one. Yay me:p




AdmarilRyan

I'm not crazy... Not always

50 XP

16th May 2005

0 Uploads

753 Posts

0 Threads

#4 12 years ago

well you saved me the bother of typing all this up, only it would be good if you explained how to create new sprite animations. (including draw, color and texture animations.)




willsk8forfood15

-Meh

50 XP

16th April 2006

0 Uploads

624 Posts

0 Threads

#5 12 years ago

As I said in the tut, I'm not the most knowledgable when it comes to sprites. Ryan, you should still do your tutorial as well:D




AdmarilRyan

I'm not crazy... Not always

50 XP

16th May 2005

0 Uploads

753 Posts

0 Threads

#6 12 years ago

that would require me to actually get off my backside and do it, you know how much pain that cause me?!




willsk8forfood15

-Meh

50 XP

16th April 2006

0 Uploads

624 Posts

0 Threads

#7 12 years ago

Well technically, you'd be sitting in a chair;)




kel333

IWL: Klingon Defense Force

50 XP

10th June 2005

0 Uploads

728 Posts

0 Threads

#8 12 years ago

Excellent work, Will :). Sprites are a little less confusing now.




AdmarilRyan

I'm not crazy... Not always

50 XP

16th May 2005

0 Uploads

753 Posts

0 Threads

#9 12 years ago

Just something to point out, when placing nodes on neacelles perfectly even is ok, but ideally you want them parallel to the top middle of the neacelle, although this can sometimes be difficult I admit. I do it by placing them all on the exact top middle line, and then using the move tool, move them an exact amount down.




Greathor

So say we all

50 XP

8th March 2005

0 Uploads

680 Posts

0 Threads

#10 12 years ago

How do you change the color of the glows from blue to red?




  • 1
  • 2