Page 1 of 2
[Solved] Transparency of the object, thx NADEO!!
Posted: 19 Dec 2015, 17:04
by mcrobert
Hello everyone
I have this problem (the video explains everything) that afflicts me from time and I can not find a solution, please help me

.
I attach the test file in. FBX with textures.
Thank you all
Video
https://www.youtube.com/watch?v=oQtWyE6kCTU
http://www.blackangelteam.net/Tre.rar
Re: Problem with the transparency of the object
Posted: 19 Dec 2015, 18:47
by xrayjay
hey,
i experienced the same with my test textures/items but it only occurs on one side of the item.
I guess the problem is here that a double faced plane is just over each other and the game does not know which side should be displayed / both sides will be displayed at the same time -> and this ugly effect occurs (maybe, i don´t know exactly^^)
But i have to say that i never recognized this effect on my objects where i use nadeo stock alpha texture (and there are also double faced planes)...
We need an answer of an pro

Re: Problem with the transparency of the object
Posted: 19 Dec 2015, 20:44
by mcrobert
Thanks for your response xrayjay, I must say that you are right, I tried the same object with textures by Nadeo and works perfectly, now seems to be a problem of Mipmap, but I'm not sure ...
NADEO Heeeelp !!!

Re: Problem with the transparency of the object NADEO HEEELP
Posted: 20 Dec 2015, 20:39
by mcrobert
Post differece Texture,
1 Nadeo Original Texture
Code: Select all
File Name: TreeBranch_D.dds
File Size: 5.33 MB
File Type: DirectDraw Surface
------------------------------------------------------------------
Header Size: 124 bytes
Header Flags: 00021007 (HEIGHT|WIDTH|MIPMAPCOUNT|PIXELFORMAT|CAPS)
Surface Height: 2048 pixels
Surface Width: 2048 pixels
Mipmap Levels: 12
PixelFmt Size: 32 bytes
PixelFmt Flags: 00000004 (FOURCC)
FourCC Tag: DXT5
Surface Flags: 00401008 (TEXTURE|MIPMAP|COMPLEX)
==================================================================
2 Texture create from NadeoImporter
Code: Select all
File Name: fncec_D.dds
File Size: 21.5 KB
File Type: DirectDraw Surface
------------------------------------------------------------------
Header Size: 124 bytes
Header Flags: 000A1007 (HEIGHT|WIDTH|LINEARSIZE|MIPMAPCOUNT|PIXELFORMAT|CAPS)
Surface Height: 128 pixels
Surface Width: 128 pixels
Linear Size: 16384 bytes
Mipmap Levels: 8
PixelFmt Size: 32 bytes
PixelFmt Flags: 00000004 (FOURCC)
FourCC Tag: DXT5
Surface Flags: 00401008 (TEXTURE|MIPMAP|COMPLEX)
==================================================================
The
Header Flags is different, and I haven't found a way to make it equal, what setting should I use to save the textures as the original Nadeo? Mystery....

Re: Problem with the transparency of the object NADEO HEEELP
Posted: 20 Dec 2015, 21:34
by TMarc
Not sure, but it might be related to texture compression.
See also here for technical details:
https://msdn.microsoft.com/de-de/librar ... 85%29.aspx
I guess you should compare a smaller texture from Nadeo.
Re: Problem with the transparency of the object NADEO HEEELP
Posted: 20 Dec 2015, 23:42
by Electron
mcrobert wrote:The
Header Flags is different, and I haven't found a way to make it equal, what setting should I use to save the textures as the original Nadeo? Mystery....

A lot of DDS writers calculated the pitch or linear size wrong in the past. Therefore every reader have to calculate these values from other data of the header and predefined formulas. This is the reason, why some writers fill this header member and some not. So, both DDS files are of the same format. Only the height/width of the top level texture are different (and accordingly the number of Mipmaps).
Re: Problem with the transparency of the object NADEO HEEELP
Posted: 21 Dec 2015, 00:51
by TGYoshi
It's likely caused by the engine drawing transparent objects in the wrong order.
It's fairly common that transparent things are handled in a fully separate way, drawn after all other things (after the depth buffer has settled), since you can't use a default depth buffer for them. It seems like the engine also draws the transparent objects last, but since it can't rely on the depth buffer to properly order them anymore (since it has to undergo a more complex way of "partially" letting a color through another object), the things are often ordered based on distance from the viewpoint, so things far away are drawn first, closer then on top of it.
There are obviously alternatives to this relatively simple technique, but this effect is extremely common in cases where a standard depth buffer no longer does the job well.
So maybe there's a flag you need to toggle for the engine to recognize it as a proper (partial-)transparent surface during import or it simply doesn't exist for custom materials. I don't know of any, though.
Re: Problem with the transparency of the object NADEO HEEELP
Posted: 21 Dec 2015, 17:11
by mcrobert
Other evidence, other problem, I copied the Original Texture Nadeo on "Texture" folder and recompiled the object with Nadeoimporter, result... same problem of transparencies.
So it works
File "Tre.MeshParams.xml"
Code: Select all
<MeshParams Scale="1" MeshType="Static" Collection="Valley">
<Materials>
<Material Name="A" Model="TDOSN" Link="TreeBranch" PhysicsId="Trunk" />
</Materials>
</MeshParams>
So does not work
Code: Select all
<MeshParams Scale="1" MeshType="Static" Collection="Valley">
<Materials>
<Material Name="A" Model="TDOSN" BaseTexture="Texture/TreeBranch" PhysicsId="Trunk" />
</Materials>
</MeshParams>

The mystery deepens
Re: Problem with the transparency of the object NADEO HEEELP
Posted: 21 Dec 2015, 17:51
by xrayjay
For linked textures (embed ones) you don´t need a material definition or physics definition
Code: Select all
<MeshParams Scale="1" MeshType="Static" Collection="Valley">
<Materials>
<Material Name="A" Link="TreeBranch" />
</Materials>
</MeshParams>
is enough
For the other ones (especially in Valley the Trees_D Trees2_D etc.) textures, seems that they made as "sprites" / "software-sprites", there´s probably something behind where we have no access to. This would explain why these textures are not inside the MatLib (same for canyon).
May something like described above is used also for the other alpha stock textures? (not sprites but something similar behind where some things are "hard coded" for some textures)
sprites explanation (wiki) >
https://en.wikipedia.org/wiki/Sprite_%2 ... raphics%29
Guess only nadeo can answer that (what will not happen this year anymore)

Re: Problem with the transparency of the object NADEO HEEELP
Posted: 21 Dec 2015, 20:03
by jui
I have to guesses / things you could try.
Maybe do a little gap between the two planes like 0.1 or even less.
You could also try to use a different PhysicsId. The TreeBranch material uses "NotCollidable" according to the NadeoImporterMaterialLib.txt. "Metal" and "MetalTrans" also are used for rendering transparent textures.