How to create and use Self-Illumination Maps for NWN:EE?

Just trying to get more info on how to use Self-Illumination maps in NWN:EE, how best to create them, and can they be made for placebles?

I also heard of a thing called Glow Maps but wonder if they are simply a result of lights or Illumination Map Textures bouncing off the world and items and textures within it?

I think they can be animated too, like for windows with light when it becomes night time and how the light bounces on the areas around it but I could be wrong. Though that is something I’d also like to learn to do anyways.

I can bake diffuse, ambient occlusion, normal, and height maps pretty well in 3DS Max, but specular I tend to have to use programs like ShaderMap or CrazyBump to create them. Illumination or Self-Ilumination Maps however I’m not so sure as the new shader system for NWN:EE is new to me and never heard of Self-Illumination maps before.

Any help on the subject would be appreciated. :slight_smile:

Glow maps are deceptively simple yet can be darned fiddly to produce. They are normally used with some or all of the PBR maps that NwN EE supports - Diffuse, Height, Normal, Roughness, Specular and Illumination/Glow. Obviously you need a diffuse map (without these other maps a diffuse map would be called the texture) otherwise you have nothing to display as the rest of the maps are based on it and are used to influence how the diffuse map is displayed. Also all the maps need to be exactly the same size (e.g. 512 x 512) as the diffuse.

For a glow map the parts that you don’t want to glow, you colour black. Those parts that you want to glow in the dark have the same colour as the glow you want to be displayed. This means that, unlike some of the other maps, they need to be full 8-bit RGB (i.e. 24 bit images).

For an example of glow maps in operation see this -

Experiment to Add Fancy Maps (PBR) to an Existing Tileset (EE Only) 2 (SciFi Base Interior)

Note that you will need @Ancarion’s SciFi Base Interior tileset in order to use my PBR maps.

One final thing. I wouldn’t use the selfillumcolor setting inside models as EE changed the way they work and the glow maps are better anyway allowing as many colours of glow as you’ll need.

Hope that’s useful.

TR

1 Like

Thank you for the info. I will take a look. I’m not sure how to go about creating them or animating them fully but I’ll see what the hak pak contains and try some reverse engineering. Did you happen to find a tutorial on how to do so or how they affect or are effected by the other map types?

Also, have a sort of off topic question, do you know anything about using parameters with MTR files? Saw on the wiki something about them to help with say, specular maps and controlling how they render with the shader but it didn’t seem to explain how or were to use or edit them, just it had to do with the MTR.

Thanks again. :slight_smile:

UPDATE: So I was able to take a look at some of your MTR files and TGAs within your EE Hak Pak for the Sci Fi Tileset. Only issue is since I’m trying to pull this off on a placeable, and your example is a tileset, it may be why I am still having an issue getting my Illumination maps to work. I setup my MTR properly. I setup my TGAs properly, non-compressed, 24 bit. The diffuse matches the Illumination were I want the glow to come from, everything else in the Illumination is black.

But It still will not glow in game or in the toolset? Am I missing something?

I also wanted to take a gander at your different map types, Diffuse, Normals, Height, Speculars, etc. But in Photoshop, It won’t allow me to open your specular maps. Has an error that reads:

“Could not open “your file’s specular TGA” because of a problem with the file-format module interface”

Wanted to check it out to see what it looked like out of curiosity. :stuck_out_tongue:

But anyways, I’m stumped at this point. I also noticed under my models properties in the toolset (Just made a simple box with all sides indented and the polygon faces the color/texture of the diffuse map for the light to be emitted), that the option to “Activate” the item;s intial state is completely greyed out. Maybe this has something to do with why it will not glow in game as well?

Here are my two TGA UV Map files so you can take a look. Very simple stuff. Had to change the file format here for the sake of being able to upload but they are both TGA files in the Hak Pak and on the model within 3DS Max:

The Diffuse (plc_box_d)

The Illumination (plc_box_i)

Would love to know how to fix whatever issue I’m having or the step I missed and make these work. If this does not work on a placeable, how would I go about making it work? Thanks in advance and sorry if I am not explaining my issue properly. New to this Custom NWN stuff.

They definitely work with placeables. Have a look at the bombs that are part of -

Large Public Domain Library of Placeables

Or the simple placeables (EE version) in - TR’s Glows

Question - What is the name of your mtr file? What is the name used in the BITMAP field of your placeable? They have to match excluding the .mtr part.

TR

1 Like

Try opening the spec maps you have a problem with in the Gimp as that is what they were edited in. If you can, Go to Layers/Transparency and, if it is not greyed out, select Remove Alpha Channel. Then file/overwrite (whatever the filename is). The problem arises because of what I consider a bug in the gimp. If you change the mode of an image from rgb to greyscale and the image was in fact rgba (i.e. it has an alpha channel) it reports that you have a greyscale image but leaves (at least some part of) the alpha channel untouched.

TR

1 Like

Thanks for the links and reply. The name of the placeable is “plc_box” and the MTR is named the same. As for BITMAP field, what do you mean? the diffuse part of the MTR? if so, its “plc_box_d”. If not, do you mean the diffuse of the material slot in 3DS Max? the diffuse UV used and baked out is called “plc_box_d”. If I missed something feel free to let me know. :slight_smile: I will check those links and placeable later today when I get the chance. Will help me get an idea how it works.

Assuming that you saved the placeable that you created in ascii format - Use your preferred text editor to open and look inside your placeable. Scan through the information that occurs before the list of coordinates. You will come across one called BITMAP. Immediately to the right of that you will see the name of the texture file. It will not include a file type extension. Check that this matches the name of your mtr file.

FWIW run the demo modules for the two things I pointed you to so that you get an idea oh how they look in game.

TR

So I figured it out and you were right. Once I named the BITMAP properly within the MDL file and made sure the TGA matched with the files referenced within the MTR file, it was lit. I thought however it would produce it’s own ambient light though :frowning: Maybe that’s another thing entirely then. Would be cool if I could get it to make ambient light and be lit at the same time or even possibly animate both.

I did try to open you modules and had an issue when I tried to open the sci-fi base With the glow maps vs the ones without. The one without loaded fine, made a new character everything, but when I tried it again with the one with glow maps, it crashed right to desktop. Modules and HAKs are in the proper place too so not sure what could be causing the problem, but could not view your tileset in game to see how that worked too. Seems from your screenshots, it shows a bit of ambient glow on the walls and such and that is what I was hoping to see with my placeable on the ground. :frowning:

The reason I’m really trying to figure all this out is because for my custom module, I wanted to create a triangle placeable on the ground, flat, and have it slowly turn on and off, sort of a animation, and have it glow on and off as it did. My module is going to be a recreation of an old SNES game called “Drakkhen” and one part of the outside world there is a sort of road were they are paired triangles going across one part of the island, it is were you talk to the bigger dragons or sometimes get attacked by them, and in the game they glow on and off, on yellow, off black (I’d rather just make mine disappear or go fully transparent). Was hoping to recreate this if possible. Figured glow maps were the answer and if I could tie it to animation it would be perfect.

as for the specular issue, I will take more of a look at that latter as I’m not use to GIMP at all. Will have to get a basic feel for it, then try what you mentioned. I just wanted to see how it looked, as I seem to be having issues making proper specular maps for my placeables. Either they do not display properly, or they are just not specular enough.

Thank you for all your help. I may have more questions in the future on this forum for different things and appreciate any help you can provide in the future, if you know about any of the topics I may mention. I hope to start making a ton of custom content for the community as I’m a pretty good 3D Modeler and using PBR’s in other game engines as well as baking maps when needed so they look the best they can be. I tend to use things like Substance Painter, 3DS Max, Quixel Mixer, Substance Designer, RyzonUV, Shader Map 4, things like that.

I think you may be a little confused on the whole naming thing. Here is how it actually is -

  • model name - the name of the thing (tile, placeable, etc.) that you create in your modelling program.
  • BITMAP - Data field in your model that specifies the name of the texture(s) image file that you use to colour your model. Can be the name of a material (*.mtr) file. It does not have to be the same as the model name. There can be more than one of these in a model.
  • map file names - Do not have to have the _d, _h, _i, _n, _r or _s at the end of them nor do they all have to be identical to either the mtr file name or one another when you ignore the _d, etc. part of the name. What is essential here is their position in the mtr file as each line that references a map file occurs in a certain position in the mtr file. The main reason you will see the usual conventions followed is that it is usually easier to do so and when you use other programs to generate a mtr file (such as NWN Crunch - Enhanced Edition) they expect the _d, etc. in order to determine the type of map file and therefore the position in the mtr file.

FWIW NwN expects the dimensions of an image file to be a precise power of 2 such as 32, 64, 128, 256, 512, 1024, etc. So it is perfectly acceptable to NwN to have non-square textures such as 1024(x) x 512(y). The last little wrinkle is that NwN EE has a precedence order for image files that goes from mtr files to DDS to TGA. This means that if you have a materials file with the same name as a DDS image, NwN EE will use the mtr file even where the individual map files are TGA.

Hope that clears things up.

TR

TR, I have the same problem with your enhanced sci-fi base tileset. Crashes both in toolset and game when you try to open it. the mod with the normal scifi tileset works fine.
/Pap

That is odd because I just this second opened the module that uses my PBR textures (including .mtr files) in the toolset and then used the Build/Test Module. All works fine at my end. All I’ve done is created PBR textures for some of the tileset textures. I built and tested it using the stable build (which I keep up to date). To investigate this can you tell me a few things please.

  1. What build was this in Retail or Dev?
  2. What manufacturers graphic card have you got (don’t need the actual card)?
  3. Are your graphics drivers up to date?
  4. Is there anything in your either your override or development folders? If so what happens if you empty them?
  5. Finally if you load the “without” module into the toolset, can you try adding my hak above the tileset’s hak in the custom content list. If you can load it in the toolset, can you try Test Module. What happens then?

Thanks

TR

  1. Retail : .33

  2. Same result on 2 PCs :
    Lenovo Yoga Laptop with Intel HD 620 and Nvidia Geforce 940MX
    Stationary PC with Nvidia Geforce 1070

  3. Yes, I think so. But will check.

  4. No

  5. Tried it. interesting.
    If I add the ee hak and Test Module WITHOUT opening the area in the toolset, then I can play it with nice glowing screens ingame.
    If I open the area in toolset it crashes the toolset before I get to see the area.
    If I save the module after adding the ee hak and tries to start the new mod normally in the game, it crashes the game.

I did the same as the above comment. latest GPU driver, (Nvidia Gtx 1660), latest NWN:EE build on steam, emptied overide folder completely, tried adding the EE hak to the without module then reloading in toolset and game, both crashed to desktop. :frowning:

TBH I am at a loss then unless it’s an OS or memory thing - I’m on win 10 64 bit with 16 gig memory Nvidia Gtx 1650.

As I said earlier, it works fine for me. Do you have a problem with the PD textures I converted to NwN that I linked to in the other thread? If not you could try asking on the BD forums.

TR

1 Like

Win 10 64-bit both. 8/16 gb memory.
I’m using steam NWN.

Will try the other textures (I¨’m not sure which thread you mean, but will look.) and maybe ask BD/discord.

/Pap

I was referring to this link which I gave to @wraithdesignz in another thread they have running -

Large Public Domain Library of Placeables

FWIW I use the BeamDog launcher.

TR

1 Like