Jump to content
  • Advertisement
Sign in to follow this  
Maddibob

Meshes for LOD

This topic is 5129 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone use batches of D3DXMesh's for terrain geometry? I've been reading the latest DX9 docs and they're saying that rendering progressive meshes is quick and very useful for LODs.

Share this post


Link to post
Share on other sites
Advertisement
I tried to use those for terrain once :)

The problems I had were:

I had to keep the edges of each chunk of terrain at the highest detail level to that the edges matched up with the chunk(s) next to it, because there was otherwise no good edge matching algorithm.

Also, there's no blending between levels of detail: it just pops from one detail level to the next. In order to get a nice transition between levels, blending is almost a necessity, because the popping, especially on terrain, is very noticeable to the human eye.

Share this post


Link to post
Share on other sites
I'll take that as a no then :)

So you have your own format? Have you incorporated terrain detail objects (like rocks, etc) into the terrain object and Octree itself?

I'm at a point where I have a large heightmap-based terrain and lots of detail objects that need to go on top of that like rocks, plans, trees, etc. I can't decide whether to include the detail objects into the static terrain vertex buffer that the heightmap-generated terrain uses, or just attach them to each octree node and render them on a model-by-model basis during the draw of each octree node...

Any ideas how this is generally done...?

Share this post


Link to post
Share on other sites
How large is your heightmap? Are you doing any LOD?

If you're doing LOD, you might find that the extra detail geometry gets in the way of the LOD processing if you put it together. In that case, you better treat it as separate objects.

If not, then at first glance, there is no reason why not to put the detail geometry in the same vertex buffer as the relevant parts of the tarrain. But on second thought, the detail objects will likely have different textures than the terrain, different shaders perhaps, maybe some LOD of their own, etc.

So as far as rendering is concerened, you're probably better off to treat them as regular objects, batch by shader-texture-whatever, and so on. Although, if your only terrain LOD is switching from one patch to another (like geomipmapping or similar), and your only object LOD for those detail objects is switching from one model to another (or hide the model entirely, since it's only a small detail model), then you can still link the terrain and detail object LODs together: for LOD 1 of the terrain, store which models are shown on that patch at that LOD level, the same for LOD 2, LOD 3, and so on. Then during rendering, collect which models need to be rendered, batch, do whatever processing you usually do, and render (separately from the terrain, due to the different visual properties).

Share this post


Link to post
Share on other sites
I've only ever heard of D3DX's progressive meshes being used for small objects like characters. The problem is that your terrain is really one single huge mesh that you want to apply different levels of detail to in different places (high LOD near the camera, low LOD far away) - standard PM applies a uniform LOD over the whole mesh.

Check Hughes Hoppe's page out, though. He basically invented PMs, and there's a paper on his site about view-dependent progressive meshes which may be of interest.

Share this post


Link to post
Share on other sites
Luckily, the game I'm working on uses fairly near fogging, so I didn't think it was worth using LODs. I'll try and incorporate my 'objects' which could be vast expanses of rocks (possibly overhanging) into the same vertex buffer. They will be different textures (and pixel shaders), but the indexing system I'm using batches textures and shaders so it should be okay.

My heightmap is any size, but generally for each level it is 256x256x256. But over that there are lots of rock formations, and I wanted to keep it neat by mixing the 'detail objects' in with the terrain. If nothing else, it keeps rendering simple.

Thanks for the replies, guys

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!