Sign in to follow this  
daedalic

Level of detail on cubes

Recommended Posts

daedalic    104
Does anyone have any ideas on how to implement seamless level of detail reduction on complex structures composed of cubes?

I've considered reducing each cube into a single vertex for the first LOD reduction step, but I would need an elegant way of connecting the normal cubes to the LODed verticies. And then I would need a way of getting the winding order right for the indices of these generated vertices. Even if I got all that right, there might be a better way of doing it.

Thanks for any help!

Share this post


Link to post
Share on other sites
PolyVox    712
Personally I'd just take the approach of having a single LOD level for the whole world, because I'me pretty sure it would be hard to get the meshes to join up in a nice way. Of course, you want to make sure that your single mesh has as few triangles as possible, so don't just render it as a bunch of cubes. Personally I extract a surface from the voxels and then use a vertex collapse algorithm.

This is the best I've got at the moment:

[img]http://img249.imageshack.us/img249/1765/beforegr.png[/img][img]http://img27.imageshack.us/img27/9568/afterni.png[/img]

More information in this thread: [url="http://www.thermite3d.org/phpBB3/viewtopic.php?f=2&t=106"]http://www.thermite3d.org/phpBB3/viewtopic.php?f=2&t=106[/url]

Share this post


Link to post
Share on other sites
daedalic    104
That would work, except for the fact that each cube is capable of having a different texture. And with the way things work right now, there would be few cubes that have the exact same texture pattern right next to each other. For example, say there are two cubes adjacent to each other which use the grass texture. Cube one and cube two would likely have different UV offsets which so they can use a different part of the larger grass texture. This helps break the monotony that would otherwise result.

Share this post


Link to post
Share on other sites
PolyVox    712
Well I do also handle the case where there are two different adjacent textures, I just didn't show that in the image above. In this case I don't collapse that edge.

If there are two adjacent blocks showing different parts of the same texture, then surely the two parts of the texture do line up with each other? So you should still be able to remove the polygon edge between them?

Anyway, that's the only idea I have I'm afraid...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this