Please login or register.

Login with username, password and session length
 

News:

Happy 2021 !!!


Author Topic: Transparency question  (Read 559 times)

Offline Randomdays

  • Hero Member
  • Posts: 1305
Transparency question
« on: January 25, 2021, 10:29:21 AM »
I would like to make a mesh only semi transparent - ghost/ foggy compared to being totally invisible. It's been a long time and I've forgotten whatever I knew on that.

If its for the skin with alpha channel turned on, can this be done, or is it done more with the mesh material itself in Blender/ nifskope?

RD
« Last Edit: January 25, 2021, 11:03:58 AM by Randomdays »

Offline daglob

  • Shape-Shifting Silly-Putty Android
  • Hero Member
  • Posts: 9745
  • Da Glob
Re: Transparency question
« Reply #1 on: January 25, 2021, 11:08:51 PM »
You edit the alpha channel for the skin. At Alex's I believe there is an Invisible Man pack I did, that has a semi-transparent skin with Claude Raines' face. If not, let me know and I'll send it to you to look at.

Offline detourne_me

  • Hero Member
  • Posts: 6219
  • Manipulator of mental motion sickness
    • Force of Paradox!
Re: Transparency question
« Reply #2 on: January 25, 2021, 11:18:23 PM »
I think I've done transparencies with alpha levels on the skope itself with Nifskope. Might have to check my Slimer V2 or Mister Freeze mesh imports for that.

Offline Nyte Dragon

  • Superheroine
  • Moderators
  • Hero Member
  • Posts: 5093
  • Bidet!
Re: Transparency question
« Reply #3 on: January 26, 2021, 12:22:45 AM »
I seem to recall someone using the effects meshes (male_effect for example) and left the main skin blank and used the glow or reflc image for the actual skin. I think.... it's be along time and I haven't messed with any skinning in a LOOOOONNNGGG time.
Hate is always foolish and love is always wise.
 ⁓Doctor Who

Offline Randomdays

  • Hero Member
  • Posts: 1305
Re: Transparency question
« Reply #4 on: January 26, 2021, 08:11:43 AM »
Thanks guy. I'll tinker around with this as well. I know that I got rid of the selection ring back in the day for your character, and I think I just changed the transparency on it so it was invisible.

RD

Offline hoss20

  • Hero Member
  • Posts: 1464
  • A goal without a plan is just a dream.
    • Force of Paradox
Re: Transparency question
« Reply #5 on: January 28, 2021, 11:28:37 PM »
If things don't work after editing the Alpha Channel in your art file, you should check the mesh to ensure that it has an NiAlphaProperty attached. This is necessary to enable the alpha to work on the mesh. You may also need to check the NiMaterialProperty setting for the mesh. There are two components: Alpha and Glossiness. Alpha should be set at 1.000 and Glossiness (for the refl file) should be set to 10.000.

Online SickAlice

  • One-Eyed Willy
  • Hero Member
  • Posts: 2592
  • I'm of a mind to make some mookie.
    • The Litterbox aka MeanJellybean
Re: Transparency question
« Reply #6 on: January 31, 2021, 09:29:27 AM »
In the alpha channel where you would normally put block white which is color index #ffffff instead put color index #d7d7d7 for a transparent effect. If you want to get real heavy duty check out my Mutagen Man mesh. Note and I may have left this in the read me using the effect I did there limits the nif to a single alpha layer and no more. It is good for getting the real look and depth of something like glass though, also on effect on some other stuff like Vil and Wu's helmets from Future Foundation.

Offline Randomdays

  • Hero Member
  • Posts: 1305
Re: Transparency question
« Reply #7 on: March 09, 2021, 10:18:54 AM »
I was able to do things both ways with some experimentation and your help.

In the Batcopter I just posted, I was able to make the cockpit semi - transparent following Hoss's advice; Right clicking on the root of the mesh, or a piece of the mesh with multiple parts, brings up a menu in nifscope.

Select "node" at the bottom of the list, select "attach property" and then select "NiAlphaProperty" from the list.

You can now go to the material button for that mesh or piece, right click on the material, left click on "material" from the list, and that will bring up a slider bar on how much alpha/ transparency you want.


For the other part, for the batboat, batcopter and batmobile, I wanted a Robin next to Batman that could appear or disappear, depending on whether you wanted Batman to ride alone or not, without removing the robin mesh from the vehicle.

I couldn't find DG's Invisible Man, but there's a "beam_invisible01_01.tga" in the game assets. When I renamed this to "male basic" and "male_cape" for Robin, he vanished.

So now the cockpit works, and you can have Robin or not with you just by choosing an alternate skin in the game.

With all the different combinations of Batman and Robin skins out there, you'll have to set them up as you see fit.

Thanks for all your help

RD

Online SickAlice

  • One-Eyed Willy
  • Hero Member
  • Posts: 2592
  • I'm of a mind to make some mookie.
    • The Litterbox aka MeanJellybean
Re: Transparency question
« Reply #8 on: October 22, 2021, 06:57:10 AM »
Pretty much the same going with Spider-mobile. Different people riding about in it and of course is transparency, namely on the windshield. I'm using the #e0e0e0 index on the alpha channel for translucent with this one, the standard d7 wasn't cutting it. I had kept some of the original settings of that model but scrapped them and I'll tell you why then.

Doing what you're doing with the slider breaks the model. The game doesn't handle alpha channels that well. The first game doesn't handle them at all in game correctly. The second is fussy. Using the slider method looks nice but the issues this creates are 1.) if you are using alternate skins that call for that piece to be alpha'd out completely you can't do it anymore, it no longer uses the alpha channel on the texture 2.) you can longer use Stencils since they use the texture as well and those are essential functions of this game engine, for you they're going to save you the issue where if a model isn't textured to both sides it will simply vanish if looked at from the wrong angle and 3.) in game break various texture properties, usually this is centered around the shading and reflective properties as the game engine utilizes the alpha channel on the texture for those.

If you look at any of the nifs that come with them with this game none of them use that slider property. Any use the texture property instead (Eye Of The Reich's glass dome is a standard example) coupled with a Stencil.

The standard is as follows, this is what I ended up scrapping all parts of Spider-mobile and reverting to after having tried a few things:

On NiMaterialProperty Alpha is 1.0000 and Glossiness 10.0000.
This is important because of the stuff I mentioned and conforming this to the how the game renders the other characters, stage elements, FX and otherwise your's will interact with. You "can" use the slider thing but I don't suggest it if going the alternate texture route, only if the nif is staying as is though the stanard 1.0000 method works just as well so there's no need for it.

So with those settings color indexes for Third Reich are:
Ambient: #ffffff (1.000)
Diffuse: #ffffff (1.000)
Specular: #e5e5e5 (0.900)
Emissive: #3b3b3b (0.235)
These are what the rest of the game uses. The various tools that convert nifs and keyframes from the first game to the second have a checkbox to lighten the values and what that does is set those settings to those values.

To NiAlphaProperty:
There's a few things that can be done with this but game standard is as follows which again causes the engine to rely on what is on the alpha channel of the texture itself, that being the differance there between black (#000000) as not visible at all to white (#ffffff) as fully visible and the range between deciding level of transparency. That one's a small margin but I gave you the two index range used here already, so what you would enter into the palette of a paint program before filling in other words.

Enable Blending: Y
Source Blend Mode: Src Alpha
Destination Blend Mode: Inv Src Alpha
Enable Testing: Y
Alpha Test Function: Greater (than >)
Alpha Test Threshold: 200
Sort Triangles: No

There's a technical run down if you're interested but these are just the standard settings this game works with. And again for the reason of modding options noting the function you want to achieve can be broken by not doing it this exact way, and trust me I played with this one too many times. You'll otherwise see when I release Spider-mobile and can look at the Nif. I had a slider determined windshield and it seemed fine and same thing you're doing, different riders, passengers as well parts of the vehicle could be stripped out by skinners were my objective ended up wrecked in the game itself. My drivers would show up as ghosts at time, the window could not vanish if I wanted it too, the reflections were broken in various areas depending on how in game light hit them usually resulting in them turning into white blobs, so on. Because the game uses the above indexes so when it read the unusual values I had entered in it didn't know how to have elements react with one another when one runs against the grain so to speak.

Anyways hope all that is of use, I have a lot of experience with that transparency as I said since I do multi-texture nifs constantly. One other thing, Blender puts these in there and I see them in the examples you have me look at, if there is a NiSpecularProperty in a piece get rid of it. This game engine doesn't deal with that function, relies on texture as well and it will break you're alpha and leave you searching for what happened. Stencil will either fix or break depending on the 3d model itself. I know how to set those up in the 3d modelling and texture assignment process outside the game and Nifskope but if you're importing this is something you'll have to just test and see what works. The short version of it is this is dependent on whether the 3d model had one or two sided texturing baked in to begin with. When importing works from around the web mind those baked into model settings, much of them get imported with the model and can end up being the mysterious cause of your woes.

Offline Randomdays

  • Hero Member
  • Posts: 1305
Re: Transparency question
« Reply #9 on: October 22, 2021, 10:14:46 AM »
More good info SA

Thanks.

Online SickAlice

  • One-Eyed Willy
  • Hero Member
  • Posts: 2592
  • I'm of a mind to make some mookie.
    • The Litterbox aka MeanJellybean
Re: Transparency question
« Reply #10 on: October 22, 2021, 09:12:27 PM »
The Specular one was new to me as of Spider-Mobile. I was just playing with the setting since I hadn't explored it before and this thing having a lot of smooth metals and all of course. But heck no, that went real bad fast. And of course you know I panicked and was looking at every other thing before considering that factor. But sure is the sun comes out it was that setting just being there. Suddenly all my Windows and alpha parts just turned into a white glare. Likewise as said my alpha out trick, same one you're talking about here with Robins failed. It works fine until your deep in game and there's an interaction with a certain thing, lighting change I think is what was happening and just out the blue the ghost of that appears. Sometimes I forget despite stating it so much myself exactly how fussy these engines are.

Big reason why I poke at updating the nif engine for this game so often, I was reading about how to do it actually yesterday but I think it's beyond my programmer skill level. In the first game leaving out so many features was understandable (except alpha channels since they at the same time promoted using them?) but with the second I dunno, there was more options available to them then that they just seemed to decide not to include for one reason or another and ones that would have modding easier for all of us.

Anywho, soon on SpMb and please give it a thorough look when I release it. It is for you of course and I like to put detail into my work, in this case I intentionally worked on putting various settings and tricks into that nif and kf at the same time as having chats with you here so you can just go right into it with Skope and see and or copy over exactly what you need for whatever purpose. I think your going to get a lot of use from it as a template, I only wish I could have gotten it out sooner.

Offline Randomdays

  • Hero Member
  • Posts: 1305
Re: Transparency question
« Reply #11 on: October 22, 2021, 09:54:04 PM »
No problem SA... good things are worth the wait. I'll definitely being checking things over. Not too much vehicle work in the future that I can think of... I was thinking of maybe a jeep with a couple of pith helmet wearing explorers for the Hidalgo thread, and I'm finishing up some basic work on an autogyro with Gryphon's Doc Savage at the controls.

Online SickAlice

  • One-Eyed Willy
  • Hero Member
  • Posts: 2592
  • I'm of a mind to make some mookie.
    • The Litterbox aka MeanJellybean
Re: Transparency question
« Reply #12 on: October 23, 2021, 01:14:47 AM »
So much irony, I'm also working on helmets for SpMb with transparency. Well they show up in a comic, Spidey Super Stories (I'm so glad I got to read some of that weird stuff for this project, right up my alley as an old bad pun filled Star Comics fan lol) as does a pair of standard glasses (worn by the Tinkerer). Else I think I'm comfortable saying I understand alpha channels like the back of my hand, I worked with them longer than all else here. That Lady Death that I showed a preview of? Almost all of what's going on in those skins is done exclusively with the alpha channels as stencils. Most of those costume bits, hair and so on don't exist or have a sculpted 3d model. That's all done with a variation of the white, black and grey alpha channel image. I hope and with that release especially to teach the method on this site. You can get endless miles out of it and as a bonus save a ton of memory space.