Jump to content

BSLightingShaderProperty Basics


ImsumDave

Recommended Posts

Update bump:


- slight changes to formatting


- added information on refraction


- added information on color blending and alpha testing (threshold) (sub-section 4.1)


- added "Notes and Miscellaneous Information" section


- Normal map not working?


- DDS image format as it pertains to Skyrim


- Layering


Link to comment
Share on other sites

How would I make lets say... a "FlamesMesh:0" node (typical in bound weapons) to be transparent in the WHITE regions and keep the black? I have an edited dds file with black flames, and I've gone through your alpha-flags section and still, everything I've tried doesn't work, all I see is my custom shaped "refraction" mesh on my weapon in game.

 

I've tried:

(Always kepts enable blending ticked, the one time I didn't, it turned the whole flamesmesh:0 black so you can see the ugly vertices-points and stuff)

 

Source Blend Mode: Src Alpha

Destin. Blend Mode: One

Enable Testing? Yes

Alpha Test Function: Less or Equal

Alpha Test Threshold: 128

 

Source Blend Mode: Src Alpha

Destin. Blend Mode: Zero

Enable Testing? No

Alpha Test Function: Greater

Alpha Test Threshold: 128

 

and like 30 other combinations I can't remember or didn't write down. I could be sitting here forever trying to reverse engineer this, or I thought I'd ask you to see if it is even possible or if the system will always use Black for transparencies and white for white, and greys for color shaders from the effects file path...

Link to comment
Share on other sites

I looked at the Flamemesh of one of the bound weapons. As is, the NiAlphaProperty is setup for additive color blending while using the alpha channel as a mask for the flamemesh. If I understand correctly, you want black flames? With additive settings black will not show in-game.

 

Now comes the more complicated part. The blending uses the alpha channel of the models vertex colors to fade the ethereal flames along the outside edges of the model. I had not considered vertex colors when thinking about transparency before. Vertex colors are tedious to edit in nifskope and require 3d modeling software to edit effectively.

 

Lucky for you, you don't need to edit the vertex colors, in this case. All you need to do is setup the NiAlphaProperty flags as follows.

 

Source Blend Mode: Zero

Destination Blend Mode: Inv Src Alpha

Enable blending: checked

 

This will give a result like so:

http://i.imgur.com/VBbYqsq.jpg

(bow refraction mesh is hidden and there is a zbuffer issue with the flame mesh)

Edited by ImsumDave
Link to comment
Share on other sites

I LOVE YOU, BEAR MY CHILDREN AND MY CHILDREN'S CHILDREN! ._.

 

I can't believe it was that simple lol

You've really helped me with my new bound FX.

You're going in my credits now :D

I'll post an edit later with my results haha :0

 

EDIT: I will post tomorrow, too late for me now. I'm sleepy. But the bow mesh and weapon meshes I'm using are gonna be almost pitch black, a few light textures for details and depth, but this way it looks like pure darkness for my bound "abysmal" weapons >:U

 

Anyway, pics tomorrow, and I'm updating my mod finally to the fullest extent visually now because of your help here. I can't thank you enough, I used this tutorial for testing my meshes before to see the combinations of results I'd get. It's really interesting stuff :>

Edited by GraysonTheWolf
Link to comment
Share on other sites

No problem. It's why I made the thread. If you have anymore questions/issues, just ask and I'll answer if I can.

 

I agree, the effect is visually interesting. I think a similar effect is used for the ebony mail armor, as well. I might use the effect, or something similar, for a future mod.

Link to comment
Share on other sites

  • 7 months later...
I know its been a few years since you typed all this up, but I still wanted to drop a huge THANK YOU!!! This is the most in depth information I've found yet. Most people who understand how to do these things, are not able to explain it with such great detail. Just having the definitions for the property functions has saved me months of tedious research. Awesome job!
Link to comment
Share on other sites

  • 7 months later...

I'm new to trying to mod, and I thought I'd try a simple one to start. Just editing a texture. I saw the "Skyrealism-Shiny" mod by MTichenor and thought I'd try adding a shiny environment map to something that I thought needed it - the gold dibella statue. I've followed the info on the wiki, read through this page, believe I understand everything but I was surprised that when I went to edit a nif that I thought for sure was missing an environment map, I saw that it already seemed to be setup properly. I tried editing the "scale" settings, and other things, I tried copying cubemaps to other slots, tried adding alpha masks and saving new dds files with the alpha options checked, and nothing seems to show any effect in nifskope. Am I doing something wrong or is there something wrong with the nif files settings? If someone can look into this and see if they can successfully make the gold dibella statue look shiny, please share what you did, because I can't figure it out.

 

EDIT-okay, I think I was being mislead in that I thought that you'd see the changes in nifskope. I checked on the option to render "shaders" but it appears that things like the env map and glossiness and such does NOT show there. After a bit of difficulty in the creation kit, I was able to bring my nif into there and view it with it's changes in the render window.

Edited by pksky
Link to comment
Share on other sites

  • 3 weeks later...

You should check out Nifskope 2.0. It's still in development, but it hasn't given me any problems in it's current, pre-release state. Among other things, it has upgraded viewport shaders that give a good representation of what you will see in-game, within Nifskope. Seeing as the main headache for me when making something for Skyrim was checking changes in-game (restarting Skyrim to check changes after every change), that is significant. A user named jonwd7 is doing a large amount on it and deseres to be showered with praise, along with anyone else who is contributing.

 

Download NifSkope 2.0 Pre-Alpha 2 HERE

Edited by ImsumDave
Link to comment
Share on other sites

  • 4 months later...

Thx for this amazing modder resource.

 

I don't really understand why we need to get the map in the correct slot if we need to name them with a _[Letter] like _n for normal map or the nomenclature used by everyone is just for easy understanding on what map does what and don't really matter in the code?

 

Any clue what slot you need to use for rgb specular map? (_s)

Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

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