Aller au contenu

Photo

[Tutorial] How to add NormalMap, SpecularMap etc to your custom model


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

#1
th3_selectah

th3_selectah
  • Members
  • 43 messages
 Welcom to my second tutorial.

This time its a rather simple one :)

First Basics:

diffuse - defines the color of the light that is reflected off of the surface

emissive - defines the color of the light that is emitted from the surface (ie, the color that the surface glows)

normal - the "slope" of the surface. This simulates roughness by varying how light reflects off of the surface, creating shadows and hightlights on an otherwise flat plane.

relief - the "bumpiness" of the surface. This map displaces the surface, for instance allowing a flat plane to be painted with a cobblestone material that creates bumps and cracks. Unlike normal maps these bumps are "real", with rises that are able to occlude dips when viewed from a low angle.

specular - the "shininess" of the surfacetint - A uniform color that can be applied to modify the shade of a material. This allows materials to be given variant appearances with very little additional work.


Since emissive and relief arent supported within DA:O (or at least i didn`t find how to add them so far) we`ll focus on the other 4. (Emissive would be pretty awsome though imagine the possibilitys --- Iam your father luke)

Ok, you should have already prepared the NormalMap and SpecularMask Textures, we dont need a Texture for TintMask so far, as i don`t know yet how to make only a part of the Model tinting. (Iam working on that matter though)

If you don`t have NormalMap and SpecularMask for your Texture and dont know how to make it, i suggest Shadermap, as it is simple in
handling and free.

Note that generating normal/displacement/specular maps from a diffuse map generally yields very poor results.

Normal and displacement maps are best generated from a high resolution (and more detailed) copy of the 3D model, while specular maps should be artist-created at the same time as the diffuse map.

Actual Adding:

Thats pretty simple. Edit your Models *.mao file.

It should look something like this in the end:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!-- Exported by Material Editor --><!--
dc:source=file:///c:/BioWareDrive/DragonAge/SourceControl/ArtContent/Art/Characters/MATERIAL_PROJECTS/W_LSW.matproj --><MaterialObject Name="W_LSW_KA01a_0">

<Material Name="Weapon.mat"></Material>

<Texture Name="mml_tLightmap" ResName="LM.dds" RequiresID="true"></Texture>

<Texture Name="mml_tDiffuse" ResName="w_lsw_ka01a_0d.dds"></Texture>

<Texture Name="mml_tNormalMap" ResName="w_lsw_ka01a_0n.dds"></Texture>

<Texture Name="mml_tSpecularMask" ResName="w_lsw_ka01a_0s.dds"></Texture>

<Texture Name="mml_tTintMask" ResName="w_lsw_ka01a_0t.dds"></Texture>

<Vector4f Name="mml_vFalloffParams" value="0.00 1.00 1.30 1.27"></Vector4f>

<Float Name="mml_fSpecularReflectionMult" value="0.54"></Float>

</MaterialObject>

Note: w_lsw_ka01a_0 is the name of my Model.

The Material line is for the Tintmask i think. 
A lightmap is a 3D engine light data structure which contains the brightness of surfaces (I simply don`t change that line)
The Diffuse Map, Normal Map and SpecularMask are explained above.
The Tint Mask is if the game will change the appearance of the texture given after the Material the object is of. 

For Example: If i got a Red Steel sword the Texture will be overlayed with red. If i got a Silverit sword it will be overlayed with silber.
If you don`t want your Textures to be overlayed (for Uniques most probably) delete the tintmask Line.

The falloffparams ... Hmm actually i don`t know :( Mathematics most probably (nice if anyone can give me a hint on that)
SpecularReflectionMult is how strong the surface will shine.

Now you just have to copy the Textures and the new *.mao file to your "/Dragon Age/core/pagage/override/" and it should be available in the game.

#2
th3_selectah

th3_selectah
  • Members
  • 43 messages
The benefits of it, are for example that you see blood textures on your custom Model btw...

#3
Redfender

Redfender
  • Members
  • 33 messages
Thanks for doing the legwork. I wonder if falloff affects the hardness of the spec. Which might make it possible to differentiate different materials like polished steel (i.e. katana blade) vs a more diffuse metal.

#4
mikemike37

mikemike37
  • Members
  • 669 messages
okay apologies if any of these are stupid questions, but id love if you could clarify a couple of things...

firstly, where are the dds files stored? should they be in the override folder, added to a 2da somewhere, or are they contained within the .mao?

and also - any idea what format of dds file these are? or a method to get our textures into an acceptable dds format? were they part of your material in 3ds max when you exported to FBX and used tazpns conversion?

many thanks

Modifié par mikemike37, 03 décembre 2009 - 08:42 .


#5
Redfender

Redfender
  • Members
  • 33 messages
mike

see th3_selectah's other thread http://social.biowar...2/index/320619. that should answer a lot of your questions. as for formats, i think any of the dds types should work. the different types only have to do with the presence of or size of the alpha channel. there's various utilities available for converting image files to dds for whatever 2d app you use, and there's also standalone apps. just search for dds converter, or if you're using photoshop or gimp or whatever just search for dds plugins.

#6
mikemike37

mikemike37
  • Members
  • 669 messages
I believe im editing the mao and mmh files correctly, but I'm just going from this to flat grey and weird blue/green ... :(

I'm vaguely following th3_selectah's first tutorial and this one, except im using allstar's GUI for tazpns command line tools instead.

EDIT: never mind, i was editing the mao and mmh files wrongly - bad labels. doh! fixed now though :)

Modifié par mikemike37, 06 décembre 2009 - 04:19 .


#7
Mungkee

Mungkee
  • Members
  • 7 messages
thanks for the clarification,always thought that _n was somethin like a bump and _s was something like a reflection map and was wondering about the results i get.And the tool saves a lot of work,still needs a bit of readjustment,but still good to get a starting point

#8
Darth_Rediculous

Darth_Rediculous
  • Members
  • 6 messages
Ok, I have kind of a realted question.  I made a texture that that added flesh color to the scale male model in Dragon Age. The problem is that the flesh part that I added doesn't change tint.   On the robes Tint mask, black would make the skin flesh tinted but on the Scale Armor there is no flesh tint information.  How do I make the Flesh part on my Scale Armor tint? 

#9
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
emissive is in-game I believe, but not used for items, only for the enchantemens (like Flaming weapons) that attach themselves to the weapons (seen it in-game, a character with flaming weapons lits the gound below him, but I guess, again, that it depends on the enchantment, not on the weapon itself)...