• Create Account

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a \$50 Amazon gift card. Click here to get started!

# RetroIP

Member Since 12 Jan 2012
Offline Last Active Aug 27 2015 07:21 AM

### LOD Terrain - Indices management

05 July 2012 - 02:53 AM

Hello Community !,
I'v spent many hours regarding terrain, tested many approaches from my side,but I stopped on one and last thing - Indices/Vertices optimization.
So, currently I'm using BiLOD XNA 4.0 LOD Terrain sample by Rene7705.
In my approach, I'v successfully reached stiching, and other required things, but I did not understand or I did not find proper material for Indices/Vertices optimization. Let me explain:
I need to remove duplicated Vertices and prepare indices for buffer.

Can you advice me some methods how can I remove duplicated vertices and use proper order for indices ? This proces is important for me, because when I'm transfering Vertices and indices into the Vertex/Index buffer, it saves me a lot (Yes, I'm using background thread to redetail terrain according current camera position).

Maybe picture will explain it better:
I have vertices from part 1 of the terrain, and vertices from part 2.
It is no problem to build Vertex and Index buffer for part 1 and Part 2 separately.
When I want to merge this parts into the one buffer to final buffer which is drawed, I can see...not seems, but I can see that I have 2 vertices on same place it is side effect of my DUPLICATED VERTICES.

So question:
How can I remove, well, remove is easy , but how can I then properly calculate Indices for this Vertices for Part 1 and part 2 ?

So, for example Vertices ABCD will be discarded because I already have E,G,I,K on that position.
Vertices F H J are correctly stitched (height is interpolated between both sides vertices)

I hope, I'm clear.