|
|
Thanks for the replies people.
icewolf: Sorry, but src will not be available. First, it's full of garbage (i keep it for back up ... and feature work) and it's not a public project.
NeukuM:
The benefit of geomipmaps is that you send a large batch of triangles/vertices to the 3d card in one time, and you avoid the habitual
ROAM/Qaud tree send of call per triangle fan. The 3d hardware likes this very much, and you have less API calls. (it likes it, because he
have some thing to do, till the next call, we use every clock of the card.. or almost ...correct me if i am wrong).
To init Dx, you need only a handle to a window. I use the handle of the TForm (your window) for full screen , and a handle to any
TWinControl (i use TPanel) for the windowed mode. (you can use Dx as background :) .
You use the TPanel size for the viewpoint ...etc .. I really don't remember what i did, it was so long ago ... I must convert every thing to
Dx8 soon (i use Dx7) . If you need more details ...ask again
TimeHunter:
Nothing to say about dynamic lighting. I use Dx directional light with the vertex normals. There is a problem currently. The lighting is
correct only when the terrain is at max detail. When less vertices, the normals are no more accurate. Now i understand why the
Gamasutra ROAM article used several Mip levels of the height map. Of course we can compute the normals at the lowest Lod level then
interpolate to the additional vertices (haven't done it yet).
To eliminate the gridspacing in the normal computation, i just normalize the nx and nz as a 2d vector ( div=sqrt(nx*nx+nz*nz); nx=nx/div ;
ny=ny/div; and take care when nx or ny are not zero , if so, you just avoid all the steps). So , normal={nx,1.0f,nz}, you must normalize it.
silkyslim:
Do you know haw to blit faster ?
I use 512x texture just for the testing of the blending function. I used the much bigger 2048x. But it's not detailed enough ...searching for
alternative (i have an idea ...but theory for now). Memory is an issue, even on my 64MB GeFOrce2 , that's why i don't use Render to
texture , the texture must have a Z buffer, even if i don't use it :(
Sebastian / TimeHunter:
I use the adaptive quad tree structure with geomipmaps. I read several articles, including the Gamasutra. I use / used methods from
different papers. My biggest problem was the cracks. I have spent some time to try different techniques, including the non geomipmaps.
My quad trees are actually stored in linear array. So, i avoid the 4x4byte pointer storage in each node. And that is lot of memory.
The geomipmaps. I use "patches" as a leaf in the quad tree. The size of the patches can be changed in a cfg file. They store the indices
of the vertices for the different LOD levels. The different LOD indices are computed by just skipping avery 2nd.... etc. vertex. The vertices
are stored in several Vertex Buffers (the patch keep pointer to the used buffer, and an BYTE for the used LOD) . Dx7 buffers can store
only 0xFFFF vertices ...one VB is not enough for terrain > 256x256.
These indices does not store the borders. There is different vars that store the 4 borders of every patch. I ensure that every neighbor
patch has the only level LOD difference on render. And i choose the appropriate border if difference or not. Lower LOD ensure to
connect to higher one (or the inverse , don't remember).
I traverse the quad tree and check every node against the view frustum (i use very bad test function). Every node has info about the max
height (actually an other linear stored quad tree).
The used LOD is computed from the distance, pre computed factor and a threshold value (called "quality factor").
The quality factor can be adjusted so, more details are shown on close distance , and it depends highly of the terrain type. The Grand
Canyon is a particularly popping case , and must use higher quality factor.
I know the Boom's article ...but i have trouble with any tech that uses more than one pass. Simply ...i have allergy ..there must be one
pass tech ..5 passes ..wow ...to much lost time. That not mean that's tech..but my brain have trouble with.
TimeHunter: Ask me for specific questions about quad trees ...If you just ask in general, go and read some articles. The Geomip map tech
is explained here : http://www.flipcode.com/tutorials/tut_geomipmaps.shtml . I exactly the same tech ...but anyway. There is a very good
article about quad trees on Gamasutra , much more other on the wild . I don't keep links ..i d/l the papers :(.
Now, i do research on better texturing technique, occlusion culling ... IF you have idea ..or you know good papers ... TELL me please.
Wow ...that's getting long ... to long. Never liked to write ...but from a year, i write really much, hmm.. must become a journalist ..? Naaaa
If you have more questions ...i'll be glad to answer to you in bad English
Oh ..i forgot ... i search a job in the game industry. Only ...i had not time to write my CV :-(
--
The Aero Section : http://fly.to/TheAeroSection/
The Aero Section is a large military aircraft photo gallery.
|