Dead guys turning team color?

Vilyathar

Chieftain
Joined
Mar 2, 2022
Messages
19
I've had this problem for a while with a few custom unit reskins I made in nifskope. While working fine in every other way, they have this weird glitch where the rider from the horse turns team color on the ground after the unit model gets killed ingame (see screenshot). I thought it was something weird I accidentally did mixing and matching stuff with the models at first, since I did a lot of mucking with the affected units... until the unit I just made started doing it as well, and all I did to that one was switch out the weapon! I put the cossak's rifle on the cuissier. The weapon textures had a weird gloss/glow to them in game, so I copied the original texturing nodes for the cuissier's musket over onto the new rifle, and then manually selected the proper texture file for the gun. This made the textures all work properly, but the riders started turning green on the ground... I thought maybe it was somehow because the musket texture node had a teamcolor texture attached, whereas the rifle's original texture node did not, but deleting the teamcolor node from the textures seems to have made no difference. Plus I don't know why the texture nodes from the rifle are affecting the rider somehow. I don't know enough about this stuff to have any idea what the problem is. Any ideas?
 

Attachments

  • Screenshot (73).png
    Screenshot (73).png
    1.9 MB · Views: 65
Try messing with the materials. Basically make it so that all your bits in the nif all have the same material and alpha property. And I don't mean copies but the same one. You can do that by changing the numerical ID of the properties in nifscope so that they all point to the same node.
 
Try messing with the materials. Basically make it so that all your bits in the nif all have the same material and alpha property. And I don't mean copies but the same one. You can do that by changing the numerical ID of the properties in nifscope so that they all point to the same node.
By all the "bits" do you mean the horse, rider, and both of the rifle models should all be linked to the same two properties? I tried changing the rifles to share the same alpha and material ID, but I'm still getting green dead guys. Edit: Figured it out. In the original file, there are different material properties, so I left those same as original, but found out the alpha property for the horse and rider had gone missing. I was able to link them to the same alpha property as the rifles, like it is in the original, and now it is working like it should. Thanks!

Edit2: Now my black wolf knights are also fully functional! Thanks again!
Screenshot (76).png
View attachment 621810
 
Last edited:
I figured it'd be something like that. Long story short what makes models fade in or out is the material property and in particular the material controller attached to it. And the animation files look for models with a specific name and change the alpha channel on it to make things transparent. The alpha property meanwhile tells the graphics how to handle the model when it becomes transparent. So you need both, and configured the way you want.

And in most cases that means finding the original model name that the animations are looking for and using the material and alpha property attached to it as a reference on everything else.
 
I figured it'd be something like that. Long story short what makes models fade in or out is the material property and in particular the material controller attached to it. And the animation files look for models with a specific name and change the alpha channel on it to make things transparent. The alpha property meanwhile tells the graphics how to handle the model when it becomes transparent. So you need both, and configured the way you want.

And in most cases that means finding the original model name that the animations are looking for and using the material and alpha property attached to it as a reference on everything else.

That's good to know. Changing things to share the material and alpha property of items in the original scene has allowed me to fix most of the units I had some quirkiness with. I have one, however that is making me frustrated. I have a headress on a guy, where if I change either the guy or the headdress to share the same material as the other, one gets discolored or the other loses its shadows. It is because the specular and emissive colors are opposite each other for the two material properties. Can I some how make a material property for the headdress that is separate but will still be recognized by the animation file?
 
If you want to have the materials be separate and still have animated transparency you have to modify the actual animations to add an extra modifier for your second object. Just make a copy of all the kf and kfm files, put them next to your unit and open each one looking for the material property / alpha controller node in each one. Than add another empty one and fill it out with the same numbers and stuff, just with a different node name. You can even link to the same interpolator I think.
 
If you want to have the materials be separate and still have animated transparency you have to modify the actual animations to add an extra modifier for your second object. Just make a copy of all the kf and kfm files, put them next to your unit and open each one looking for the material property / alpha controller node in each one. Than add another empty one and fill it out with the same numbers and stuff, just with a different node name. You can even link to the same interpolator I think.
Thanks. For now I just turned off the death fade out entirely, by setting the model to a different material property. Most of the FfH units I swiped and reskinned already work that way anyway, so I figure it's fine.

I don't suppose you know what could be causing one of my models to float in the air far away from the horse he is supposed to be riding? I copied a unit model over to replace the original rider using SaiBotLieh's tutorial comment on this thread (https://forums.civfanatics.com/threads/unit-requests-thread.157708/page-177#post-9203025). I coped over the TriShapeData and the NiSkinInstance, and made sure they were pasted into the right spots in the block tree, etc. Got all the material properties working, and the alpha controllers I double checked too. Comparing the block tree with the one in the original file, everything looks fine. The guy pasted properly into the nifskope scene, riding the horse where he should be, and the hat I put on him did too. All the bones seem to match. But when I load the model in game, although the rider is animated and textured properly, it is floating in the air several feet from the horse, while the hat floats where it is supposed to be, over the horse. I am convinced this is related to the fact the "rider" node in the green nifskope skeleton is on the floor several feet away from the horse, the same place approximately that the model ends up floating over in the game. The reason I am confused is because it is also like this in the ORIGINAL scene with the original rider, but that one works fine. Note that I went through and verified that the coordinates for the unit and the trishapedata itself match the coordinates of the original rider, since I thought maybe it had pasted with different listed coordinates, but double checking that didn't fix it. I'm not sure what else to check. Any ideas?
 
Try moving it around in nifscope and and see what happens.
 
Top Bottom