cool3a2
Deity
- Joined
- Mar 30, 2007
- Messages
- 2,177
I have returned to the fur shader making some strange experiences. I'll have some brainstorming here to share my thoughts so you can tell me if you see something that I might have missed or can give me new ideas. Or maybe I get an idea while writing this. I hope this won't become a monologe. Let's make a summarize about what I have at first...
What I have...
I have several leaderheads by hand that were all made by nitram initially, that use the fur part from Genghis and that I try to improve on. I was partially successful to some extend, but there remain issues. So we have the following leaderheads:
- Koppány (working, based on shaka)
- Ruga (based on Ghengis)
- Álmos (based on Saladin)
- Rákóczi (based on the Spanish King from Colonization)
- István Báthori (based on Stuyvesant)
And of course there are Shaka and Genghis that, too, use the fur parts with the TTorusFur shader.
First steps
Initially, I had problems with the direction from were the light strikes the fur. To have an easy example: the light should have come from the left, while the the other side of the fur (that should have been in the shadow) was brighter then the rest. Sometimes the fur even remained entirely black. I have successfully solved this by being careful with roation and translation (moving) operations, not using SkinInsatnces and using TriStrips instead of TriShapes. Basically, the light now falls in from the correct angle, but the dark parts are overly dark. The onl exception is Koppány, who is working fine on this point.
Ideas to solve the issue
The naive idea is to work on the lights and material properties. Unfortunately, only the 3 diffuse lights have influence on the fur, at least if the TTorusFur shader is on, and no additional lights can be added as those don't seem to take effect at all. Similarily, the material properties have no influence. With only 3 lights available, it is pretty hard to get a proper light setting, especially if there is a certain light effect that should be created like a strong shadow. Basically, I have given up this idea as the light effects created looked 'weird' and artifical.
Instead, I was trying to find out why exactly the fur doesn't work as expected and then to solve the actual problem. Fur curiousity, I swapped in Álmos' the fur to Ghenghis and noticed that it then worked just fine. I again swapped in all of Genghis lights into Álmos to make sure all the settings are identical. No change to the fur problem. I then recognized that the Bloom-lights are different from the others in that they have several nodes as children. These nodes resemble the leaderheads skeleton nodes. To be more specific, normally, these nodes are no copy, but the same nodes as in the skeleton (check the indices). Now, if anyone nifswaps the Bloom-lights from another leader into a user-made leaderhead, the nodes underneath the bloom-lights get copied. In this case, the indices of the blooms children will differ from those of the skeleton. Not enough, not only are there plain nodes underneath the blooms, but also meshes (that would be copied as well in this case, without showing up in the 3d view). This technique will blow up the nifs size significantly, while I am not sure whether these lights then have any effect. When working on a leaderhead that I got from an experienced leaderhead modder recently, I noticed that there were also hidden meshs that blew up the nif. Back then, I had no idea where these meshes came from. I'm almost sure that I didn't cause that, not sure if this was an accident by the experienced modder or whether he just didn't know about this. Or whether I caused this long ago so that I don't remember (but the meshs I found let me think that I am not responsible). Anyways, when swapping in the fur part to Genghis, I recognized that the fur was not only added to the skeleton, but also to the blooms. So I thought that messed up blooms could be the cause of the problem. To exclude the blooms as an error source or to even solve the problem, I wapped all the meshes and all the lights, except of the blooms, back to saladin and then keyed in the blooms settings manually. Besides of that the file size dropped from 3225kB to 873kB, the fur issue persisted. This ways, the following things are not responsible for this problem:
- the lights (have been copied from / adjusted according to Genghis carefully)
- the mesh (works in Ghengis' nif)
- the texture (also works in Genghis nif)
Nevertheless, there seems to be some unknow environmental setting for Genghis and Shaka that have influence on the fur. This would explain why there is no problem with Koppány (based on shaka) and why my fur parts work with Genghis. Nitrams Ruga does not work properly, I think, although it is based on Ghengis. Maybe it works nevertheless and only the light setting is 'misleading'. In any case, in order to create a night scene with fire effect, nitram worked on the lights which put the whole nif in unorder. So even if the fur doesn't work, I think I could make it working here by nifswapping with Genghis, I'm just not sure whether I could recreate the light effect, so I didn't give it a shot yet.
Unfortunately, I didn't get any new ideas by my own yet. Hope you guys can think of something.
EDIT: There is something else I read about recetnly and accidently that is related to the TTorusFur shader. I'm just not sure how and if it fits to my problems. IgorS made a Casimir LH also using the fur part (nitram used that as base for Báthori, so Báthori is not a direct derivative of Stuyvesant) and in the filedbs entry for that LH, someone mentions that the fur is invisible for him. IgorS said that the shader causes that sort of trouble. Although I think that this issue has to do with the shader, I don't think it is a general problem as the user didn't mention trouble with Genghis or Shaka. I think there is something screwed up. I swapped that part with another one that I was sure about would work with Genghis. Maybe this issue is gone this ways. Also, I had similar effects when playing around with the blooms. If I corrected the indices of the fur there, the fur disappeared in sceneviewer, while it was there in nifskoe. Civ4 normally behaves like SceneViewer, so I think I wouldn't have seen it in the game either. Lastly, it can not be excluded that the user had an older machine not supporting shaders while IgorS didn't provide a noshader version of his LH. All in all, I couldn't build up a handy theory how this fits to my issue, just mention it to have it complete.
What I have...
I have several leaderheads by hand that were all made by nitram initially, that use the fur part from Genghis and that I try to improve on. I was partially successful to some extend, but there remain issues. So we have the following leaderheads:
- Koppány (working, based on shaka)
- Ruga (based on Ghengis)
- Álmos (based on Saladin)
- Rákóczi (based on the Spanish King from Colonization)
- István Báthori (based on Stuyvesant)
And of course there are Shaka and Genghis that, too, use the fur parts with the TTorusFur shader.
First steps
Initially, I had problems with the direction from were the light strikes the fur. To have an easy example: the light should have come from the left, while the the other side of the fur (that should have been in the shadow) was brighter then the rest. Sometimes the fur even remained entirely black. I have successfully solved this by being careful with roation and translation (moving) operations, not using SkinInsatnces and using TriStrips instead of TriShapes. Basically, the light now falls in from the correct angle, but the dark parts are overly dark. The onl exception is Koppány, who is working fine on this point.
Ideas to solve the issue
The naive idea is to work on the lights and material properties. Unfortunately, only the 3 diffuse lights have influence on the fur, at least if the TTorusFur shader is on, and no additional lights can be added as those don't seem to take effect at all. Similarily, the material properties have no influence. With only 3 lights available, it is pretty hard to get a proper light setting, especially if there is a certain light effect that should be created like a strong shadow. Basically, I have given up this idea as the light effects created looked 'weird' and artifical.
Instead, I was trying to find out why exactly the fur doesn't work as expected and then to solve the actual problem. Fur curiousity, I swapped in Álmos' the fur to Ghenghis and noticed that it then worked just fine. I again swapped in all of Genghis lights into Álmos to make sure all the settings are identical. No change to the fur problem. I then recognized that the Bloom-lights are different from the others in that they have several nodes as children. These nodes resemble the leaderheads skeleton nodes. To be more specific, normally, these nodes are no copy, but the same nodes as in the skeleton (check the indices). Now, if anyone nifswaps the Bloom-lights from another leader into a user-made leaderhead, the nodes underneath the bloom-lights get copied. In this case, the indices of the blooms children will differ from those of the skeleton. Not enough, not only are there plain nodes underneath the blooms, but also meshes (that would be copied as well in this case, without showing up in the 3d view). This technique will blow up the nifs size significantly, while I am not sure whether these lights then have any effect. When working on a leaderhead that I got from an experienced leaderhead modder recently, I noticed that there were also hidden meshs that blew up the nif. Back then, I had no idea where these meshes came from. I'm almost sure that I didn't cause that, not sure if this was an accident by the experienced modder or whether he just didn't know about this. Or whether I caused this long ago so that I don't remember (but the meshs I found let me think that I am not responsible). Anyways, when swapping in the fur part to Genghis, I recognized that the fur was not only added to the skeleton, but also to the blooms. So I thought that messed up blooms could be the cause of the problem. To exclude the blooms as an error source or to even solve the problem, I wapped all the meshes and all the lights, except of the blooms, back to saladin and then keyed in the blooms settings manually. Besides of that the file size dropped from 3225kB to 873kB, the fur issue persisted. This ways, the following things are not responsible for this problem:
- the lights (have been copied from / adjusted according to Genghis carefully)
- the mesh (works in Ghengis' nif)
- the texture (also works in Genghis nif)
Nevertheless, there seems to be some unknow environmental setting for Genghis and Shaka that have influence on the fur. This would explain why there is no problem with Koppány (based on shaka) and why my fur parts work with Genghis. Nitrams Ruga does not work properly, I think, although it is based on Ghengis. Maybe it works nevertheless and only the light setting is 'misleading'. In any case, in order to create a night scene with fire effect, nitram worked on the lights which put the whole nif in unorder. So even if the fur doesn't work, I think I could make it working here by nifswapping with Genghis, I'm just not sure whether I could recreate the light effect, so I didn't give it a shot yet.
Unfortunately, I didn't get any new ideas by my own yet. Hope you guys can think of something.
EDIT: There is something else I read about recetnly and accidently that is related to the TTorusFur shader. I'm just not sure how and if it fits to my problems. IgorS made a Casimir LH also using the fur part (nitram used that as base for Báthori, so Báthori is not a direct derivative of Stuyvesant) and in the filedbs entry for that LH, someone mentions that the fur is invisible for him. IgorS said that the shader causes that sort of trouble. Although I think that this issue has to do with the shader, I don't think it is a general problem as the user didn't mention trouble with Genghis or Shaka. I think there is something screwed up. I swapped that part with another one that I was sure about would work with Genghis. Maybe this issue is gone this ways. Also, I had similar effects when playing around with the blooms. If I corrected the indices of the fur there, the fur disappeared in sceneviewer, while it was there in nifskoe. Civ4 normally behaves like SceneViewer, so I think I wouldn't have seen it in the game either. Lastly, it can not be excluded that the user had an older machine not supporting shaders while IgorS didn't provide a noshader version of his LH. All in all, I couldn't build up a handy theory how this fits to my issue, just mention it to have it complete.