3ds Max & Alphas?

Post » Tue May 08, 2012 12:00 pm

hi!

can someone please tell me what i need to do to keep the alpha in a mesh made with 3ds Max 2009? I searched and tried everything i can think of, even found some tutorials wich where unfortunately offline - i guess i need help.

i know that NIFskope uses the alpha channel of the dds texture, unfortunately i dont know how to use the alpha-channel of my diffuse map within 3ds Max. Instead iam used to accomplish transparent textures via the "opacity" map slot in the 3ds material editor - with that iam able to use the alpha channel of the diffuse map and everything looks as intended in 3ds Max (early WIP):

http://img99.imageshack.us/img99/7533/3dsmaxn.jpg

but when i export the mesh as NIF and open it with NIFskope there is no more transparency.

it would be very nice if you can help me, as this is going to be my first quest mod!
User avatar
Natasha Biss
 
Posts: 3491
Joined: Mon Jul 10, 2006 8:47 am

Post » Tue May 08, 2012 10:54 am

Are you asking how to make sure a .nif has transparency with alphas? If thats the case, all you have to do is add an NiAlphaProperty in Nifskope to the part you want.
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm

Post » Tue May 08, 2012 7:16 am

sorry for my bad english but you guessed it right, NiAlphaProperty is what i was searching for!

for some reason the leaf texture is red and the transparency is not looking as good as in 3ds Max:
http://img94.imageshack.us/img94/2653/nifskope201202161412501.jpg
is it generaly not a good idea to have the planes crossing each other? because ingame some parts of the diffuse map get randomly transparent when one plane is in front of another one.

my texture format is dds, dxt3 with mip maps.

maybe one of you guys knows a good tutorial for 3ds Max/Nifskope/Alpha-Transparency wich i missed?
i realy want to have this model done because the rest of the mod is almost done.
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Tue May 08, 2012 12:27 pm

In Nifskope, when you add nialpha property, check its details and there are two entries that should be 4885 and 120 or 150 or similar. I recommend comparing it to some other mesh with transparency, like Vurt's tree or something.
I don't know about red colouring however.

That's a nice looking plant by the way! Nirnroot?

I use Blender, but I don't know how to display alpha transparency in it and I don't know if there's a way to make it 'stick' automatically when exporting into nif.
User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Tue May 08, 2012 3:04 pm

it is global nif problem, even in Skyrim
use 4845/4854
or make you're mesh two side poly, here is tutorial from Akavir about it:
http://akavir.ru/3ds-max-tutorial/overlapping_alphas.html
User avatar
Rodney C
 
Posts: 3520
Joined: Sat Aug 18, 2007 12:54 am

Post » Tue May 08, 2012 6:22 am

it is global nif problem, even in Skyrim
use 4845/4854
or make you're mesh two side poly, here is tutorial from Akavir about it:
http://akavir.ru/3ds-max-tutorial/overlapping_alphas.html
First, that link seems to be dead.

Second, if you are saying how to make an alpha mesh two sided, all you have to do is add a stencil property.
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Tue May 08, 2012 4:20 am

http://akavir.ru/3ds-max-tutorial/overlapping_alphas.html
Second, if you are saying how to make an alpha mesh two sided, all you have to do is add a stencil property.
No, i'm talking about two sided polygons, not two sided alpha.
User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm

Post » Tue May 08, 2012 5:33 am

sorry for being so incompetent, but where do i have to put the 4854 again?
when i click on "1 NiAlphaProperty" iam supposed to put it somewhere in the "blockdetails" window?

thanks for the help


@apel: unfortunately the tutorial is in russian, do you recommend 2 sided meshes (i guess a very flat box?) or is the way i do it ok (one sided plane with 2 sided texture)?
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Tue May 08, 2012 12:34 pm

Yes in NiAlphaProperty you can change the setting in front of Flags ;)
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Tue May 08, 2012 8:23 am

its working! thank all of you very much :banana:

now i need to find out why the stupid leaves are red and then i can refine the model and textures.
User avatar
Scott
 
Posts: 3385
Joined: Fri Nov 30, 2007 2:59 am

Post » Tue May 08, 2012 9:26 am

Check the NiMaterialPropertysettings or the shader thing.
User avatar
DeeD
 
Posts: 3439
Joined: Sat Jul 14, 2007 6:50 pm

Post » Tue May 08, 2012 2:41 am

If you want a texture to show up on both sides of a mesh(like a flat plane), without needing two meshes that are back to back, you simply add a stencil property; this is what I mentioned above.
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Tue May 08, 2012 6:31 am

Yes, like Tarius said, in Nifskope: right click on the NitriShape you want to have a texture show up from both side, then go to Node => Attach Property => NiStencilProperty
User avatar
JLG
 
Posts: 3364
Joined: Fri Oct 19, 2007 7:42 pm

Post » Tue May 08, 2012 12:12 am

If you want a texture to show up on both sides of a mesh(like a flat plane), without needing two meshes that are back to back, you simply add a stencil property; this is what I mentioned above.
I was talking about right alpha display, without threshold over 120, with flags 237, and without layers overlapping. Don't twist my words.

now i need to find out why the stupid leaves are red
To avoid this, your material in 3Dmax should look like this:
http://img440.imageshack.us/img440/4461/oneone.png
And your material in Nifskope should look like this:
http://img37.imageshack.us/img37/324/preform.png

Except you are not drawing those red collor by vertex paint modifier.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Tue May 08, 2012 1:35 pm

thank you guys so much!

http://img221.imageshack.us/img221/2041/mgescreenshot002.jpg

there are no clipping errors, the transparency is working perfect and is even visible through the water surface (i use DXT1 now, much better than DXT3). the black edges are caused by a badly made alpha channel of my texture right? i guess the black parts are where the alpha shape is larger than the texture? hopefully i manage to get rid of it.

i could have never get this done alone, thanks!
User avatar
Romy Welsch
 
Posts: 3329
Joined: Wed Apr 25, 2007 10:36 pm

Post » Tue May 08, 2012 10:20 am

If you set higher number at that other flag value for your alpha property, for example 120 or 150, you'll loose that black border around your leaves too.
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Tue May 08, 2012 5:19 am

while i have this thread up, can someone maybe even help me with my nirnroot script?

i want the script to:
- play a soundloop
- delete the container (the plant) on activation and add ingredient to inventory
- add the quest to the journal

this is what i have:
Spoiler
Begin plant_nirnroot

if ( CellChanged == 0 )
if ( GetSoundPlaying "NirnrootSound" == 0 )
PlayLoopSound3DVP "NirnrootSound", 1.0, 1.0
endif
endif

if ( menumode == 1 )
return
endif

if ( OnActivate == 1 )
PlaySound "Item Ingredient Up"
Disable
Player->additem "NR_item", 1
endif
endif

if ( getjournalindex NR_Quest > 5 )
return
endif

if ( OnActivate == 1 )
journal NR_Quest 5
addtopic "strange plant"
activate
endif

End

this is not working:
- the soundloop is not stopping (iam thinking of moving the container somewhere, rather than deaktivating it)
- the quest is not added (when i remove "if ( getjournalindex NR_Quest > 5 )" i get the quest entry every time)


everything else is working perfectly! if you guys can help me one more time it would be awesome :biggrin:
i dont know very much about scripting, i can understand what i read but i cant write something myself, so i stole the parts i needed from Syc_Herbalism and some MW scripts.
User avatar
Grace Francis
 
Posts: 3431
Joined: Wed Jul 19, 2006 2:51 pm

Post » Tue May 08, 2012 7:45 am

If you set higher number at that other flag value for your alpha property, for example 120 or 150, you'll loose that black border around your leaves too.
I was talking about it above, when you set flags till 120-150, mesh loses a part of edge texture, and it brings texture looking like amiss.

The only way to fix it - if you would make model polygons two sided(You can learn it from images in tutorial), your alpha will look alright, without any flags. Worst side of this, that you bring more polygons to model. But in your mesh case, it havent lot of polygons, so you shouldnt care about it.
User avatar
rheanna bruining
 
Posts: 3415
Joined: Fri Dec 22, 2006 11:00 am

Post » Tue May 08, 2012 12:00 pm

apel, i did make a two sided polygon test model based on bethesdas fern mesh, but still there are those ugly black edges ingame:
http://img252.imageshack.us/img252/5804/mgescreenshot003.jpg

everything is looking good in 3ds max:
http://img40.imageshack.us/img40/8828/3dmaxw.jpg

what am i doing wrong? do i have to test every single flag from 120-4854?

maybe i could send the model (the original one with planes) to one of you guys to check what the problem is?
this would be great! i cant release my mod with a model with black edges, i must fix this somehow.


EDIT: i also tried the StencilProperty (my mesh already has one for each transparent part when i export it from max) but they dont seem to do anything to improve transparemcy.



nevermind, i finaly found the flag setting that works perfectly for me: 4849 :bunny:

damned, i still have problems. alpha flag of 4849 is looking perfect but unfortunately it is not visible through the water surface ... what can i do about that?
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm

Post » Tue May 08, 2012 10:49 am

Maybe try to add a NizBufferProperty (and set its Flags setting to 1) on all the NiNode of the mesh?
User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Tue May 08, 2012 6:31 am

i finaly made it, thanks for your patience.

it was the 120 for the alpha threshold that washington suggested, thanks!
User avatar
Hilm Music
 
Posts: 3357
Joined: Wed Jun 06, 2007 9:36 pm


Return to III - Morrowind