Jump to content

Alpha property on armor raises a shadow issue


dikr

Recommended Posts

Hey guys, I'm having kind of an issue with my custom armors/clothes. They are chain mail and are semi transparent.

 

If I add the Assume Shadowmask flag to the nr. 2 property list of my lighting shader properties it projects the shadows of the actual body parts on top of the armor mesh in game; they somehow don't get masked out by the alpha layer of the textures. (I do have an alpha property added correctly). This means that the shadows are really dominant and awkward looking since they blot out parts of the textures that are non transparent too.

 

The alternative, not using the Assume Shadowmask flag, makes that the textures receive bright lighting when in dark areas and makes it stand out a lot which isn't looking good either except when out in the sun when it looks natural.

 

Kind of a dilemma here. Can anyone give me a tip on the best way to deal with this?

 

Somehow I have a hunch it has to do with the linked body parts.

Link to comment
Share on other sites

Right click on the NiTriShape -> Node -> Attach Property -> NiAlphaProperty ...

 

Right click on NiAlphaProperty -> Flags ...

If you want completely transparent un-tick Blending ... If you want it translucent/partially see through make sure Blending is ticked

 

Tick "Enable Testing" ...Leave both "SRC" options alone and select either "Greater" or "Greater than or Equal to" -> Set threshold # at 127 or 128 -> accept

 

Left click again on your NiTriShape and in the Bottom Window of Nifskope, scroll all the way down until you see "Properties"

Left click the arrow beside Properties and Double click on the blank bottom line in the "Value" column to allow text to be entered

Enter the node number corresponding to the NiAlphaPropery you just created and press Enter ... This will make it a "child" of the NiTriShape and you should now have transparent/translucent armor

Link to comment
Share on other sites

Thanks so much for getting me on the right track Perraine.

 

My woes aren't over though. I actually already had my Alpha Property added and it was working nicely, it was just the problem with how the underlying shadows were not masked by the alpha channel which was bugging me. You got me on the right track by pointing me to the Alpha Property flags; It turns out that ticking off the "blending" option made the underlying shadows behave properly and "respect" the non transparent parts of my alpha channel.

 

The resulting new problem, however, is that suddenly the texture seems to be flickering a lot (probably due to the hard "edge" between alpha and non alpha bits). Ideally I want to be able to mask out the annoying overlying shadows but without the flickering textures or the brightness in shady areas that comes with the alternative: simply disabling the Assume Shadowmask flag in the Shader Flags 2. I've added some pic to illustrate the problem, maybe it makes things more clear.

 

To me the conclusion seems to be the following: getting rid of the rogue shadows comes at the cost of either very bright textures in shady areas due to disabling the Assume Shadowmask flag or flickering textures due to having no blending in the alpha flags. If you or anyone else can help me resolve either one of those negative consequences I'd be eternally grateful :))

 

Thanks so far for your help!

 

http://i68.photobucket.com/albums/i4/Yngling/alpha_shadow_woes.jpg

Edited by dikr
Link to comment
Share on other sites

Yeah ... Thank Bugthesda for their Amazing New Game Engine <end sarcasm> ... Unfortunately, the way Skyrim handles Alpha channels and Transparency is, quite frankly ... woeful! ... (Ever wonder why there are no windows in Skyrim?) If you enable blending, you'll have the nice soft edges, with various levels of transparency (looks great for things like lace) but as you noted, it comes at the expense of weirder than normal shadow behavior (another area that Bugthesda really blew it) ...

 

The only way I've been able to get a reasonably smooth edges and not have the lighting and shadow issues is to use a very mild Gaussian Blur type effect on the outside 1 o 3 pixels on the edges/seams of my textures and disable Blending. This gets rid of the sharp pixelation and "glowing edges" issues but unfortunately at the expense of really fine detail on those edges/seams and of course not quite correct lighting behavior ...

Link to comment
Share on other sites

Hehe, you are so right. Talking about trade-offs; god knows how long I've been tweaking the .inis to get reasonably non-blocky, non-flickering shadows on characters ... and if you want them really clean you need to decrease the game's overall shadow distance to just a few meters. V_V

 

Anyway, thanks for the Gaussian Blur tip. Ima gonna try that at different thresholds and see if it resolves the flickering somewhat.

 

Your replies have been very helpful.

 

<3

Edited by dikr
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...