Normal So Strange....>.<,
Members - Reputation: 255
Posted 29 September 2011 - 11:32 PM
First, Let's see ScreenShot...^^a
English explaination is TOO DIFFICULT ^__^
1. Mesh ver.
I make each mesh node And use D3DXComputeNormals().
I use quadtree...
But normal value is SO strange..
And FPS so low. I use Optimize Mesh and D3DPT_TRIANGLESTRIP in Draw....
2. Direct Normal value Manual calculations ver.
This version is So Fast.
FPS so high...
But normal value is SOSOSOSOSOSO strange. T.T
How can I fix it?
Please Help me....HELP !!!!!
Members - Reputation: 376
Posted 30 September 2011 - 09:56 AM
The first image show light from faceted normals because each vertice's normal is only using the vertices on the same triangle.
I don't understand the second error but the .x model format was never made to be used outside of the DirectX SDK.
"Tutorial07" in the DirectX SDK show an easier way to store model data in your own array for more speed, stability and control.
I recomend using bump mapping in the pixel shader so that you can get a higher detail level without any work on the CPU.
Just sample the bump map multiple times with offsets to get smooth derivatives and use normalize(DX, 1, DY) as the current pixel's normal.
The bump map can be reused as a displacement map for the vertex shader so that you can get dynamic detail adaptive GPU accelerated terrain.
The bump/displacement map can then be modified on runtime when playing the game.
Dynamic terrain in my engine:
My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz
"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."