Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

Sail Emblems, DXT-1 Vs. DXT-3, and other Observations
Post new topic   Reply to topic     Forum Index -> Customization & Modding
View previous topic :: View next topic  
Author Message
QBRADQ
Seaman
Posts: 134


4756 Gold -

PostPosted: Tue Jun 28, 2005 3:20 am    Post subject: Sail Emblems, DXT-1 Vs. DXT-3, and other Observations Reply with quote

Hello all! I recently made my first custom sail emblem with my family's Coat of Arms (thanks to the post "Need an Idiot's guide to moding", Rupert's links, and of course the sail and flag guide). Durring this process, I made note of several things that I have yet to read on the forums here, on the guide, and on CGM3's Wiki. Of course, all this may be old news, but like I said, I couldn't find it. So, here it is.

DXT-1 Vs. DXT-3
So far, I have noticed one major differance between the two formats. Namely, that DXT-1 uses an Either / Or alpha channel while DXT-3 uses a Byte-Wise alpha channel. I'll explain.

DXT-1, Either / Or Alpha Channel
The alpha channel is interpreted as a map of which pixels to draw. If the position in the alpha channel has a value in the range 0-127 (Black to True Grey) the corresponding image pixel is NOT drawn. If the alpha value has a range of 128-255 (True Grey to White) the corresponding image pixel IS drawn.

DXT-3, Byte-Wise Alpha Channel
The alpha channel is interpreted as a litteral alpha value, in effect determining the transperancey of the image. An alpha value of 0 (Black) is full transperancey, the corresponding image pixel is NOT drawn at all. An alpha value of 255 (White) is full opacity, the corresponding image pixel IS drawn at full intensity. Between the two values 0 (Black) and 255 (White) lie the translucent spectrum. The more white in your grey (the higher the resulting alpha value) the more opaque the corresponding image pixel will be, hence the more it will show up.

How does this apply to sail emblems?
Glad I asked Smile

Ok, I have heard some people say that they needed to add an aged look of sorts to thier sails, or that the colors were too vivid. Frankly, if you are using something as bright as a full-color family coat of arms, the striking colors on the resulting sail look out of place. To correct this, there are two simple things that can be done (note, these methods can be applied to existing DDS textures).

1 ) Extract the sail texture. Then, double-click the alpha channel preview to open the alpha channel in your chosen editor. Replace the non-black areas of the alpha channel with a dark grey color. I personaly like using 96 to 128 (meaning that all three color channels, Red, Green, and Blue, are the chosen values). Save this as your new alpha channel source map.

NOTE: If doing a sail from scratch, simply use your dark grey color for the non-black areas of the alpha channel to begin with.

2 ) Compile the DDS as normal, and save it with the DXT-3 format. This will render a sail emblem that looks faded, and less sharp. I find that by using this technique, I can make sail emblems that look a lot like the ones that come with the game.

For referance, here's a side-by-side comparison of a DXT-1 emblem, and the same emblem in DXT-3 format with an alpha channel using 96,96,96. As a side note, these are (from left to right) my first sucessful attempt, and the final product of the emblem I made tonight.



Note that when using DXT-3 format, it is also possible to use the alpha channel to give an uneven transperancy to the emblem. Try messing around with patterns and textures. The results can be pretty cool.

Hope this is imformative (and not a re-post)
QBRADQ
_________________
Tell him about the Twinky.
What about the Twinky?
Back to top
View user's profile Send private message Send e-mail
DrBeast
Cutthroat
Posts: 493


5316 Gold -

PostPosted: Tue Jun 28, 2005 9:08 am    Post subject: Reply with quote

Very useful information QBradQ! Thanx! Although it seems even in dxt3 format the alpha behaves a bit too...absolute (ie I find it hard to fine-tune the transparency), at least in my experience with modding sail emblems for Pirates! In other games I've made some skin jobs (in The Sims 2) the alpha is more progressive in giving my desired transparency. Have you tried dxt5 format?
_________________
Let the Beast inside you free!
Back to top
View user's profile Send private message
CGM3
Gunner
Posts: 614


12612 Gold -

PostPosted: Tue Jun 28, 2005 1:31 pm    Post subject: Reply with quote

Actually, it's K-Bob's Wiki; he just included a monograph I did on modding some of the game's text files. Credit where credit is due, guys.

Nice looking sail, QBradQ. I'll keep an eye out for it on the Caribbean, and only take half the gold from any ship using it. ( Smile )
_________________
I only do what the voices in my head tell me to do.
Back to top
View user's profile Send private message Send e-mail
QBRADQ
Seaman
Posts: 134


4756 Gold -

PostPosted: Tue Jun 28, 2005 2:17 pm    Post subject: Reply with quote

Havn't tried DXT-5. Will SMP recognize it? If so, I'll do some toying around with it.

Glad to hear this isn't a repost Smile
QBRADQ
_________________
Tell him about the Twinky.
What about the Twinky?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Page 1 of 1

 
Jump to:  
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