Aller au contenu

Photo

Tricks of the Trade


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
PDubulous

PDubulous
  • Members
  • 94 messages
I have spent the last few years messing around with NWN2 on and off.  After coming back to my Dragonlance Project recently, I had to relearn some things as far as materials and textures and how they are handled in NWN2.  Most of the basics are covered in numerous forum posts or tutorials or in docs for TAZPN's MDB imp/exp.  There are some things, mostly tips and techniques, which are not covered.  I'll post them here as I think of them.

http://dragonlanceni...2012/04/13/271/

1. Transparency and Translucency and when to use what.  The two terms are really interchangeable when it comes to NWN2 and there isn't much lying around on these topics, although I have a post on my blog about these (see link below).

http://dragonlanceni...d-translucency/

I have found the following:

a. Transparency - This is when a texture has parts of it completely invisible.  This is normally (in 3dsMax) accomplished through masking the texture with white (visible) and black (invisible) in the alpha channel of the Diffuse Texture and then exported as a 32bit .TGA or a DXT3 or DXT5 .DDS.  I cannot say for sure that there is a need for DXT5 Textures in the game at all.  The main difference being DXT3 is either white or black and DXT5 has various shades of grey in between.  When it comes to Transparency, NWN2 only supports all or nothing so why use the bigger texture for diffuse transparency?  Bottom line:  Use Diffuse Alpha Channel Transparency for things like leaves, particles, fringe, grass, etc, etc.

b. Semi-Transparency - This is when a texture has parts of it partially see though.  This is normally (in 3dsMax) accomplished through masking the texture with white (visible) and black (invisible) as well as various shades of grey to partially mask sections.  Again, in the alpha channel of the Diffuse Texture and then exported as a 32bit .TGA or a DXT3 or DXT5 .DDS. The final result would be things like glass, but with a variation of visibility across the same texture.  Again, NWN2 doesn't support the shades of grey from DXT5.  It will simply work like a DXT3 so why use the bigger texture?    

     If you need to have a Semi-Transparent model, there is only one way to do it, and that is through and SEF (Special Effect) in the NWN2 Toolset.  You cannot get various levels of transparency per se, but you can cheat and accomplish that through a trick.     To have a Semi-Transparent model, open the Visual Effects Editor in NWN2 and create a new SEF.  Go to "Add Event" and then select "Game Model Effect".  In the "effects" roolout, select the second line.  These will most likely be blank spaces unless you created a name.  No go down to properties and under "GameModelEffectType" select "Change Alpha" and then under "Alpha" choose a range in decimals between 0 (invisible) and 1 (opaque).  Hit the play button and the NPC should go Semi-Transparent.  Save the file and then apply it in the Toolset. THE EFFECT WILL NOT BE VISIBLE IN THE TOOLSET!


** One last note on Transparency: 

a. You cannot animate the alpha transparency.  I.E. You cannot get the transparency to scroll.  If you need this to happen, then you might want to look at an effect instead.  EDIT: Actually it will and it won't. You will get sort of a "double transparency". You will see you model with the outline of it as defined in your alpha channel of the diffuse. The visibility of this model will not animate. However, the texture will animate. So if you have a square plane with a circle alpha map and you set it to scroll, you will see a circle scrolling inside a circle. Its difficult to envision. I think there must be some way to make this useful but as far as I know, you can't get UV scrolling to work in a normal fashion. You can fake this, as I alluded to above, with variations in the diffuse texture and then applying a semi-transparency effect as described above.  For example, I made rain dripping down a window one time.  Slight variations in the rain texture were enough to make it seem like the texture had different levels of transparency.  I was also able to make that scroll. 

b. You can combine "Glow" and both types of transparency, however, semi-transparency (SEF) pretty much mutes the effect.  It makes it dark.

c. You cannot apply a transparency SEF to a Static Placeable.  It will not show up in game.

3. Shiny and Reflective Textures - NWN2 doesn't do environmental maps that I know of.  Placeables.2da has a column called "Reflection" but I have not been able to get it to work.  I have tried every combination of material settings and 2da settings I can think of.  If someone knows how to do it, please email me.  All is not lost though.  In 3ds Max, simply use the Specular Power and Glossiness in the Material Editor and then use a Specular Map in the Alpha Channel of the Normal Map.  I believe NWN2 recognizes the shades of grey here and so sometimes, I will use a DXT5 on the Normal Maps.  Not that often though.

 Shiny textures will scroll and can also be applied to transparency and semi-transparency.

Modifié par PDubulous, 18 avril 2012 - 10:14 .


#2
slowdive.fan

slowdive.fan
  • Members
  • 235 messages
Good stuff PDubulous and thanks for sharing. I made semi-transparent glass once for a metatile (no SEF need).
 dl.dropbox.com/u/8927275/NWN2_SS_022512_153825.jpg

I don't remember exactly how I did it, but fortunately I made notes to myself back then...here are my notes to myself...
Using GIMP:
To Make Glass:
-make diffuse texture pretty much alpha black
-make glow map the color and texture you want to show.
-select the R, G, and B channels for editing
-open the Hue-Saturation edit dialog box
-turn down the "Lightness" to about -80%

Also for adjusting the reflectiveness of an object you adjust the alpha map in the normal texture to levels of greyscale (black is matte and white is very shinny). So for the normal map you would want to save as a DXT5 to preserve the greyscale...here are my notes to myself when using GIMP:
Edit Alpha Maps (to adjust reflectiveness - alpha of normal map):
-first select just the alpha map in the channels dialog
-select Layers/mask/add layer mask
-pick one of the initialize states (white is good)
-select Colors/brightness-contrast/adjust the brightness
-may take a few interations to make black (matte, no light relection from object)
-select Layer/mask/apply layer mask
-save as a DXT5 with mipmaps 9

I may be completely wrong about this so let me know if I'm way off...It has been awhile since I have done this. It would be great to have all these texture settings in one place so I'll fix my post or delete it if others correct my information.

p.s. I have been following your recent work and the flowing water is awesome as well as your area design work...looking forward to more of your work.

Modifié par slowdive.fan, 13 avril 2012 - 09:50 .


#3
PDubulous

PDubulous
  • Members
  • 94 messages
I have seen some similar results in messing with my water systems so that makes sense. I just never thought of using the glow in that manner. I'll give it a go and post my results.

#4
PDubulous

PDubulous
  • Members
  • 94 messages
Oh I see now, you got a glow on a completely transparent texture. Thats a good trick.

#5
PDubulous

PDubulous
  • Members
  • 94 messages
Sorry folks, I didn't realize all the HTML was in there the first time around. Edit the post for that. I also added a note that you cannot add transparency to a static placeable apparently. I didn't know that but found out over the weekend.

#6
Dann-J

Dann-J
  • Members
  • 3 161 messages
The drowned dead model in the game uses the 'glow map / transparent diffuse' trick to make the lower legs appear translucent. I've used it myself to create a shadow dragon with translucent wings.

#7
PDubulous

PDubulous
  • Members
  • 94 messages
I havn't used that tactic very often because you are left with an additive glow. I am going to have to see what I can do with that. I updated the intial post with some info on UV scrolling.

#8
PDubulous

PDubulous
  • Members
  • 94 messages
http://dragonlanceni...ial/#comment-71

I added a custom sound effect tutorial on my blog. Let me know if you have any improvements to be added.

#9
PDubulous

PDubulous
  • Members
  • 94 messages
http://dragonlanceni...rials/walkmesh/

Made a quick post.

#10
PDubulous

PDubulous
  • Members
  • 94 messages
I updated to Sound Effect Tutorial with a note:

Positional Sounds can be heard in the toolset by making the "minimum distance" 1.