Quote:
So this problem is due to the frustum culling, e.g. when you have the frustum test turned off everything is rendered properly?
I turned frustum culling off and still have the same problem. There are a few areas I can think of that may be causing this issue. I'll let you know what I discover.
Quote:
Man that's odd. I don't know if its a frustum culling problem because patches before and after the hole are rendered.
The texture transitions look good.
My sentiments exactly when I ran it and saw what it was doing. And thanks I think the texture transitions look very good for a single pass shader.
Quote:
Is it just a random tile here and there or is there any consistency to it? Have you used this algorithm before? Granted I don't know much at all about 3d/Driect X, but I'm just wondering if perhaps there's a pattern to the missing patches.
It's not quite random and it appears as if the southeast portion of the quad tree is falling apart. However there is a serious problem with this theory. If the quadtree was broken, almost every terrain patch would reveal this since this is a recursive algo. So if it's broke for one patch it should be just as broken for the next. Also what's extremely baffling is that 4 patches in the center of the terrain are completely missing. This is a quad tree boundary so this would mean that all 4 quad tree nodes would have failed in order to produce such a render. I'm almost certain it cannot be the quad tree. It may be in the actual render code that traverses the tree and drills down to the leaf nodes.
Quote:
How are you doing the texture transitions? Are you loading all of your textures into a 3d texture and interpolating the texture z value when you want to transition, or is it a multi-pass kind of thing?
Terrain texturing and lighting is done in a one pass blending shader that does diffuse and specular lighting. It's a well known technique. I'm using a blend map to blend several different textures. Each texture uses a channel of the blend map to determine how much of it's color contributes to the final pixel. A tiling coefficient is used on the texture samplers and a non tiled coefficient is used on the blend map. This technique is in several books but is explained very well in Frank Luna's recent book. I'm only using the basic technique here and it works well for now.
Once I discover the source of my 'holes' I'm going to add bump-mapping to the shader. Future plans also include billboarded grass, 3D trees/rocks/plants and whatever else I can throw at this. The eventual goal is to implement this renderer as the planet renderer for my space game project so I will also need billboards on the horizon so I can show far off planets, moon, suns, etc. Hopefully I can also implement some CLOD so I can perform seamless space to planet transitions with no loading and no pausing.
The skybox is not actually a box. Instead it is a cubic environment mapped icosphere which gives pretty good results.