Sign in to follow this  
JulianAssange

OpenGL Quake 2 texture problem

Recommended Posts

Hello! I've tried to apply a Quake 2 texture to a Quake 2 MD2 model in my OpenGL texture.

This works, fine, but the texture doesn't look like it should. I have converted the PCX to a BMP file, because of the simplicity. Can I do so? Or how do I do it? I simply wanna use a BMP or TGA file, not a PCX file.

[img]http://img824.imageshack.us/img824/6001/asdcm.png[/img]


Any ideas?

Share this post


Link to post
Share on other sites
[quote name='n3Xus' timestamp='1312549650' post='4844989']
No idea how quake does things, but have you tried flipping the UV coords on the U,V or both axis?
[/quote]

Nope, although the PCX file works just fine. But because of simplicity and reduce my lines of code, I want to use a BMP or TGA file.

Like I said, PCX works fine, and therefore should the UV mapping not be wrong.

Share this post


Link to post
Share on other sites
I think you misunderstood me, Mr. Assange [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img]

I wasn't talking about textures but UV coordinates: have you even tried flipping them?

Share this post


Link to post
Share on other sites
[quote name='n3Xus' timestamp='1312553248' post='4845015']
I think you misunderstood me, Mr. Assange [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img]

I wasn't talking about textures but UV coordinates: have you even tried flipping them?
[/quote]

How do you mean by "flipping them"?

I know you weren't talking about textures :), but since the PCX files works like intended I assume the texture coords are okay.

Share this post


Link to post
Share on other sites
[quote name='JulianAssange' timestamp='1312553558' post='4845017']
[quote name='n3Xus' timestamp='1312553248' post='4845015']
I think you misunderstood me, Mr. Assange [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img]

I wasn't talking about textures but UV coordinates: have you even tried flipping them?
[/quote]

How do you mean by "flipping them"?

I know you weren't talking about textures :), but since the PCX files works like intended I assume the texture coords are okay.
[/quote]

Not always the case. Some (most, actually) BMPs are stored "upside-down", so - assuming standard OpenGL naming conventions of s and t for texcoords - you need to set "t = 1.0f - t" in order to correct this.

Share this post


Link to post
Share on other sites
[quote name='mhagain' timestamp='1312554052' post='4845019']
[quote name='JulianAssange' timestamp='1312553558' post='4845017']
[quote name='n3Xus' timestamp='1312553248' post='4845015']
I think you misunderstood me, Mr. Assange [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img]

I wasn't talking about textures but UV coordinates: have you even tried flipping them?
[/quote]

How do you mean by "flipping them"?

I know you weren't talking about textures :), but since the PCX files works like intended I assume the texture coords are okay.
[/quote]

Not always the case. Some (most, actually) BMPs are stored "upside-down", so - assuming standard OpenGL naming conventions of s and t for texcoords - you need to set "t = 1.0f - t" in order to correct this.
[/quote]


Thanks, that did the trick! Thanks :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this