Page 1 of 2

NadeoImporter: Alpha transparent textures

Posted: 27 Jan 2021, 03:15
by RayKoopa
Hey there,

I'm new to NadeoImporter and have a relatively simple question:
Which file formats and files names does NadeoImporter expect for alpha-transparent diffuse (32-bit RGBA) textures?

I only found some contradicting information: On top of that, TGA 32-bit with alpha-transparency seems so exotic in comparison to 24-bit non-transparent TGA that I don't know an offline / batch conversion program to convert my PNG textures (Gimp/IrfanView and some other tools I tried fixedly export to 24-bit, and I only found a crappy online conversion service capable of writing "proper" 32-bit TGA files).

I also tried passing in PNG or self-converted DDS files but NadeoImporter then claims it can't find the textures.

Which tools / formats are you using and what am I doing wrong?

I already set the material to use the TDOSN shader which seems required for the transparency to be rendered in-game.

Thanks for your help in advance.

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 12:29
by TMarc
If you provide TGA files with the proper naming scheme (texturename_D, _S, _N etc.) to the importer, it will convert them automatically.

Otherwise you also have the possibility to import textures (JPEG, PNG) in the editor, more precisely in the material editor as well.

Of course you can also convert your textures before on your own.
I use the nvidia plugin for Photoshop, which also works fine with Paintshop Pro.

There are some forum posts about the specialties of the textures, e. g. search for specular map.
If I don't forget it, I will add them later here.

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 13:17
by RayKoopa
Thanks for the reply! Using Blender to convert my textures to 32-bit TGA is a good idea and indeed I automated it with a small addon now (I know there's another Blender add-on for ManiaPlanet stuff but I don't understand its workflow, lol).

There are some things that confused me in the output given by NadeoImporter, apparently behaving like this for me:
  • If you use the TDOSN shader, but your texture does _not_ have alpha transparency, the faces will appear completely black in the game. Switch to TDSN instead or check your texture.
  • If you use the TDOSN shader, the NadeoImporter will complain about not finding _N or _S maps if they don't exist, despite otherwise importing the _D correctly. It does not emit these warnings when using the TDSN shader.
And besides that in general:
  • NadeoImporter simply crashes without an error logged to the console if it cannot find a material of the FBX in the MeshParams. I wish it would log the missing material name at least.
I wonder if someone else observed similar behavior to the above.

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 15:49
by TMarc
Which version of the importer are you using?

I'm using the convertassistant from maxi and it gives a message which material is currently missed by the importer.

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 15:58
by RayKoopa
It says it's the version from 2019-10-09_22_51.
I got it from the link at https://doc.maniaplanet.com/nadeo-impor ... ng-started and thought it's the newest, but it seems like there are variations?

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 16:07
by TMarc
There is an older version which was there quite a long time,
I have to check with the newest (later in the evening).

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 20:13
by RayKoopa
Thanks for doing that! :) You've already been a great help and I could import even bigger tracks from some other games.

However, I noticed I still have issues with _alpha_ transparency. When I use TDOSN, it supports binary transparency, that is, either fully transparent or opaque pixels. Is half/semi-transparency supported too? Here's a picture of my problem: this should be smoothly fading light bubbles and clouds in the background, however, they abruptly end to become fully transparent:
Image

Re: NadeoImporter: Alpha transparent textures

Posted: 28 Jan 2021, 22:38
by TMarc
Yeah, I have been struggeling as well with some materials. It is sometimes not that easy.
Especially the specular maps are horrible to get right (see some details in the links below) and give lot of headache.

Regarding the texture formats, thing to know is the type of the textures:
While DXT1 has "binary alpha", means it is either opaque or transparent,
DXT5 has 8 bit alpha for transparency, means you can have different steps.

Binary alpha is typically used for textures where you simply cut out parts,
like for grates, grids, fences and sprites.

What I recendly (re)discovered is that TDOSN is using binary alpha only (this was changed from MP3 to MP4).
You need to use TDOBSN instead, if you want a gradual opacity.
After funny fails with binary alpha and also with some milk glas kind of apparence,
I was finally able to make windows nearly transparent on an imported model:
2021-01-24_23h14_04.png
2021-01-24_23h14_04.png (181.13 KiB) Viewed 7050 times
As you can see, I added some heavly unsharpened stripes and patches to both the texture and its alpha channel.

Here are some useful links for you:

Textures:
viewtopic.php?f=321&t=32155&p=256266
viewtopic.php?f=547&p=277523&t=39522
viewtopic.php?f=544&t=39852&p=278051

Material editor:
viewtopic.php?f=663&t=44713&p=304684

Specular maps:
viewtopic.php?f=321&t=29721&p=271980
https://doc.maniaplanet.com/nadeo-impor ... or-objects

Normal maps:
viewtopic.php?f=321&t=27868
https://doc.maniaplanet.com/nadeo-impor ... -normalmap

Re: NadeoImporter: Alpha transparent textures

Posted: 29 Jan 2021, 00:25
by RayKoopa
EDIT: Nevermind what I previously wrote, I now figured out it was simply the TDOBSN I was missing since I didn't know about it yet.

Exporting alpha transparent textures from Blender as 32-bit TGA now, then letting the NadeoImporter convert them to DXT5. As long as I pick the TDOBSN it looks just fine:
Image

Thanks!

Re: NadeoImporter: Alpha transparent textures

Posted: 02 Mar 2021, 11:32
by adamkooo2
also don't combine TDOBSN with water, it may cause displaying problems with the transparency layers (further one may display as nearer)