| 02-23-2006, 09:41 PM | #1 |
Hi, I'm trying to write a simple MDL viewer for fun but have some problems how to draw Team Color/Glow in an OpenGL enviroment. I managed to draw the geosets and add trexture to it and I have enabled the blending so the place where the team color should be is transparent (can look into the figure) so my question are: 1. I see from the MDL file that the first layer in a material is pointing to a replaceable texture while the second layer points to a normal texture (a .blp file). How do I handle Layers in OpenGL? 2. Do I get my Team Glow texture from "ReplaceableTextures\ TeamGlow\TeamGlow00.blp" ? 3. If 2. is 'yes', is it true that the alpha channel isn't used in the Team Glow texture ? 4. if 2 is 'no', how/where can I get the Team Glow texture file Can someone help me, please. Mfu |
| 02-23-2006, 10:02 PM | #2 |
You can extract the team colours and glows from that directory, yes. Team colours don't use alpha, they are opaque. Team glows use additive, which makes black level transparency. |
| 02-24-2006, 09:30 AM | #3 | |
Quote:
--------------------------------------------------------------------- So, does that mean : 1. if I want to show the Team Colors correct I have to draw the geoset with a team color first and then add the texture? 2. How is Additive 'handled' in OpenGL ?? thanks for the quick reply |
| 02-24-2006, 04:41 PM | #4 |
There are two concepts,multipass and multitexturing. Multipass: Very simple, you just render the same mesh twice (or more) using different render states, first one using the team color then the one with the texture. The drawback is it's slow due to double rendering. Multitexturing: You render once and use either a pixel shader to merge the two textures or the fixed function pipeline operations. This is faster than multipass but *may* not be supported on as many machines. I can't give any exact GL calls as I'm more into DX. |
| 02-24-2006, 05:41 PM | #5 | |
Quote:
--------------------------------------------------------------- Hi Magos, Thanks for you comments. Just a little side note: I know you or more precise you work! I admirer you Viewer/Editor and didn't understand why your got so much negative repitation/credit in a one forum since I personally think that it one of the best viewers/editors I've ever seen. Very nice work. Regards mfu |
| 02-24-2006, 08:20 PM | #6 |
yeah, moved |
| 02-24-2006, 08:21 PM | #7 | |
Quote:
???? |
| 02-24-2006, 08:23 PM | #8 |
I moved the thread to the appropiate forum. next time you want to post something in the m&a forum, make it about modeling or animation only. |
| 02-25-2006, 03:10 PM | #9 | |
Quote:
What is the difference between Alpha blending, additiv and Masking, ? |
| 02-27-2006, 02:25 PM | #10 |
Alpha blending - You make a linear interpolation between the two colors using the alpha channel as the factor. The resulting color is guaranteed to be betweenthe colors as long as the two alpha values sum to 1 (which they will if A and 1-A is used). Additive - The colors are added, either by their value (R = Rsource + Rimage etc...) or using an alpha factor (R1 = Rsource + Aimage * Rimage etc...), this is AddAlpha in war3. Adding many colors will eventually result in pure white color due to reaching the upper bound. |
