Jump to content
Sign in to follow this  
Phoenix4646

[RESOLVED] Texture weirdness

Recommended Posts

Hey there,

it's been quite some while since I've posted on here the last time. I also noticed that you already patched the priority problem which my other thread was about!

It's nice to see how the game becomes better with every release.

But onto my problem.
This time it's about textures. I've been starting to simply paint over some body textures and it worked fine first. But now, I get weird problems with player colors and hair.

Note: I didn't change any of the export settings while I exported the textures, the problems just started to appear for some reason.

1. Hair weirdness: the hair texture just stops before the alpha does and only lays the selected color on the head. But strangely, it works on the head it was made from just fine.

https://dl.dropboxusercontent.com/u/93679544/0ad-hairoddness.png

(Note: I know that this isn't the same head texture, but the one on the left had the exact same hair)

2. Player color weirdness: For some reason, I can't get the colors to work correctly anymore. (The guy on the left was done first, his player color is absolutely fine. The guy in the middle got the player color overbrighten (I've made sure there's not anything white on the alpha which could make it brighter, it's plain and simple transparent) and the guy on the right is the unmodified hellenic healer.)

https://dl.dropboxusercontent.com/u/93679544/0ad-coloroddness.png

I also tried to go through the transparent stripe with the eraser-tool and also made the stripe wider, but the added alpha just became black with only very little player color in it.

https://dl.dropboxusercontent.com/u/93679544/0ad-morecoloroddness.png

Note that the Gaia color (white) and yellow somehow look better.

And these are my DDS Exporter settings in GIMP.

https://dl.dropboxusercontent.com/u/93679544/DDSExporterSettings.png

I've also tried using DXT1 and 5 instead but it didn't help.

I'm at a loss. Can anyone tell me what's wrong?

Best Regards

Edited by Phoenix4646

Share this post


Link to post
Share on other sites

Just a quick update.

I've been trying around a little bit more and just erased half of the skin to see what playercolors I get.

And for some reason, those freshly erased parts where looking like they should do. (except for the original stripe, which still looks too bright)

https://dl.dropboxusercontent.com/u/93679544/0ad-evenmorecoloroddness.png

...while on the white playercolor (and again, probably on the yellow one too) it's like nothing has changed on the skin. Now how is that possible?

I could understand that it uses the robe's shape because the game still has the healer's robe texture and maybe the model is somehow linked with it, but I erased all those parts, how can they still have the brown color? It's hard to explain what I mean, I hope you get it anyway.

How is it even possible that the parts with playercolor still have the robes' shape beneath them?

I checked the whole art design document and the texture format page on the wiki, but I couldn't find anything that could be related to this. Maybe some of the artists here can help me out and tell me how they create new skins?

Edited by Phoenix4646

Share this post


Link to post
Share on other sites

I see you're using GIMP. I had also a lot of trouble with alphas before in GIMP. It's kind of weird how GIMP handles transparencies.

The correct way to show the playercolor without the weird borderline is using masks layers. Just rightclick your texture layer, add mask (white, full opacity) and paint there in black where you want the playercolor to show. Try exporting that as .png and see if is fixed.

Your other problem about erasing and the texture still partially showing is weird. I have no Idea why is doing that. Are you sure your eraser opacity was at 100%?

  • Like 2

Share this post


Link to post
Share on other sites

First of all, thanks for the respones!

I see you're using GIMP. I had also a lot of trouble with alphas before in GIMP. It's kind of weird how GIMP handles transparencies.

The correct way to show the playercolor without the weird borderline is using masks layers. Just rightclick your texture layer, add mask (white, full opacity) and paint there in black where you want the playercolor to show. Try exporting that as .png and see if is fixed.

Your other problem about erasing and the texture still partially showing is weird. I have no Idea why is doing that. Are you sure your eraser opacity was at 100%?

I am Absolutely sure it was at 100%. I've erased over the transparency several times and it didn't change even a bit for some reason.

I've tried the layer method but the result is still confusing me.

https://dl.dropboxusercontent.com/u/93679544/0ad-2-colorweirdness.png
Well, I understand that the color is still brown because it's just white that's being lain over.

But how can it look like how it looked before? There's nothing there! How can there be texture that has been erased?

https://dl.dropboxusercontent.com/u/93679544/0ad-texture.png

Some pen dynamics work with opacity too. Pressure opacity with a hard edge brush is pretty reliable

Do you mean something like 'Hardness 050'? I've always been using that

I've also been trying it with Paint.net (which I am not very comfortable with) and I've gotten... 'I don't know'-results.

https://dl.dropboxusercontent.com/u/93679544/0ad-2-morecolorweirdness.png

As you can see, the colors cannot be recognized because they are so dark they do look nothing like they should.

This is the texture, actually the same as above, but I restarted it with the original healer texture from the SVN version.

https://dl.dropboxusercontent.com/u/93679544/0ad-texture2.png

Any ideas?

Share this post


Link to post
Share on other sites

I'm talking about the hardness 100 brush

hardness 50 will give you variable opacity on your edges, which could be causing problems

  • Like 2

Share this post


Link to post
Share on other sites

I've tried that too, same results. Maybe it's just because I have no idea how the textures work in this game. But again, how can there be texture that has been erased and isn't present in any of the other textures?

If I erase it completely though (erase everything so that it's only transparent), I get a model completely covered in player color (no parts of other textures beneath it, no shape or color, just plain non-multiplied playercolor). Unless you have any more ideas I guess I have to try around. Trial and Error :)

Share this post


Link to post
Share on other sites

My GIMP Version is 2.8.4 (which I'm probably gonna update to 2.8.10 unless you tell me I shouldn't) and I've tried both exporting directly to .DDS ( https://dl.dropboxusercontent.com/u/93679544/DDSExporterSettings.png ) and to .PNG ( https://dl.dropboxusercontent.com/u/93679544/PNGExporterSettings.png (I've also tried ticking everything there, but nothing changed))

Edited by Phoenix4646

Share this post


Link to post
Share on other sites

GIMP will work fine for textures as long as you understand what is happening. The issue is that the game does the player colour in an unusual way.

What I think you are expecting to happen is to have a background of the player colour with the texture over the top so the player colour shows through in the alpha sections. It works slightly differently though.

First with images you need to understand that each pixel in the image has 4 channels. 3 colours (red, green, blue) and the alpha or transparency channel. When you make part of the image transparent you only change the alpha channel, the colour components stay exactly the same. To see this in gimp you can use the layer mask as Enrique mentioned to show the alpha channel as a black and white image. You can disable the layer mask (from the right click menu of the layer) to see what the image looks like without the alpha channel.

Now what 0 A.D. does with the player colour to create the final texture:

1. Multiply the texture by the player colour and discard the alpha channel. So if the player colour is white then the image will be left as it was (multiplying by 1 leaves things unchanged). If the player colour is black the whole image will become black, if it is blue then the image will become blueish. You can test the multiply in gimp using layer modes, just create a layer with the player colour and set the mode to multiply.

2. Take the original texture with the alpha channel and place it on top of the new multiplied image. Then the multiplied image will show through in the transparent regions giving the final texture.

You can replicate this in gimp to preview what your texture will look like.

1. Open the texture, there should be a single layer.

2. Duplicate the layer.

3. Remove the alpha channel from the bottom layer. (Now you can see the colours "underneath" the transparent sections).

4. Create a new layer and put it in between the two existing layers.

5. Fill the new layer with the player colour (e.g. #0000FF for blue players).

6. Set the mode of the new layer to multiply.

Now you should see an image which will look like the final texture in game.

So it is important that you are aware of what the image is like "underneath" the transparent areas because it will affect what the texture looks like. This is why layer masks are useful so you can easily disable the transparency and see the colours in the transparent areas. (create the layer mask using the "Transfer layers alpha channel" option).

  • Like 4

Share this post


Link to post
Share on other sites

What I think you are expecting to happen is to have a background of the player colour with the texture over the top so the player colour shows through in the alpha sections. It works slightly differently though.

First with images you need to understand that each pixel in the image has 4 channels. 3 colours (red, green, blue) and the alpha or transparency channel. When you make part of the image transparent you only change the alpha channel, the colour components stay exactly the same. To see this in gimp you can use the layer mask as Enrique mentioned to show the alpha channel as a black and white image. You can disable the layer mask (from the right click menu of the layer) to see what the image looks like without the alpha channel.

Of course... that explains everything. :rolleyes: Thanks for the precise explanation, I will try it out and then show what I got. Thanks again!

Share this post


Link to post
Share on other sites

Kinda late reply, but I feel the need to close this up properly.

This is how it looks like now. Note that I didn't smooth the edges of the player color because I don't want to funk it up again :]

https://dl.dropboxusercontent.com/u/93679544/0ad-gudcolurs.jpg

In other words, everythings fine now. Thanks everyone for helping me!

Now I got some other questions, may I open a new thread or should I just rename this topic and post the questions here?

Edited by Phoenix4646

Share this post


Link to post
Share on other sites

Probably better to open up a new thread unless your other questions are also about textures - that way it's easier for others to find it if they have similar issues/questions :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...