Texture Problems

Texture Problems

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Texture Problems

Post by SanadaUjiosan »

First of all, hey all. I'm new, but I'm good friends with oksnoop2, who I imagine at least some of you have been helping get his mod in working order. Thing is, I'm helping him (we're both making our own "factions") so I'm going to be having a lot of troubles too. I hope you guys can help me out and I apologize in advance for all of my stupidity.

My biggest problem right now is that whenever I get my unit in-game, the textures are basically broken. I followed the tutorial pertaining to DXTbmp and Upspring, and flipped my texture and all of that, and have even experimented with not flipping them and using mirror instead, and flipping the image prior to Upspring in Photoshop, but I just can't get it to work. The odd thing is that the degree of the problem seems to vary with what I do. I've noticed that when I don't flip the image in Upspring, I get the closest to it working correctly. Here's an example of my problem:

http://picasaweb.google.com/lh/photo/35 ... directlink
This is the broken texture.


http://picasaweb.google.com/lh/photo/0D ... directlink
This is what it is supposed to look like.

I've brought 4 units into the game so far, and all of them have been like this.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture Problems

Post by smoth »

for dds you don't flip the texture. If I am understanding you right you are flipping teh texture prior to conversion.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Texture Problems

Post by SanadaUjiosan »

Yeah, the tutorial I read said to load the .targa in Upspring, then go to Texture Mapping > Show UV Mapping > Edit > Flip UVs.

Thing is, I've experimented with not flipping it, or doing Mirror UVs instead of Flip UVs, and even flipping the image in Photoshop before even messing with Upspring or DXTbmp. None have given me a proper texture. My friend oksnoop2 used the same tutorial and his textures have come out fine.

And, what does dds mean?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Texture Problems

Post by Argh »

You should not have to use "flip UVs". Just load the texture, and it will be "wrong" in UpSpring, but "right" in Spring. If it looks "right" in UpSpring, flip the texture vertically in your paint program.

If you're still stuck after that, post the model and the texture here.

DDS is a special texture format used in games. It won't be upside down, and has a bunch of other advantages in Spring. But don't worry about that right now.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Texture Problems

Post by SanadaUjiosan »

Well I tried multiple times and in different combinations of texture orientation and whatnot, and couldn't get it to work. When the texture looked right in Upspring, it was wrong in-game, when it was wrong in Upspring it was wrong in-game. So I'm not sure. I'll attach the files so someone can look at it.

Thanks a lot.
Attachments
assaulttank.rar
(209.82 KiB) Downloaded 22 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture Problems

Post by smoth »

you need to flip your uvs using the menu in upspring.

like argh said it will look odd in upspring but right in spring.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Texture Problems

Post by Argh »

Yup, took a look, and you just need to flip the texture vertically, it will be fine then.
User avatar
Spawn_Retard
Posts: 1248
Joined: 21 Dec 2006, 14:36

Re: Texture Problems

Post by Spawn_Retard »

smoth wrote:you need to flip your uvs using the menu in upspring.

like argh said it will look odd in upspring but right in spring.
Why is there this problem?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture Problems

Post by smoth »

because DDS is upside down.
User avatar
Spawn_Retard
Posts: 1248
Joined: 21 Dec 2006, 14:36

Re: Texture Problems

Post by Spawn_Retard »

smoth wrote:because DDS is upside down.
And the reason that is?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture Problems

Post by smoth »

I don't know. Jcnossen made a post about it some time ago.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Texture Problems

Post by SpliFF »

The reason is it's a Direct Draw Surface and DirectX is arse-backwards.

Or more technically speaking:

DirectDraw's screen coordinate origin is the top-left corner of the screen and OpenGL's origin is the bottom-left corner. This leads to the need of flipping the texture vertically before converting the image or taking the opposite t texture coordinate.

NVIDIA DDS Info
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Texture Problems

Post by SanadaUjiosan »

Well, I am still getting a screwy texture. I flipped the images like Argh said, made sure it looked screwy in Upspring, and still my textures aren't right. Maybe there's just a legitimate error on my end somewhere?

The only thing I can think of that would be different from how the tutorial goes is that when I create my texture file way back in Wings3D, I don't select the filesize it defaults on because I think it's too small. I use the second largest one. Maybe that is screwing something up?

I apologize for any frustration this may be generating. Unless I'm totally missing some crucial step, I just don't know what to think here.

Also, that's awesome that it's using DirectDraw.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Texture Problems

Post by Argh »

Also, that's awesome that it's using DirectDraw.
It's not. It's just a file format.
The only thing I can think of that would be different from how the tutorial goes is that when I create my texture file way back in Wings3D, I don't select the filesize it defaults on because I think it's too small. I use the second largest one. Maybe that is screwing something up?
IDK. Does this version work?
Attachments
assaulttank.zip
(127.78 KiB) Downloaded 22 times
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Texture Problems

Post by SanadaUjiosan »

It does. I'm guessing by the smaller texture file size you resized it to the default Wings3D texture size?

The fragility of these sorts of things always amazes me.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Texture Problems

Post by FLOZi »

Size won't make any difference
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Texture Problems

Post by Argh »

His texture was 2048. IDK whether that was the problem, or just flipping it vertically.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture Problems

Post by smoth »

flipping it vertically was/should be the issue.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Texture Problems

Post by rattle »

User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Texture Problems

Post by SanadaUjiosan »

Gentlemen (and gentlewomen), texture size seems to be the culprit. I just whipped up a quickie model and texture, using the 512 size and it looks like it should in-game. Thanks everyone for helping me along the way, I'll probably have more questions in the future.
Post Reply

Return to “Game Development”