Post by thatdarnowl on Dec 24, 2023 9:47:09 GMT
NAM files are essentially rudimentary shader files. Roughly analogous to Quake 3's .mat files. They're plain text files that are easy to edit. NAM files allow you to set properties to textures. Such as making them light up stuff or appearing transparent.
There's a tool that lets you quickly automate creating NAM files here. It's aptly named NAM tool.
www.moddb.com/games/vampire-the-masquerade-redemption/downloads/nam-tool
However if you wanna add extra stuff there's a bunch of additional parameters you can add that are listed bellow. These were taken from the website VampireNetwork.net
There's a tool that lets you quickly automate creating NAM files here. It's aptly named NAM tool.
www.moddb.com/games/vampire-the-masquerade-redemption/downloads/nam-tool
However if you wanna add extra stuff there's a bunch of additional parameters you can add that are listed bellow. These were taken from the website VampireNetwork.net
INTRO:
NAM files (for Nihilistic animated material, basically koa animated textures) are used to store additional information about a texture used in the game engine. Nams are used for almost all textures shown in the game, however, a texture can happily exist without .nam. In the vampire game engine, when reference is made to a texture, it is most often without an extension, so chrishead.tga will be called chrishead for short. (notice this by importing a nod into milkshape...). If a call is made to Wall1 for example, the engine will search in the /materials directory if there is a Wall1.nam file, if it does not find one, it will display Wall1.tga, using the basic decalco method , implicitly therefore, there is a name for each texture, except that sometimes, not existing as a file, it is the game engine which generates it.
If nams allow many effects, they also allow you to recall a texture in different ways, without too much increase in weight. Well yes, the nams are poor, super light text files, by recalling a tga (heavy like bitmap because not compressed) several times thanks to various nams, we thus avoid the overload.
Well, obviously, no software to just click I want it to be beautiful and wow lol...you have to type everything yourself, but the syntax of the nams code is relatively simple.
FORMAT:
the basic file format contains keywords followed by parameters whose meaning depends on the initial keyword.
All params are separated by spaces, or TABs, and are not case sensitive (for gougnols, it doesn't matter upper or lower case...). What follows is an explanatory table of the key words (this is where I cry for having started this myself...), between <> you will find the parameters, otherwise it simply means that there are none not ^^
- Texture: Defines the base texture to use. This keyword can appear several times, for example for an animated texture, we will therefore define each material successively, and better, if we use the same material in several PASS (we will explain this later) we can repeat the same material several times with different effects.
- Numframes <#detextures>: Specifies how many frames will be counted, for a texture with frame-by-frame animation. TO BE PUT ABSOLUTELY BEFORE THE FIRST TEXTURE, to allow the engine to reserve memory space for the image array.
- Specular: I didn't really catch this one...if someone can explain...
- Masked: Treats the alpha layer of the tga as an alpha1bit, therefore renders the texture as if it had transparent holes (used for example for Lucrecia's saps).
Different from blending, this technique does not allow you to keep a color so that it acts on the textures behind it, it makes... a hole... quite simply... to know how to make a 1bit alpha layer in a tga in photoshop... well we'll see later.
- Fullylit: Treats the texture as fully illuminated, regardless of ambient lighting, used for light-emitting surfaces. However, if the texture thus treated is always illuminated even in the dark, it will not act on its environment (a shame) and therefore it cannot be used to make, for example, a flashlight.
- Addblend: Uses a blending mode which adds this texture to the color behind it, this gives a luminance effect, often used for particles. To be more French, this technique allows you to make the targeted texture slightly transparent, and to add the latter to the other textures (decors) located behind it. Nickel to render, for example a cloud of smoke. To simplify, complete black (RGB 0,0,0) will be 100% transparent, white 100% opaque.
- Subblend: Same as addblend, except that instead of adding, it subtracts. Great for rendering a shadow for example. Here also the black will be 100% opaque, the white 100% transparent.
Be careful, I noticed that blending techniques, as much as they allow great fxs, seem to mess around when the model is in front of a prop, even several meters away from it, the prop seems to move into the foreground.. ..
- Envmap: Didn't catch this one...to test...
- Glow: Loads an additional texture to be used as a "glow map". the glow map is rendered as an additional pass using an additive blend (addblend=). This technique is used to make a certain part of a texture luminous, while the one below is not (not really understanding that one...to be tested more deeply).
- Twosided: Very important. The object textured with this material will be considered "double-sided" at rendering time. (for example, why do the sides of my coat appear when I look at my skin from the back, but not when I look at it from the front?? quite simply because 3D models are normally single sided, they are not rendered on the other side , if you could place your camera inside a skin, you would no longer see it, the scenery would appear as if the skin did not exist. the keyword twosided is therefore used for that, super useful for a whole bunch of things =))
- Glowramp <#>: Asks the "glowmap" to have its lighting controlled by one of the lighting styles internal to the game engine (maybe the mappers can help...I didn't catch anything on that one).
- Pageflip <#miliseconds): Asks a frame-by-frame animated texture to change image every #miliseconds. Allows you to actually adjust the number of frames per second of your animation... applications range from simple color changes to funny effects like water, flowing blood, a blinking eye, etc. etc. .. To be used with numframes of course...
- Sound: Gives a sound to the texture when characters walk on it, useful for mappers, useless for skinners, since the sound is managed by NOT. You will find the list of valid sounds in the doc, or if I'm not too lazy at the end of the post.
- Flicker <#>: If the material has several images, flickers asks the rendering system to alternate between image 0 and image 1 different lighting systems specific to the rendering engine (this is where the # comes in). Used for example to render a rotten neon effect, etc. On the other hand, I didn't find a list for the different lighting "internal to the engine", surely the mappers must know more.. thank you for contributing ^^
- Detail: Nothing captured...to see..
- Detailscale: Apparently it is linked to Detail in short, it should allow you to enlarge or reduce the texture on the model...
- Pass (nomip): We enter the ball. The Pass keyword allows low-level control to set the blend mode. THIS KEYWORD IS NOT COMPATIBLE WITH MOST OF THE OTHERS CITED ABOVE. This method allows the skinner to control each "pass" of a multipass shader separately. PassNum (the parameter) starts at 0 and increments for each additional pass. this is therefore the name of the texture for this passage. Special texture names are possible: $lightmap specifies the lightmap of the surface (if there should be one), $lightadd calls a light application traced to a dynamic source. They are supposed to be described in a separate table, but the editor must have been stupid, and only repeated the table of sounds. I found a few: full_add produces exactly the same effect as Addblend, full_sub , the same as Subblend. The example file at the end of the doc presents others, which I will let you test. As for $lightmap etc, I didn't understand anything....
- Slide (incrementhorizontal, incrementvertical): Only used with Pass, allows you to drag a texture on the model. Increments are numbers, referring to floating point texels, and can be negative or positive. (well don’t panic, it seems complicated but it’s not). A Slide 0 (1,1) will slide the texture referred to in Pass 0 1 to the right and 1 up. Obviously, big values make the textures slide super fast, but then, what does that eat up in terms of resources lol.
That's it for the Keywords presented in the doc, there may be others not mentioned, like the full_add params, and all that. I therefore invite you to test each effect separately, to avoid getting confused.
Finally here are some example files, including that of Nihilistic, commented:
pass 0 waterTest.tga modplusdest
pass 1 watertest2.tga modplusdest
pass 2 waterTest.tga modplusdest
pass 3 $lightmap modpost
sound wet
slide 0 (0.2,0.1)
slide 1 (0.1,-0.2)
slide 2 (-0.3, -0.05)
This file therefore orders 4 passes of textures on the same object, and of course seems to be intended for an aqueous surface, the passes define each texture, as well as their blend mode, in the middle we find the sound, so WET (yes it is wet) followed by slides, to give a sliding effect. Note that the slide values are relatively small, water being something quite slow than normal, for fire, or lightning we can go much faster (always keeping in mind that it eats up resources) .
2nd example the 2 names that I used for the Lightning Dance discipline (Lightning tomato 5)
the model of this tomato is a simplified gothgirl (no nose, no mouth, shaved hair) then duplicated and enlarged. That is to say that the model includes 2 layers, one at the size of the normal gothgirl, then a larger one around the first, this making it possible to manage a depth effect.
The original layer received this texture:
__________________________________
fullylit specular addblend
numframes 2
texture boubatest.tga
texture boubatest1.tga
pageflip 30
__________________________________
So, wherever it is it will always be illuminated, specular to test but I haven't found any particular effect, and addblend so that it adds to the colors behind, and also of course to give a transparency effect. Numframe 2 warns that there will be 2 textures boubatest and boubatest1, which is in fact only the colorimetric inverse of the first, to finish pageflip 30 gives 30ms between each flip. all giving a flashing effect.
The outer layer received a slippery texture. Here is the name:
_____________________________________
twosided
pass 0 BoubaTest.tga full_add
slide 0 (-1,-1)
_____________________________________
Twosided, I put it but I don't think it is compatible with the pass. the Pass therefore defines the texture, and gives it an additive mixture (full_add), slide will slide this texture to -1, therefore quite excessive speed.
That's it for this NAM tutorial... I would be delighted if you would complete it with your comments, and various additions (help to the mappers!!!).
NAM files (for Nihilistic animated material, basically koa animated textures) are used to store additional information about a texture used in the game engine. Nams are used for almost all textures shown in the game, however, a texture can happily exist without .nam. In the vampire game engine, when reference is made to a texture, it is most often without an extension, so chrishead.tga will be called chrishead for short. (notice this by importing a nod into milkshape...). If a call is made to Wall1 for example, the engine will search in the /materials directory if there is a Wall1.nam file, if it does not find one, it will display Wall1.tga, using the basic decalco method , implicitly therefore, there is a name for each texture, except that sometimes, not existing as a file, it is the game engine which generates it.
If nams allow many effects, they also allow you to recall a texture in different ways, without too much increase in weight. Well yes, the nams are poor, super light text files, by recalling a tga (heavy like bitmap because not compressed) several times thanks to various nams, we thus avoid the overload.
Well, obviously, no software to just click I want it to be beautiful and wow lol...you have to type everything yourself, but the syntax of the nams code is relatively simple.
FORMAT:
the basic file format contains keywords followed by parameters whose meaning depends on the initial keyword.
All params are separated by spaces, or TABs, and are not case sensitive (for gougnols, it doesn't matter upper or lower case...). What follows is an explanatory table of the key words (this is where I cry for having started this myself...), between <> you will find the parameters, otherwise it simply means that there are none not ^^
- Texture: Defines the base texture to use. This keyword can appear several times, for example for an animated texture, we will therefore define each material successively, and better, if we use the same material in several PASS (we will explain this later) we can repeat the same material several times with different effects.
- Numframes <#detextures>: Specifies how many frames will be counted, for a texture with frame-by-frame animation. TO BE PUT ABSOLUTELY BEFORE THE FIRST TEXTURE, to allow the engine to reserve memory space for the image array.
- Specular: I didn't really catch this one...if someone can explain...
- Masked: Treats the alpha layer of the tga as an alpha1bit, therefore renders the texture as if it had transparent holes (used for example for Lucrecia's saps).
Different from blending, this technique does not allow you to keep a color so that it acts on the textures behind it, it makes... a hole... quite simply... to know how to make a 1bit alpha layer in a tga in photoshop... well we'll see later.
- Fullylit: Treats the texture as fully illuminated, regardless of ambient lighting, used for light-emitting surfaces. However, if the texture thus treated is always illuminated even in the dark, it will not act on its environment (a shame) and therefore it cannot be used to make, for example, a flashlight.
- Addblend: Uses a blending mode which adds this texture to the color behind it, this gives a luminance effect, often used for particles. To be more French, this technique allows you to make the targeted texture slightly transparent, and to add the latter to the other textures (decors) located behind it. Nickel to render, for example a cloud of smoke. To simplify, complete black (RGB 0,0,0) will be 100% transparent, white 100% opaque.
- Subblend: Same as addblend, except that instead of adding, it subtracts. Great for rendering a shadow for example. Here also the black will be 100% opaque, the white 100% transparent.
Be careful, I noticed that blending techniques, as much as they allow great fxs, seem to mess around when the model is in front of a prop, even several meters away from it, the prop seems to move into the foreground.. ..
- Envmap: Didn't catch this one...to test...
- Glow: Loads an additional texture to be used as a "glow map". the glow map is rendered as an additional pass using an additive blend (addblend=). This technique is used to make a certain part of a texture luminous, while the one below is not (not really understanding that one...to be tested more deeply).
- Twosided: Very important. The object textured with this material will be considered "double-sided" at rendering time. (for example, why do the sides of my coat appear when I look at my skin from the back, but not when I look at it from the front?? quite simply because 3D models are normally single sided, they are not rendered on the other side , if you could place your camera inside a skin, you would no longer see it, the scenery would appear as if the skin did not exist. the keyword twosided is therefore used for that, super useful for a whole bunch of things =))
- Glowramp <#>: Asks the "glowmap" to have its lighting controlled by one of the lighting styles internal to the game engine (maybe the mappers can help...I didn't catch anything on that one).
- Pageflip <#miliseconds): Asks a frame-by-frame animated texture to change image every #miliseconds. Allows you to actually adjust the number of frames per second of your animation... applications range from simple color changes to funny effects like water, flowing blood, a blinking eye, etc. etc. .. To be used with numframes of course...
- Sound: Gives a sound to the texture when characters walk on it, useful for mappers, useless for skinners, since the sound is managed by NOT. You will find the list of valid sounds in the doc, or if I'm not too lazy at the end of the post.
- Flicker <#>: If the material has several images, flickers asks the rendering system to alternate between image 0 and image 1 different lighting systems specific to the rendering engine (this is where the # comes in). Used for example to render a rotten neon effect, etc. On the other hand, I didn't find a list for the different lighting "internal to the engine", surely the mappers must know more.. thank you for contributing ^^
- Detail: Nothing captured...to see..
- Detailscale: Apparently it is linked to Detail in short, it should allow you to enlarge or reduce the texture on the model...
- Pass (nomip): We enter the ball. The Pass keyword allows low-level control to set the blend mode. THIS KEYWORD IS NOT COMPATIBLE WITH MOST OF THE OTHERS CITED ABOVE. This method allows the skinner to control each "pass" of a multipass shader separately. PassNum (the parameter) starts at 0 and increments for each additional pass. this is therefore the name of the texture for this passage. Special texture names are possible: $lightmap specifies the lightmap of the surface (if there should be one), $lightadd calls a light application traced to a dynamic source. They are supposed to be described in a separate table, but the editor must have been stupid, and only repeated the table of sounds. I found a few: full_add produces exactly the same effect as Addblend, full_sub , the same as Subblend. The example file at the end of the doc presents others, which I will let you test. As for $lightmap etc, I didn't understand anything....
- Slide (incrementhorizontal, incrementvertical): Only used with Pass, allows you to drag a texture on the model. Increments are numbers, referring to floating point texels, and can be negative or positive. (well don’t panic, it seems complicated but it’s not). A Slide 0 (1,1) will slide the texture referred to in Pass 0 1 to the right and 1 up. Obviously, big values make the textures slide super fast, but then, what does that eat up in terms of resources lol.
That's it for the Keywords presented in the doc, there may be others not mentioned, like the full_add params, and all that. I therefore invite you to test each effect separately, to avoid getting confused.
Finally here are some example files, including that of Nihilistic, commented:
pass 0 waterTest.tga modplusdest
pass 1 watertest2.tga modplusdest
pass 2 waterTest.tga modplusdest
pass 3 $lightmap modpost
sound wet
slide 0 (0.2,0.1)
slide 1 (0.1,-0.2)
slide 2 (-0.3, -0.05)
This file therefore orders 4 passes of textures on the same object, and of course seems to be intended for an aqueous surface, the passes define each texture, as well as their blend mode, in the middle we find the sound, so WET (yes it is wet) followed by slides, to give a sliding effect. Note that the slide values are relatively small, water being something quite slow than normal, for fire, or lightning we can go much faster (always keeping in mind that it eats up resources) .
2nd example the 2 names that I used for the Lightning Dance discipline (Lightning tomato 5)
the model of this tomato is a simplified gothgirl (no nose, no mouth, shaved hair) then duplicated and enlarged. That is to say that the model includes 2 layers, one at the size of the normal gothgirl, then a larger one around the first, this making it possible to manage a depth effect.
The original layer received this texture:
__________________________________
fullylit specular addblend
numframes 2
texture boubatest.tga
texture boubatest1.tga
pageflip 30
__________________________________
So, wherever it is it will always be illuminated, specular to test but I haven't found any particular effect, and addblend so that it adds to the colors behind, and also of course to give a transparency effect. Numframe 2 warns that there will be 2 textures boubatest and boubatest1, which is in fact only the colorimetric inverse of the first, to finish pageflip 30 gives 30ms between each flip. all giving a flashing effect.
The outer layer received a slippery texture. Here is the name:
_____________________________________
twosided
pass 0 BoubaTest.tga full_add
slide 0 (-1,-1)
_____________________________________
Twosided, I put it but I don't think it is compatible with the pass. the Pass therefore defines the texture, and gives it an additive mixture (full_add), slide will slide this texture to -1, therefore quite excessive speed.
That's it for this NAM tutorial... I would be delighted if you would complete it with your comments, and various additions (help to the mappers!!!).
Social Media