News:

Rings of Reznor!

Main Menu

How to Fix "Pink" Skins In NifSkope.

Started by tommyboy, February 25, 2009, 02:15:23 AM

Previous topic - Next topic

tommyboy

I was at a loose end tonight so I started looking at meshes that consistently showed as "pink" in ctool2, using nifskope to examine their properties.
I found that I can permanently fix any mesh that was pinking, with a simple 3 step procedure.
Heres the notes I made as I worked;

Hypothesis: that "pink skins" is not a function of memory, or file size, or file type.
Proof.
Case A.

1. Copy a lot of meshes into "E:\freedom force vt3r\Custom\Art\library\characters\" (I put in 100 or so, to ensure that as I scrolled down from the top I would consistently hit certain meshes which were pink again and again, as long as the order of scrolling is constant).
2. Open ctool2 and highlight each mesh in turn till you find one that is pink-ing, every time you scroll to it..
3. In this case my Abomination_tv has a pink body. The mesh above, Valandar's Abomination does not. Ab_tv is pink on standard every time you scroll through the preceding meshes. If you select another skin, pinkness on standard goes, but if you switch to another mesh and then back to Ab_tv, pinkness on standard is back.
4. Copy over Vals Ab_val to Ab_tv in nifskope. Note Ab_tv hasn't been nifconverted, so I nifconvert it (it still has pinking after nifconversion, so it isn't that).
5. Now ab_tv it still pinks but copy of Ab_val in with it does not. Ever.
6. Change ab_val from male_hulking only to male_basic only in nifskope, IT NOW PINKS! ("only" because it had no _refl or _glow)
7. Change ab_val back to male_hulking only, IT NO LONGER PINKS!.
8. N.B. that male_hulking skin in standard is just a renamed copy of the male_basic skin, there is no difference between it and the new male_hulking skin.
9. change ab_tv to male_hulking, male_basic_refl, male_basic_glow in nifskope. Now the main skin doesnt pink, but refl or glow do,as it appears blue-ish (possibly the green of the main skin mixing with the pink of the refl or glow?).
10. change ab_tv to male_hulking_refl and male_hulking_glow, same as above; blue/pink.(copy/rename _refl and _glow to hulking versions)
11 change omni to use male_hulking_lightmap instead of male_basic_lightmap (it is just a copy/rename of the .tga). Result? NO PINKING!


Case B.
1. my 3dman mesh pinks on the body on standard skin.
2. change omni to male_heavy_lightmap from male_basic_lightmap (another copy/rename of the tga)= no change.
3.change nimaterial property to male_heavy, and nitexturing property/niSourceTexture to male_heavy. N.B. _refl and _glow are unchanged. REsult= NO PINKING!


Case C.
1. Adam2-t mesh pinks on body on standard
2. change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nimaterial property to male_basic2, and nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow are unchanged. REsult= NO PINKING!


Case D.
1 Adam_warlock69 pinks on body on standard.
2.change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow, and nimaterial property are unchanged. REsult= NO PINKING!

Case E.
1. Adam_warlock_cape_tv pinks on body on standard.
2. change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow, and nimaterial property are unchanged. REsult= NO PINKING!
3. Change lightmap and nisourceTexture back to male_basic and pinking re-occurs.

Conclusion.
That renaming  Omni's NiTextureEffect/NiSourceTexture to something other than "male_basic_lightmap", and renaming the pink mesh part's NiTexturingProperty/NiSourceTexture to something other than "male_basic", and providing suitably renamed tga's for the former male_basic and male_basic_lightmap cures meshes of pinking permanently.
If it were a memory issue, the problem would recur, since all cases use identical file sizes and the same number of maps. The only change is renaming.
If it were a function of the size of the skin files, then using exact copies would not cure it.
If it were a function of skin type ie .tga vs .dds, I would not have been able to fix these .tga using meshes.


Why 'pinking' happens, and why this 'cure' seems to work (I tried 5 meshes, it worked on all 5 and reversing the process got the pinking back), I don't pretend to know. All I can say is that since the fix, none have pinked at all, no matter how many other meshes I highlight first.

I'll play some more in the coming days as I have time, to see if the process can be cut down further.
Can other people please try it on their systems, so we know its not just me/my system/a fluke.


PLEASE REMEMBER TO BACK UP BEFORE DOING ANYTHING.

Tutorial:
1. Find mesh that consistently 'pinks'.
2. Copy and rename 'male_basic_lightmap.tga' to 'male_basic2_lightmap.tga' and male_basic.tga' to 'male_basic2.tga' in the standard folder (assuming it's the body that goes pink. For other parts rename the appropriate skin).
3. Open the 'character.nif' in nifskope. Find 'omni01' and rename 'NiTextureEffect/NiSourceTexture' to 'male_basic2_lightmap.tga'
4. Find the main character mesh in nifskope, usually 'male_basic', but if in doubt, click on the body in the preview panel to highlight it. Now rename the 'NiTexturingProperty/NiSourceTexture' to 'male_basic2.tga' and save the 'character.nif'.
5. Close down ctool2 if you haven't already. Reopen ctool2, scroll down through other meshes to find the one you just altered. It should now be fixed.






tommyboy

OK one possible stumbling block.
I tried the procedure on my ant_man_tv mesh, renaming to male_basic2 as described above, but it didn't work.
Upon renaming to male_heavy all the appropriate entries and skins, it worked.
Did I put in a typo? I don't think so, but its 2.45am, so it's possible.
More tomorrow, probably...

tommyboy

OK, we already knew that converting .tga textures to .dds also fixes the pinking.
What I didn't know was that if you save male_basic and male_basic_lightmap as .bmp files, and in nifskope change the relevant entries to use those .bmp files it not only works, it cures pinkness too.

I'm beginning to suspect that the problem is maybe caused by ctool2 not "liking" for the maps to becalled "male_basic.tga" and "male_basic_lightmap.tga".
I know that sounds absurd, but consider this;
I take Irrationals own "action_girl" mesh, which never pinks for me.
I copy/paste/rename all the skin files so "actiongirl.tga" also has a copy caled "male_basic.tga". Same skin, different name. "actiongirl-light.tga" has "male_basic_lightmap.tga", same skin, different name.
I go into nifskope and set up the mesh to use "male_basic.tga" and "male_basic_lightmap.tga".
Can you guess the result?
Yes, the mesh now pinks.
Inconclusive?
OK, I now rename the skins and nifskope entries to "male_basi.tga" and "male_basi_lightmap.tga".
Result?
No more pinking.
Bear in mind that I can not only fix pinking in meshes that have it by renaming the two "male_basic" parts and skins in question, but more importantly, I can cause pinking in meshes that didn't have it by changing the names to "male_basic".
That to me is pretty conclusive.

I still don't know why ctool2 doesn't work well with meshes using "male_basic.tga" as their base texture and "male-basic_lightmap.tga" as their lightmap texture.
But I do know that using a different format, ie .dds or .bmp cures pinking, and renaming to anything other than "male_basic" in .tga format cures it too.

I was hoping to discover the exact causes of the problem, if it were some setting in the mesh, or the lighting, or the skin itself. But with action_girl I changed nothing except the names used by the base skin and lightmap, and created the problem, then cured it by renaming to anything but "male_basic.tga". To me, that strongly points to that name being the problem.

I just did the renaming on NoCapeMan, but since he has no "omni" light nor lightmap file I only copy/renamed his skin from "NoCapeMan.tga" to "male_basic.tga" and changed the NiSourceTexture to look for "male_basic.tga" rather than "NoCapeMan.tga" , and he now displays as pink.
Ever wondered why Irrational named him "nocapeman" rather than the old designation of "male_basic"?
Maybe they knew of the problem. Certainly none of their meshes uses "male_basic.tga" in the skins in FFv3R, as far as I can tell.

tommyboy

Oh, one further bit of info;
If in addition to a pink body a mesh displays pink parts mapped to stuff other than the "male_basic.tga" map, renaming "male_basic_lightmap.tga"  in the skin and 'skope fixes that. So applying my "fix" cured meshes of pink bits as well as bodies. The crucial thing for pink bits seems to be the lightmap, not the name of whatever the bits are mapped to, unless they are mapped to Male_basic.

JKCarrier

Wow, how bizarre! Thanks for taking on all the tedious detective work. Maybe it's having a lot of meshes with the same texture name (regardless of what it is) that causes the CTool to get confused?

Have you tried your fixed meshes in-game yet? If you can do a large Rumble Room battle without any "pinking", I'd say you've nailed it.

tommyboy

Quote from: JKCarrier on February 25, 2009, 02:01:01 PM
Wow, how bizarre! Thanks for taking on all the tedious detective work. Maybe it's having a lot of meshes with the same texture name (regardless of what it is) that causes the CTool to get confused?

Have you tried your fixed meshes in-game yet? If you can do a large Rumble Room battle without any "pinking", I'd say you've nailed it.

I've been trying them in-game, but so far it's inconclusive. IE, they aren't pinking, but neither is anything else, so far. I'm having one of those days when the game itself works perfectly. Not a pink texture so far, playing several different Mods with a full complement of characters who all show pink in ctool2.
I'll keep testing.

daglob

Okay, so far I've never had trouble with pink parts in game, but if the mesh I'm looking at in CTool has a standard skin that turns pink, IF there is another skin in the skins folder, loading that skin will usually fix the pinking problem. If I switch back to the standard, it is no longer pink.

... Although I do sometimes have trouble with pink reflections...

tommyboy

Quote from: daglob on February 25, 2009, 04:57:57 PM
Okay, so far I've never had trouble with pink parts in game, but if the mesh I'm looking at in CTool has a standard skin that turns pink, IF there is another skin in the skins folder, loading that skin will usually fix the pinking problem. If I switch back to the standard, it is no longer pink.



Yes, I covered that in my first post. Switch to a different mesh then back to the one with pinking, it will be pink again. It is an easily repeatable phenomena in ctool2. As long as you show the same meshes in the same order, the pinking ones always show pink.
It's in the game proper that it all gets a bit more random.
I found 2 of my tvlite meshes in one of my Mods that showed pink parts in game. I've fixed them, and they haven't shown pink parts or main mesh in either the game or ctool2 since, and other meshes have been showing pink here and there, so I know the problem is happening for some meshes. So it looks like the fix works in-game too, for now.

Unfortunately at this stage my new fix is no better than converting to .DDS files in terms of ease of use, in fact it's slightly clumsier in some ways.
What it does do is prove that it is not a memory issue, or an issue with file size, or with the number of maps a mesh uses. Because all those remain the same after my fix, so it cannot be any of them. That is progress of a sort, in that we can now stop blaming those things, and be sure they are not the cause, and try to work out exactly what is the cause.

tommyboy

Gaaahhh!!!
It seems that applying the fix to just the omni and the main mesh does NOT fix all other bits.
By cycling through more meshes in ctool2 before looking at the two I "fixed", I can still have them with pink bits. Still haven't seen it in-game with them, but in ctool2 is bad enough for now.
So I'll try renaming the maps and such for the bits too, but it sort of blows the "male_basic" theory out of the water, or at least means it isn't just that.

Johnny Patches

if i remember right TB i did something with the gloss
i'd have to see when i get home to be 100% about this

tommyboy

Right then.
If you rename the maps and entries for various bits, it works.
For instance, I took my wonderman_classic_tvlite, applied the fix to the main mesh and omni (renaming to "basic.tga"). This seemed to work for the boots, goggles etc too, but actually didn't.
So I put all the bits (boots, goggles, belt,shoulders,armbands) into one map (zemo_bits.tga), to make things simpler. They still showed as pink.
Then I renamed all "zemo_bits.tga" type files and entries to "bits.tga", and this has worked, both on this mesh and another _tv type one.

What's a bit weird is that when I did the omni/main mesh only fix on antman_tv, without touching any of its many other maps, that worked completely, and fixed the previously pink extra bits on the mesh. I did however rename male_basic to male_heavy in that instance. So I guess I'll roll Wonderman_classic_tvlite back to the start, and just rename the omni/main mesh to use male_heavy, and see wha'ppen.


oktokels

This thread has helped me a lot about fixing pink skins. Especially this line:

Quote from: tommyboyEver wondered why Irrational named him "nocapeman" rather than the old designation of "male_basic"?
Maybe they knew of the problem. Certainly none of their meshes uses "male_basic.tga" in the skins in FFv3R, as far as I can tell.

Just wanted to revive this thread, to add that i think you have to rename all files that start with "male_basic" with something else, but also that name has to be unique for that specific mesh. I think the problem also appears when there's too many files with the same name, too many male_basic_lightmaps in the same map causes the pink skin problem. So, if you give every character a specific name for their lightmap files, the problem should dissapear.

Say, if ironman has the pink skin problem,  you go to ironman mesh folder and rename all "male_basic" to "ironman01". That way you get: ironman01.dds, ironman01_glow.dds, ironman01_refl.dds and ironman01_lightmap.dds. Rename the files in nifskope too and the problem should be solved. At leats, that way has worked for me.

Cheers  :thumbup:

detourne_me

You're 100% correct, Okotels.
Pinking happens when there are too many textures with the same name being called upon. I think it's something about memory in the game itself.
The best way to remove pinking is to have individual names for each texture file.
The ultimate way to stop pink textures is by removing all lightmap, refl, and glow textures in the nif, and giving the main texture file an individual name.
This might make for a boring character without effects, but you'll be guaranteed that they'll never spawn pink.

eluvium

Quote from: tommyboy on February 25, 2009, 02:15:23 AM
I was at a loose end tonight so I started looking at meshes that consistently showed as "pink" in ctool2, using nifskope to examine their properties.
I found that I can permanently fix any mesh that was pinking, with a simple 3 step procedure.
Heres the notes I made as I worked;

Hypothesis: that "pink skins" is not a function of memory, or file size, or file type.
Proof.
Case A.

1. Copy a lot of meshes into "E:\freedom force vt3r\Custom\Art\library\characters\" (I put in 100 or so, to ensure that as I scrolled down from the top I would consistently hit certain meshes which were pink again and again, as long as the order of scrolling is constant).
2. Open ctool2 and highlight each mesh in turn till you find one that is pink-ing, every time you scroll to it..
3. In this case my Abomination_tv has a pink body. The mesh above, Valandar's Abomination does not. Ab_tv is pink on standard every time you scroll through the preceding meshes. If you select another skin, pinkness on standard goes, but if you switch to another mesh and then back to Ab_tv, pinkness on standard is back.
4. Copy over Vals Ab_val to Ab_tv in nifskope. Note Ab_tv hasn't been nifconverted, so I nifconvert it (it still has pinking after nifconversion, so it isn't that).
5. Now ab_tv it still pinks but copy of Ab_val in with it does not. Ever.
6. Change ab_val from male_hulking only to male_basic only in nifskope, IT NOW PINKS! ("only" because it had no _refl or _glow)
7. Change ab_val back to male_hulking only, IT NO LONGER PINKS!.
8. N.B. that male_hulking skin in standard is just a renamed copy of the male_basic skin, there is no difference between it and the new male_hulking skin.
9. change ab_tv to male_hulking, male_basic_refl, male_basic_glow in nifskope. Now the main skin doesnt pink, but refl or glow do,as it appears blue-ish (possibly the green of the main skin mixing with the pink of the refl or glow?).
10. change ab_tv to male_hulking_refl and male_hulking_glow, same as above; blue/pink.(copy/rename _refl and _glow to hulking versions)
11 change omni to use male_hulking_lightmap instead of male_basic_lightmap (it is just a copy/rename of the .tga). Result? NO PINKING!


Case B.
1. my 3dman mesh pinks on the body on standard skin.
2. change omni to male_heavy_lightmap from male_basic_lightmap (another copy/rename of the tga)= no change.
3.change nimaterial property to male_heavy, and nitexturing property/niSourceTexture to male_heavy. N.B. _refl and _glow are unchanged. REsult= NO PINKING!


Case C.
1. Adam2-t mesh pinks on body on standard
2. change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nimaterial property to male_basic2, and nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow are unchanged. REsult= NO PINKING!


Case D.
1 Adam_warlock69 pinks on body on standard.
2.change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow, and nimaterial property are unchanged. REsult= NO PINKING!

Case E.
1. Adam_warlock_cape_tv pinks on body on standard.
2. change omni to male_basic2_lightmap from male_basic_lightmap (another copy/rename of the tga) and also change nitexturing property/niSourceTexture to male_basic2. N.B. _refl and _glow, and nimaterial property are unchanged. REsult= NO PINKING!
3. Change lightmap and nisourceTexture back to male_basic and pinking re-occurs.

Conclusion.
That renaming  Omni's NiTextureEffect/NiSourceTexture to something other than "male_basic_lightmap", and renaming the pink mesh part's NiTexturingProperty/NiSourceTexture to something other than "male_basic", and providing suitably renamed tga's for the former male_basic and male_basic_lightmap cures meshes of pinking permanently.
If it were a memory issue, the problem would recur, since all cases use identical file sizes and the same number of maps. The only change is renaming.
If it were a function of the size of the skin files, then using exact copies would not cure it.
If it were a function of skin type ie .tga vs .dds, I would not have been able to fix these .tga using meshes.


Why 'pinking' happens, and why this 'cure' seems to work (I tried 5 meshes, it worked on all 5 and reversing the process got the pinking back), I don't pretend to know. All I can say is that since the fix, none have pinked at all, no matter how many other meshes I highlight first.

I'll play some more in the coming days as I have time, to see if the process can be cut down further.
Can other people please try it on their systems, so we know its not just me/my system/a fluke.


PLEASE REMEMBER TO BACK UP BEFORE DOING ANYTHING.

Tutorial:
1. Find mesh that consistently 'pinks'.
2. Copy and rename 'male_basic_lightmap.tga' to 'male_basic2_lightmap.tga' and male_basic.tga' to 'male_basic2.tga' in the standard folder (assuming it's the body that goes pink. For other parts rename the appropriate skin).
3. Open the 'character.nif' in nifskope. Find 'omni01' and rename 'NiTextureEffect/NiSourceTexture' to 'male_basic2_lightmap.tga'
4. Find the main character mesh in nifskope, usually 'male_basic', but if in doubt, click on the body in the preview panel to highlight it. Now rename the 'NiTexturingProperty/NiSourceTexture' to 'male_basic2.tga' and save the 'character.nif'.
5. Close down ctool2 if you haven't already. Reopen ctool2, scroll down through other meshes to find the one you just altered. It should now be fixed.

Blue Devil_skope also pinks

SickAlice

That is the gist yes. Most problems are always down to settings, learn settings and keep that stuff bookmarked. Ideally you want the settings for  :ff: and  :ffvstr: to match other files and for those to closely match the ones that came with the game. I mostly keep a copy of "male_basic_effects" on hand and use that as the template and either match settings to that nif and/or copy them from it where need be since I know that nif has clean settings. Pink happens because:

- There are filenames in the nif (textures) that are different from or not present at all in the texture folders. So you have to either make, rename texture files or change or get rid of the ones in the nif.
- Conflicts. This is typically to the "pink gloss" effect. It has to due mainly with multiple lightmaps. Everything in the nif should direct to the same single lightmap in our games case most of the times. The easiest solution is the Scene Root has a lightmap, then delete all lightmaps through the nif itself. Everything in the Scene Root will adopt that lightmap. Hence conflicts.
- CTool and CTool2 suck and sometimes have memory errors on and off. So pink can "just happen" there. CTool and CTool2 are however not always what is rendered in game. Always check and do test runs in game and don't rely exclusively on CTool.