Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

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!


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

Topics I've Started

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:
Attached File  lod_illu.jpg   23.56KB   56 downloads
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 Posted Image, 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.

Many thanks for your responses.