WAD textures that don't need blue parts.Please!!!!!

Hi!

Please help me cause one of my engine parts depends on that.As all of you know i’m doing HL BSP load but there is a sligh problem.The texture parts that must not be seen are blue backgrounded.The problem is that what ever i do there is still some blue spots that are making some crap of the whole story.Please if anyone can do some research or just tell me a calculation to remove all of the blue parts.PLEASE!!!

10x

for (nY = 0; nY < tex->height; nY++)
for (nX = 0; nX < tex->width; nX++)
tex.rgba[(nY * tex->width) + nX].alpha = 0;

Even better yet…

for (int nCount = 0; nCount < 100; nCount++)
MessageBox(NULL, “I will stop posting OT Halflife questions in the Opengl forum.”, “Get the point!”, 0);

10 Print “GOING TO HALFLIFE DEV FORUMS NOW.”
20 GOTO www.forumplanet.com/planethalflife

[This message has been edited by rgpc (edited 03-15-2003).]

Ok!

I’ll stop posting about HL.But in times like this i want to be able to jump trhough my computer,come to you,and as the guys from Limp Bizkit say “BREAK YOUR ****IN’ FACE TONIGHT”.No hard feelings.As you noticed i don’t ask about how to load BSP,the history of the BSP,BSP revisions over time but i ask for simple OpenGL - related question about how to perform color clearing operation.No since you know where planet Half-Life is i suggest to take a spaceship go there as soon as possible.Planet Mars is also a good suggestion.You can tell to the greenskined figures there how good programmer and HOW STUPID actually you are.

Don’t tell me the message is finally getting through. Opengl couldn’t give a rats as to how your images are stored, or whether you need to clear the blue mask out of the data read from the WAD file.

What you are asking is how to process the data read from a file so that it displays properly when you send it to Opengl. It doesn’t involve Opengl - you could be using DirectX or GDI - IT IS NOT RELEVANT TO THIS FORUM.

No since you know where planet Half-Life is i suggest to take a spaceship go there as soon as possible

I wonder whether you are just being childish or you genuinely are not aware that there is a planet halflife . You do strike me as being too thick to understand that you would get more assistance by posting on forums that are dedicated to people doing development related to Half life.

As you noticed i don’t ask about how to load BSP

No you’ve already asked that question and others concerning HL (there’s no actual opengl content in any of these posts - save the calculation of texture coords - which is not really opengl and better suited to the basic forum)

here

and

here

and

here

and

here

and

here

And then there’s the Quake3 question

here


Well, let’s see your posts history:

Nehe tutorial 36: off-topic reply about VC++ 7
Half-Life BSP!!!: completely off-topic
BSP Bezier patches: off-topic
“noshader texture” in Quake3: completely off-topic
Effect from Game developper magazine: off-topic reply about bulgaria
HL BSP texcoords: completely off-topic
HL lighting: again BSP stuff, completely off-topic
HL BSP but this time OpenGL too!: more or less on-topic
Chat rooms about opengl programming: off-topic, granted everybody went off-topic quickly
WAD textures that don’t need blue parts: more or less on-topic, but poorly described

Because you’re working on a HL BSP loader using OpenGL doesn’t imply that any question you have about your HL BSP loader is on-topic.

Y.

Originally posted by Ysaneya:
Chat rooms about opengl programming: off-topic, granted everybody went off-topic quickly

Was that off the off-topic or just off-topic.

Please if anyone can do some research or just tell me a calculation to remove all of the blue parts.PLEASE!!!

Why should WE do graphics research for YOUR program? That’s YOUR job.

Also, could you explain what’s going wrong here? I don’t quite understand what you want. Do you just want to eliminate the blue component altogether, or make what ever is blue considered to be transparent, or what? Maybe a screenshot of how it should look compared to how yours look would be helpful.

-SirKnight

I believe he doesn’t quite have the appropriate words.

What I believe he’s saying is that he has crhoma-keyed textures, where everything that’s blue should become transparent.

This can be done using ARB_fragment_program, but it’s probably better done as a pre-process in C code where every pixel is examined, and if it’s blue, set the alpha to 0, else set the alpha to 1, and turn on alpha test.

For more information, check wotsit.org for image file format information, and the beginner’s forum for how to enable alpha test and what it can do for you.

Or just download the OpenGL specification and read it from start to end. I highly recommend it.

Well guys i just think that all you do is escaping the direct question - ho to remove the blue color.Tips,tricks articles and etc.It seems that you can’t this trick and i’m not impressed since it’s hard :-]]]].Now for my posts.This is a free forums and the only people who can tell me whether to post something or not are the moderators.Now i suggest to answer to the topic question or else just SHUT UP!!!

P.S.
Ofcourse i know where planet Half-Life is you jerk.As you can see in my previous reply i also suggested planet Mars since the guys at HL are just to good for you!

Mihail, rgpc already told you the answer in his first post. Kind of. The idea is to scan though the texture at load time and for each blue texel (rgb = 0, 0, 1) you set the alpha component to zero, and for the others set it to one. Make an rgba texture out of this and when drawing, alpha test out the fragments with zero alpha. You do this by calling

glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.5);

If there’s still some blue color on the edges of the cut-out parts, you might want to replace the blue color (keep alpha as 0) with the average of those of it’s neighbour texels that aren’t blue. Or more easily, just make them black, often that looks ok too.

As for the rest of this crap, I find this guy’s question perfectly on-topic, and if some of his previous ones haven’t been, this is hardly the place to tell him that.

-Ilkka

Mihail, even if people are giving you crap, flaming them back won’t do you much good. And quoting Limp Bizkit songs is the ultimate sign of immaturity. So don’t

– Tom

Well exuse me but they started it first.If the engine is not for this forum then don’t answer it.But if the you are able to help me then give the tip.No need to add flames to the topic icons.

Originally posted by Mihail121:
Well exuse me but they started it first.

Another ultimate sign of immaturity. Your question has already been answered here at least twice. If there’s still something you don’t understand, you have to be more specific, not to mention constructive, to get help.

-Ilkka

Now I remember why I’ve been mainly sticking to reading the beginner’s forums. You guys can be brutal.

Originally posted by Mihail121:
Well exuse me but they started it first.If the engine is not for this forum then don’t answer it.But if the you are able to help me then give the tip.No need to add flames to the topic icons.

haha. we flame him by adding flames to the topic icons! haha

seriously. there are no moderators in here, thats why moderators will not tell you to shut up, but we do.

for every ***ing pixel, if pixel == blue, then pixel.alpha = 0, else pixel.alpha = 1.
do alpha testing

done.

and please now move over to planet halflive, its the place for you to be. thats why those planets exist. and for your info, those planets do have homepages!

seriously. shut up and get mature. then you can come back, at the moment you learned to actually understand wich forum is apropriate to a specific question, and you actually know what you really want to ask.

first, learn to use basic opengl. then, when you move over to advanced opengl, this is the forum for you.

what you want is perfectly described in a nehe tutorial. the one with the bumpmapping.

find it, read it, try it, understand it, learn it.

That’s certainly the last time I answer a question from Mihail121 – he responds to my description of two suggestions with THAT?

“No need to add flames to the topic icons.”

The flame icon means it’s a hot topic, Mihal. That there have been many posts in it.

And just as you have the right to post any question you want here, we have the right to inform you that your chances of getting an intelligent reply are much improved if you actually ask your question someplace where the people already know what you’re talking about, and are willing to respond to your question.

Sure, I will do the research for you! My fee is $100/hour, minimum of 5 hours.

Originally posted by davepermen:

for every ***ing pixel, if pixel == blue, then pixel.alpha = 0, else pixel.alpha = 1.
do alpha testing

I don’t know dave, I reckon you should set all the pixels with an alpha of 0, just to be sure…

haha. we flame him by adding flames to the topic icons! haha

Lol

Originally posted by jwatte:
he responds to my description of two suggestions with THAT?

It’s mini-shanedudddy. Identical in every way except 1/8th shanedudddy’s size…

[This message has been edited by rgpc (edited 03-17-2003).]

Yeah sure!It seems that you guys are even bigger idiots than i originally thought.Why do you jerks think that i’m posting for help.Ofcourse i’ve tried to set 0 alpha value for each ***ing pixel which has red and green values to 0 and blue value of 255 but the ***ing problem here is that this things doesn’t fully work!The most of the blue pixels are removed but there are still blue edges!Maybe if you deserve i’ll post a screenshot!!!About having no moderators.If there are no moderators than everybody can speek and ask whatever he wants and you are the last people on the world that will tell me to shut up!And about the beginner forum.Maybe you guys should stick there and learn something from the newbee guys.

P.S.
That was all.I think there is no need of continuing with this.I have nothing against you and i believe you have nothing against me.Now BSP questions will be asked again so let’s just continue with the normal OpenGL work!