Thanks, I needed _bump, it seem it's not implemented yet.
I think we are working (secretly) in the same texture :lol:
Thanks, I needed _bump, it seem it's not implemented yet.
DX11 uses one channel (red one in case there are mupluple channels), then converts height map into normal map using D3DX11ComputeNormalMap function during texture load. Check D3DX library - I'm pretty sure there is such a function even in D3DX9.Are the bump maps used in DX11 Client in A8, L8 or R32 format ?
I suppose I could add an automated cenverter in the client.
Now, there is one more thing about Dan's DGIV - he uses bool GraphicsClient::clbkSetMeshTexture( DEVMESHHANDLE hMesh, DWORD texidx, SURFHANDLE tex ) method to set textures for skins support, so in order for normals to show up you should scan for (and assign) normals maps dynamically when new texture is being assigned.
Normal (and other) maps are tried to be loaded with a call to GraphicsClient::clbkLoadTexture and they are stored in the D3D9Surface class, so every separate texture loaded this way can have a separate normal (or other) map. GraphicsClient::clbkSetMeshTexture changes the referenced texture maps by changing referenced D3D9Surface, and texture maps are fetched from the D3D9Surface class when the (external) mesh is rendered, so no worries, they will be all updated just fine to new after the clbkSetMeshTexture was called.Now, there is one more thing about Dan's DGIV - he uses bool GraphicsClient::clbkSetMeshTexture( DEVMESHHANDLE hMesh, DWORD texidx, SURFHANDLE tex ) method to set textures for skins support
There's _norm instead, and _bump should be easily convertible to _norm.
It's easy enough both ways as bump map is essentially a heightmap. And having a heightmap is preferred compared to normal map, because you can always compute normal map from heightmap, but not the other way around.Hi Jarmo et al,
is it correct that "bump"- and "normal"-map are used to render the same result (serve the same feature)?
If yes and "bump"-map is much easier[1] and also supported by D3D11Client, I vote for "bump"-maps and the "norm"-maps feature should be completely removed!
If however the "norm"-maps provides something that "bump"-maps can't provide, the feature should be available in both Clients (*9 and *11).
/Kuddel
[1] as posted by dansteph
I vote against normal maps being removed. Bump maps are converted to normal maps anyway before they are used. Support for them in _norm files should stay in D3D9Client and if it's missing in D3D11Client, then it should be added there too.I vote for "bump"-maps and the "norm"-maps feature should be completely removed!
DX11 supports normal maps and I'm against removing that support. But as I've said before, between bump map and normal map I'd pick a former one because it conveys more information that normal map does, and any additional information can be useful.I vote against normal maps being removed. Bump maps are converted to normal maps anyway before they are used. Support for them in _norm files should stay in D3D9Client and if it's missing in D3D11Client, then it should be added there too.
Here is a new build with bump map support. BumpMap amplitude factor can be changed from D3D9Client.cfg. I don't have any real bump maps to test it, really but it seems to be working.
I vote against normal maps being removed.
In DX11 bump map is taking precedence.Hi all,
thanks for all the information. Having both available is O.K.
I just thought it might confuse developers, not knowing if they have to add both or only one of them...
What does the D3D11Client (D3D9Client as well) do when both formats are provided? Is there any preference?
a) foo_norm.dds is taken, foo_bump.dds is ignored
b) foo_bump.dds is taken, foo_norm.dds is ignored
c) ??? (somthing Kuddel has not thought of :hmm: )
I am asking because I want to make the documentation as clear as possible.
Thanks in advance,
Kuddel
Currently D3D9Client is set to prefer a normal map over a bump map. But I can reverse it, since, it really doesn't matter much.
I do prefer a normal map over a bump map since it gives more control and better precission over a pixel. Bump maps are old and usually replaced by normal maps, however, due to arrival of displacement mapping techniques some people have started to give move value for bump maps, since, it can be used as a displacement map. However, a modern graphics engines are using normal maps and displacement maps at the same time.
It would only matter when somebody released add-on with both bump and normal maps for the same texture, but why would they do that (I think it would be rather released with separate normal + optionally displacement or just the bump map)?Currently D3D9Client is set to prefer a normal map over a bump map. But I can reverse it, since, it really doesn't matter much.