[Solved] Transparency of the object, thx NADEO!!

Discuss everything related to custom data creation.

Moderator: NADEO

User avatar
mcrobert
Posts: 72
Joined: 01 Sep 2011, 15:10
Location: Italy
Contact:

Re: Problem with the transparency of the object NADEO HEEELP

Post by mcrobert »

xrayjay wrote: Guess only nadeo can answer that (what will not happen this year anymore) :lol: :lol:

Waiting for reply by Nadeo I wish you Happy Christmas to all :D
Image
User avatar
mcrobert
Posts: 72
Joined: 01 Sep 2011, 15:10
Location: Italy
Contact:

Re: Problem with the transparency of the object NADEO HEEELP

Post by mcrobert »

I think I found the problem, after further evidence I have compiled the object with an original texture Nadeo, and so far we know that everything works fine, I then created a Mod (skins) and replaced the texture Nadeo with my texture, works perfectly, at this point I think it's a big bug in NadeoImporter, only works well with the textures of NadeoImporterMaterialLib.txt with _ TDOSN _.

:roflol:

Happy holidays to All!
Image
Fix
Nadeo
Nadeo
Posts: 1256
Joined: 14 Jun 2010, 17:28

Re: [Unresolved] Transparency of the object NADEO HEEELP!!

Post by Fix »

The bug you have when looking at the back of your trees is what we call a "alpha sorting problem".
It happens with non binary alphas.
I don't know where it lies in the nadeo importer workflow, here are some things to try:
Save manually your transparent texture as DXT1, not DXT5, this will force the alpha channel to be binary (=Black OR white, no grey).
But the DXT1; to gain memory space, uses a trick : it removes alpha channel and "paste" it in the diffuse : the transparent pixels are black. (this causes a black halo on border pixels).
If this fixes your problems, you will have to create sources with binary alpha (you'll need to contrast the alpha channel until it's only Black and White).
If DXT1 doesn't fix it, the bug is elsewhere.
Our images are saved as non binary alpha, but we specify somewhere in our datas that they will displayed as binary, the engine convert the 256 grey alpha to black and white ( dark greys are read as black, light greys as white).
So, our own .dds will probably create the alpha sorting bug if used in a material not forcing the binary Alpha, as you tested.
That also means that a texture with non binary alpha in a mod will be read as binary, because or material will force it.
This has annoyed a lot of mod makers when we converted stadium, because they were no longer able to create glass/ice effects by just applying a grey alpha, but this choice is also more robust and avoids your kind of problem.

My conclusion : I think the items transparency shading doesn't force binary alpha (this enable players to do more complex things like smoke, but I'm not sure it's "wanted"), so any "NotReady" texture will create this sorting bug.

Note : in the past(10 years ago O_O) Binary alpha was not forced in the engine but directly read from the image, and sometimes it was really hard to get photoshop reach the binary state.
We could contrast, contrast and contrast again the alpha channel...photoshop always let 1 pixel or 2 being different than black or white... that gave me headaches.

Trick 1 :if you don't find a way to have your sources as you want, save as DXT1, reopen it and copy the alpha channel into your source. (It's quite simple, maybe a script or plugin exists, or a more simple way to do it with more recent tools)

Trick 2: in photoshop, uses the free filter freebies : solidify A to expand the color of your diffuse in the transparent areas, to avoid outside pixels drooling (although it doesn't work well with foliage, it's better to clone your tree in transparent areas to maintain crispyness in the mipmaps).
User avatar
mcrobert
Posts: 72
Joined: 01 Sep 2011, 15:10
Location: Italy
Contact:

Re: [Unresolved] Transparency of the object NADEO HEEELP!!

Post by mcrobert »

Hi Fix, happy new year :D ...
Thank you for your very thorough explanation of the problem, but it doesn't work with the Alpha Binary (DXT1) I had already tried, it's not an issue of texture, I think it's a problem of conversion by NadeoImporter, as I wrote previously if I use your textures with this method works "<Material Name="A" Link="TreeBranch" />", this doesn't work with no texture "<Material Name="A" Model="TDOSN" BaseTexture="Texture/TreeBranch" PhysicsId="Trunk" />", it's been a long time since seeking a solution I tried everything and with all possible combinations.

P.S.
Fantastic that Plugin thank you :thumbsup:
Image
Fix
Nadeo
Nadeo
Posts: 1256
Joined: 14 Jun 2010, 17:28

Re: [Unresolved] Transparency of the object NADEO HEEELP!!

Post by Fix »

Ok, I did the repro on Maniaplanet.
Then I loaded the item in a more recent dev exe and it is fixed, it's not a problem linked to the nadeo importer.
The good news is it is fixed, and will automatically be fixed when the updates will come, the bad news is you'll have to wait for the update :(
(my answer to your next question is I don't know :D)
User avatar
mcrobert
Posts: 72
Joined: 01 Sep 2011, 15:10
Location: Italy
Contact:

Re: [Unresolved] Transparency of the object NADEO HEEELP!!

Post by mcrobert »

Thank you so much Fix, I'll wait for the update, my next question you don't do, I already have your answer :D :thumbsup:
Image
User avatar
xrayjay
Posts: 1481
Joined: 29 Aug 2010, 14:19

Re: [Solved] Transparency of the object, thx NADEO!!

Post by xrayjay »

great news :thumbsup: hopefully the sprite use is also included in this update and some more stuff which is importer related (mentioned in the wishlist and the importer thread) :D
Post Reply

Return to “Title Pack & Custom Data Creation”

Who is online

Users browsing this forum: No registered users and 1 guest