Opacity - Help?

Post » Sat Nov 27, 2010 11:44 am

Howdy!

Well, I've been testing a lot lately, mainly opacity. But for some reason things goes wrong, wrong and more wrong! Let me walk you through it:

I made 4 textures.

1) All black alpha channel
2) All white Alpha Channel
3) 50% Grey Alpha Channel
4) Squared the alpha into 4 and added 2 different greys, white and black to it.

Allgood and dandy. Made a little box and added the texture, which was exported as a DDS with DX5. Looks decent in max. I exported the same box 4 times with the different textures. They where imported as .NIF w/o Animation. I added a Alpha property and gave it the value of 4109.

Great, I put them into the game and check it out. What do I notice? Well, the all black one is gone - which is good. The 3 other are half-invisible with a pink texture? My texture was blue, for the record.

So basically the mixed, the All white and the 50% grey turned out to become a glassy-pink thing. Great, I wanted my 50% grey to become that ... but a white alpha means it shouldn't become any invisible, now shouldn't it? and the mixed one should have.. mixed.... ugh.


I could take pictures of it and show it here, later ^^.


Does the Game Engine handle Opacity in a very simple manner? Like a black alpha means invisible and anything else turns to 50%?


Cheers, Matth
User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Sat Nov 27, 2010 8:29 pm

Two things to narrow down the problem:
1) What are the exact names of your textures? And where are they stored?
2) Are your textures have normal maps? As these are required for most of textures in game to allow them properly reflect the lights.
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Sun Nov 28, 2010 1:10 am

Pink textures get substituted as defaults for many errors, so you're seeing the object with a texture other than yours. The black alpha (full transparent) means that a normal map is not needed - nothing to show - so having it missing is not considered an error. As soon as there's something to show, the lack of normal map is going to confuse everything.
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Sat Nov 27, 2010 7:00 pm

Two things to narrow down the problem:
1) What are the exact names of your textures? And where are they stored?
2) Are your textures have normal maps? As these are required for most of textures in game to allow them properly reflect the lights.

1) OpacityTestAllWhite.DDS, OpacityTestAllBlack.DDS, OpacityTestMixed.DDS, OpacityTestGrey.dds

2) Nope, no normal map.
User avatar
Donatus Uwasomba
 
Posts: 3361
Joined: Sun May 27, 2007 7:22 pm

Post » Sat Nov 27, 2010 8:14 pm

2) Nope, no normal map.

Then create normal map for each texture and compare the results.
You may also check the path of each texture in Nifskope, it should start with "textures\"
User avatar
Darlene DIllow
 
Posts: 3403
Joined: Fri Oct 26, 2007 5:34 am

Post » Sat Nov 27, 2010 10:05 pm

I'm actually not sure if the game supports partial opacity, so that may be the cause. Don't quote me on that though, heh.

You can also try changing the flag number of your alpha property based on a bethesda mesh that works in a similar manner.

[edit]was wrong, told you not to quote me :P
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Sun Nov 28, 2010 2:06 am

Okay, I cleaned up my texture and took a look at everything again, AKA I redid it. This time I added a normal map - OpacityTestALlWhite-n, for instance.
But ..... well, I believe Lady was right! The texture, the .NIF are all the same .. but only 2 of the models are working.

The All black one dissapears, which is awesome.
The All white one becomes transparant with my texture.
The Grey one turns purple and got the same opacity as the white one
The Mixed one equals the grey one.


AKA only pure black ( all gone) and pure white ( Glass looking) seem to work ...

So, either the Game Engine is simplified like that, or I need some other alpha settings?


Can anyone clarify this? ^^ I guess I could go and test using the setting of 4333 and some other stuff.

Cheers,

Matth
User avatar
louise fortin
 
Posts: 3327
Joined: Wed Apr 04, 2007 4:51 am

Post » Sun Nov 28, 2010 1:32 am

err, but the game's engine handles various levels of transparency on the single texture... here's the http://img155.imageshack.us/img155/8012/screenshot1o.jpg I did couple of minutes ago. The alpha channel of color map has various levels of gray (white, black, two different shades of gray, and even a gradient from white to black).


>> This time I added a normal map - OpacityTestALlWhite-n, for instance.
I suppose that was a typo, because names of normal maps should have suffixes with underscores ( _n ), but it's better to be sure.


>> The All white one becomes transparant with my texture.
All white should be completely opaque, no any transparency at all should be visible on texture.


Anyway, we could discuss this much longer without seeing what you're actually doing there ;] so the best option for you (the quickest I think) is to upload your test files somewhere and post a link here for someone to have a look and check your meshes and textures.
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Sat Nov 27, 2010 9:57 pm

Right, When I am back home I'll upload it.
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm

Post » Sun Nov 28, 2010 1:15 am

or I need some other alpha settings?


Can anyone clarify this? ^^ I guess I could go and test using the setting of 4333 and some other stuff.

you can try that.

I don't know much about alpha. but here are some observations. (mixed in with F3 modding- alpha hasn't changed though)

4109- often used with particles. F3- I see it on objects that have the no lighting shader node- in combination with shader flag parallax_occlusion, which has nothing to do with parallax, its likely tied in with getting decent alpha drawing on several overlaying alpha objects or something to do with lighting. i dunno why it wouldn't be useful for your simple test. guess that is what testing is for :D

4845, multi-layer transparency with blending- useful alpha setting when requiring blending. probably the most general default setting.

4844, multi-layer transparency without blending - use this for anything that is like boolean alpha, either on or off. practically you probably won't use other flags if a blended gradient alpha is not required. use threshold to cut back the edge blending. can be used with with DXT1 1 bit alpha, for like alpha-ing out holes in a piece of parchment or for leaves on a plant.

4333- another regular use flag. similar use to 4845.

4097- similar to 4109 just a different blend mode. seen used as a window pane over another transparent object.

4621- similar to 4109. testing enabled. This is used on fairly normal meshes that have a more regular shader set up.
User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm

Post » Sat Nov 27, 2010 8:17 pm

Awesome! Guess I'll be testing all thoose value over the weekend. Yay, testing.... ^^

Cheers,

Matth80
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am


Return to IV - Oblivion