Jump to content

Photo

BSLightingShaderProperty Basics


  • Please log in to reply
24 replies to this topic

#21
ImsumDave

ImsumDave

    Fan

  • Supporter
  • PipPipPip
  • 426 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



#22
GraysonTheWolf

GraysonTheWolf

    Enthusiast

  • Members
  • PipPip
  • 144 posts

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...



#23
ImsumDave

ImsumDave

    Fan

  • Supporter
  • PipPipPip
  • 426 posts

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 (I'll update the main post). 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 (hipster shades not included):

VBbYqsq.jpg

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



#24
GraysonTheWolf

GraysonTheWolf

    Enthusiast

  • Members
  • PipPip
  • 144 posts

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, 04 July 2014 - 05:01 AM.


#25
ImsumDave

ImsumDave

    Fan

  • Supporter
  • PipPipPip
  • 426 posts

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.






Page loaded in: 1.091 seconds