Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / I know what vertices are... but what are indices?

Author
Message
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 31st Mar 2004 23:03
I've been exploring the .DBO format and one of the sections is "Index Data". What are indices in terms of modelling? Are they something to do with linking the vertices up, cos I can't see any other way in the file format to define how the verts link up. Thanks.

Trying is the first step towards faliure.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 1st Apr 2004 14:07
why they are little mes of course.

Definition: A plural of "index".


as far as an accurate definition im not sure


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Apr 2004 14:34
In DBPro memblocks you currently specify the each point for every triangle, some of which will be duplicated.

When you use an indexed system, you instead specify each unique vertice, and then specify the number of each vertex that you wish to join.

This means that there are less vertices (= less memory) and that there are less 3d transformations during rendering (= faster).

As a simple example, a simple plane has 6 vertices in a DBPro memblock, but with an indexed system you would have 4 vertices and would specify the way that they are joined using the indices (eg 0/1/2, 0/2/3)

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 1st Apr 2004 16:10 Edited at: 1st Apr 2004 16:11
Indices are used when describing your object. For example, a cube consists of 6 polygons. You could make up each polygon by specifying 4 vertices. You would then end up with 24 (6x4) vertices but lots of vertices would be specified more than once.

Now how about only specifying 8 vertices which represent the 8 corners of the cube? You store these vertices in a list, like this:

0. xyz
1. xyz
2. xyz
3. xyz
...
7. xyz

The 0 to 7 are the index values of those vertices. Now you can say, for example, that vertices 0,1,3 and 7 make up one polygon. You're actually sharing (!) your vertices this way. This has two major advantages:

1. It saves a lot of memory (8 vertices instead of 24 in case of a cube!)
2. It's faster! Think about moving a cube. Moving only 8 vertices is of course a lot faster than moving 24. The same goes for almost all other actions.

Hope this helps. Indices are used a lot in DeleD, they're pretty cool.

Use the free 3D modeller DeleD to get skilled in 3d editing! Visit http://www.delgine.com for more info.
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 4th Apr 2004 17:43 Edited at: 4th Apr 2004 17:45
one thing to keep in mind is that most 3D formats also store a normal for each vertex. so with the cube example, sharing vertices between faces means that they also share normals.

a flat-shaded cube will still have 24 vertices (b/c each face's vertices must have a normal pointing out), while a smooth-shaded cube will have only 8 vertices (with a normal sticking out at 45 deg from the corner of the cube).


from my understanding, this is how smoothing groups in programs like milkshape work. when you smooth an area, it averages the normals of adjoining polygons, and then joins them together into a single vertex. when you 'flatten' out an area, it adds vertices with the same position, but different normals.

which means, in theory, smooth shaded models should be most memory efficient

anyway, that's that...

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
22
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 5th Apr 2004 16:48
If I may chip in ...

I imagine deforming meshes is a lot quicker too. If you move an indexed vertex, then other vertices should presumably follow? Instead of having to keep track of indices manually and moving the related vertices....

/me sees a grand plan in TGC's thinking

stop();
hammertime();
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 5th Apr 2004 18:06
If you move a vertice, you're actually deforming multiple polygons at the same time. Think about it: a vertice of a cube is shared by 3 polygons so moving that vertice has a direct influence on those 3 polygons. Other vertices won't follow however.

Use the free 3D modeller DeleD to get skilled in 3d editing! Visit http://www.delgine.com for more info.
adr
22
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 5th Apr 2004 20:04
Quote: "a vertice of a cube is shared by 3 polygons so moving that vertice has a direct influence on those 3 polygons. Other vertices won't follow however"

But if my understanding of indexed vertex definitions is correct, because they're a vertex is defined as sharing it's space with another set of vertices, then surely the rest should move too...

stop();
hammertime();
JeroenNL
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 5th Apr 2004 22:16
Nope. Think about it from a polygons point of view. A corner of a cube is just 1 (!) vertice, not 3. A vertice is not sharing its space with other vertices but... a polygon is sharing a vertice with other polygons.

If you want to see this at work, download DeleD, create a cube, go to vertice mode and move one of the vertices around. You'll see what I mean.

Use the free 3D modeller DeleD to get skilled in 3d editing! Visit http://www.delgine.com for more info.
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 7th Apr 2004 06:53
yeah like I mentioned above, it depends on the model!

if you have several polygons sharing a vertice, then moving that vertice will affect multiple polygons. but if there are actually several vertices in the same spot (most likely with different normals), then onle one vertice will be moved, and your model will have a hole in it!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 7th Apr 2004 07:00
This thread is too serious...So let me interrupt by saying...

PIE!

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!

Login to post a reply

Server time is: 2025-06-30 06:49:09
Your offset time is: 2025-06-30 06:49:09