BrettM Posted November 13, 2013 Share Posted November 13, 2013 Oh, excellent! Thank you for that link. I had ferreted out some of those numbers from examining Bethesda nifs for my tutorials on texture animation using NifSkope, but I knew I was missing a lot. So far I have fairly well mastered the controllers for BSLightingShaderProperty and the one for NiAlphaProperty, but I can do more knowing the numbers for all of the variables, and the information will help me to get some of the other controllers figured out. I had a pretty good handle on most of BSLightingShaderProperty values, but you certainly gave me some useful revelations here. For one thing, it seems my problems with controlling glossiness were due to believing that LOWER values were less glossy. Oops. :) If I can get the same handle on BSEffectShaderProperty, I'll be sitting pretty. Link to comment Share on other sites More sharing options...
ImsumDave Posted November 14, 2013 Author Share Posted November 14, 2013 There is a bit of information on BSEffectShaderProperty in the nifskope interactive help. Check it in the help drop down in Nifskope. I'm not sure how accurate all the info is, but at least it's something. The interactive help can be accessed in a browser, here. Link to comment Share on other sites More sharing options...
ImsumDave Posted December 31, 2013 Author Share Posted December 31, 2013 Update bump:- added info on parallax and multi-layer parallax- slight changes to formatting Link to comment Share on other sites More sharing options...
Anton0028 Posted January 19, 2014 Share Posted January 19, 2014 Thank you a lot for this great explanation! (and for the link to the NifSkope topic about BSLightingShaderProperty) I would like to ask you one thing: may you add to your topic examples in pictures of Alpha flags usage ? (Alpha Src, Alpha Dst ...) and how they influences a texture in game ? Link to comment Share on other sites More sharing options...
Saerileth Posted March 9, 2014 Share Posted March 9, 2014 (edited) I second that, the NiAlpha flags are quite confusing. I've tried different configurations, but I can't quite figure out exactly what they do, and most of them result in strange artifacts. Sticking with the defaults for now. You also mentioned refractions, I'd very much appreciate a guide on that. Without refraction most transparent objects with any kind of depth look flat and unrealistic. Fantastic work by the way, this information is hard to find but oh so essential. Thanks! Edited March 9, 2014 by Saerileth Link to comment Share on other sites More sharing options...
ImsumDave Posted June 21, 2014 Author Share Posted June 21, 2014 I'm a bit late here, but I plan to add information on alpha settings and dds texture formats soon. I'm not sure about refraction. If my memory is correct, I tested it a bit with little success. It might be shader specific. I'll look into that as I add more to the page. I think refraction is used for fire heat distortion effects, which would be a good place to start. I can give a quick tip about alpha transparency. Alpha testing is on or off (fully opaque or fully transparent), while alpha blending blends based on source and destination blend mode settings. Link to comment Share on other sites More sharing options...
Saerileth Posted June 21, 2014 Share Posted June 21, 2014 (edited) Hey, welcome back! About the refractions, I've been in contact with skysan, the author of Transparent and Refracting Icicle and Frost Atronach, among other similar mods. He's been able to make the effect work and showed me how, under the condition that I don't share the information. But it can be reverse-engineered easily from his meshes. It's a fickle thing though, I've used it to great effect with my Dragon Claw replacer but I prefer regular transparency on my gem replacers because refraction causes some really strange artifacts with them. It really depends on the mesh, on anything with sharp edges it tends to look weird, and it's pretty mich in-your-face all the time, it can't be toned down to anything subtle. About the Alpha blending, what I'd really like to know is how it actually works and what each setting does, if that's possible. For example, what does "Src Color" mean? What's the difference between Src and Dst? Until now I just tested each combination and noted down a few favourites that I use depending on what effect I want to achieve, but mostly I'm working in the dark because I don't really know what I'm doing. Edited June 21, 2014 by Saerileth Link to comment Share on other sites More sharing options...
ImsumDave Posted June 22, 2014 Author Share Posted June 22, 2014 I updated section 4 with a NiAlphaProperty settings subsection. I focused mainly on simple illustrations of what settings do instead of defining what the settings mean. I also added a link to a msdn page about color blending. Alpha blending is a form of color blending using an images alpha channel. Here is the link if you'd like to learn more about how color blending works. Basically, the blending works as follows. (Source * SourceBlendFactor) + (Destination * DestinationBlendFactor) "Source" is the color of the model materials in that pixel before blending "Destination" is the color of what is behind the model in that same pixel before blending The two values are modified by the value of the blend factor in that same pixel, then they are added together. Blend Factors/Modes One - multiply by one (no modification)Zero - multiply by zeroSrc Color - multiply by "Source"Inv Src Color - multiply by inverse "Source"Dst Color - multiply by "Destination"Inv Dst Color - multiply by inverse "Destination"Src Alpha - multiply by value of the model's alpha channel (diffuse and vertex colors) present at that pixelInv Src Alpha - multiply by inverse value of the model's alpha channel (diffuse and vertex colors) present at that pixelDst Alpha - multiply by value of the background model's alpha channel (diffuse and vertex colors) present at that pixelInv Dst Alpha - multiply by inverse value of the background model's alpha channel (diffuse and vertex colors) present at that pixel Ok, maybe not so basic. I'll add that to the OP, too. Now to tackle refraction. I'll take a look at both skysan's and your mod assets and see what I can figure out. From what I know, I can tell you that the refraction works based on surface normals. In the case of a sharp, faceted edge, there is a very immediate hard change in surface normals. I'd guess that the refraction shader wasn't made to handle that situation. This seems more likely given that faceted edges are usually a no-no in games: they cause obvious ugly aliasing effects. Link to comment Share on other sites More sharing options...
Saerileth Posted June 22, 2014 Share Posted June 22, 2014 Thanks a lot, that information is really helpful :) Yeah, it seems refraction doesn't handle sharp edges well at all. Unfortunately it's quite impossible to make realistically cut, sparkling gemstones without them, they need hard edges by definition or else the facets start blending into each other. Link to comment Share on other sites More sharing options...
ImsumDave Posted June 29, 2014 Author Share Posted June 29, 2014 I think I've found skysan's secret: unknown float 2. Link to comment Share on other sites More sharing options...
Recommended Posts