You'll have to forgive me, I'm used to Oblivion normal maps. I'm used to each channel representing up/down, left/right, and depth. I'm using that kind of map right now on my own sword and its not working with the graphics engine correctly, like not reflecting light properly. Looking at the channels of the game's stock maps, the RGB channels seem to be basically the same. while the alpha channel is different. Is the RGB a grayscale normal map? And then whats the alpha for?
Please help
Does anyone understand these normal maps?
Débuté par
Redfender
, janv. 05 2010 03:18
#1
Posté 05 janvier 2010 - 03:18
#2
Posté 05 janvier 2010 - 03:23
err nevermind i found the answer
To quote DarthParametric:
"w_lsw_ls01a_0n <- Normal map. Bioware (for some reason) use a screwy non-standard normal map. A regular normal map is RGB, the channels representing X, Y, and Z respectively. Bioware however use a 4 channel image but only effectively use 2 channels. X is in the Alpha channel and Y is duplicated across the RGB channels. The only reason seems to be to make our life more difficult."
So why don't they care about the z? is it combined with one of the other directions?
To quote DarthParametric:
"w_lsw_ls01a_0n <- Normal map. Bioware (for some reason) use a screwy non-standard normal map. A regular normal map is RGB, the channels representing X, Y, and Z respectively. Bioware however use a 4 channel image but only effectively use 2 channels. X is in the Alpha channel and Y is duplicated across the RGB channels. The only reason seems to be to make our life more difficult."
So why don't they care about the z? is it combined with one of the other directions?
#3
Posté 05 janvier 2010 - 03:47
actually i think y (up/down) is in the alpha and left/right is in RGB. or at least that way it seems to be lighting correctly in the game for me.
#4
Posté 05 janvier 2010 - 04:04
oh brother its still not lighting right. do i need to include this LM.dds in my resource file?
#5
Posté 05 janvier 2010 - 07:57
Try this in your model's MAO:
I'm still experimenting, but in a test I did last night I did seem to get a normal map working properly on a custom level model using this.
<MaterialObject Name="[i][color="#ff0000"]name[/color][/i]"> <Material Name="Static.mat"></Material> <DefaultSemantic Name="Default"></DefaultSemantic> <Texture Name="mml_tDiffuse" ResName="[color="#ff0000"]diffuse_map[/color].dds"></Texture> <Texture Name="mml_tNormalMap" ResName="[color="#ff0000"]normal_map[/color].dds"></Texture> <Texture Name="mml_tLightmap" ResName="LM.dds" RequiresID="true"></Texture> </MaterialObject>
I'm still experimenting, but in a test I did last night I did seem to get a normal map working properly on a custom level model using this.
Modifié par DarthParametric, 05 janvier 2010 - 08:01 .
#6
Posté 05 janvier 2010 - 01:54
okay. is the red supposed to be replaced by my names, or are you saying to use those names literally? i have my .mao set up similarly already. its weird, because the diffuse reflection from sunlight seems to be correct, but diffuse reflections from say a camp fire don't seem to work at all, while specular reflections do.
thanks
thanks
Modifié par Redfender, 05 janvier 2010 - 04:07 .
#7
Posté 05 janvier 2010 - 04:36
p.s.
i was thinking about why they don't include depth in the normal map and thats probably because you can calculate depth im guessing off of the x and y.
i wonder if anybody familiar with coding python could work out a script that only bakes out the x and y directions in blender instead of all directions. of course i guess you record an action in photoshop to do it. anyway it still creates an extra step.
i was thinking about why they don't include depth in the normal map and thats probably because you can calculate depth im guessing off of the x and y.
i wonder if anybody familiar with coding python could work out a script that only bakes out the x and y directions in blender instead of all directions. of course i guess you record an action in photoshop to do it. anyway it still creates an extra step.
#8
Posté 05 janvier 2010 - 07:14
Yes, replace with your filenames.Redfender wrote...
okay. is the red supposed to be replaced by my names
#9
Posté 05 janvier 2010 - 08:05
Dragon Age normal maps most likely use the DXT5 compression format to achieve better quality results compared to the "regular" normal maps. It's the same trick used in Doom 3 -- the X component of the vector is stored in the Alpha channel, the Y is stored in Green channel which has 6 bits of fidelity compared to 5 bits in Red and Blue channels and the Z is rebuilt on the fly by the shader from the other two components (the normal vectors are supposed to have length of 1.0 so it's matter of pretty simple math)Redfender wrote...
So why don't they care about the z? is it combined with one of the other directions?
You can read the details in nVidia paper here: http://http.download...Compression.pdf
pages 7 and 8, specifically.
#10
Posté 06 janvier 2010 - 03:02
i somehow got the model reflecting light properly. i think it had to do with the xml in my mao ultimately. although i still have the mesh smoothing problem i mentioned in a previous post. but its progress.
anyway if anybody wonders what my fully working mao finally looks like I basically ended writing over the mao i got from tazpn's tool with a stock mao and changed the file names:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>
<Vector4f Name="mml_vFalloffParams" value="0.00 1.00 1.29 1.02"></Vector4f>
<Float Name="mml_fSpecularReflectionMult" value="0.50"></Float>
</MaterialObject>
Probably could have done that all along instead of trying to come up with a working file myself.
anyway if anybody wonders what my fully working mao finally looks like I basically ended writing over the mao i got from tazpn's tool with a stock mao and changed the file names:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>
<Vector4f Name="mml_vFalloffParams" value="0.00 1.00 1.29 1.02"></Vector4f>
<Float Name="mml_fSpecularReflectionMult" value="0.50"></Float>
</MaterialObject>
Probably could have done that all along instead of trying to come up with a working file myself.
Modifié par Redfender, 06 janvier 2010 - 03:07 .





Retour en haut






