Polygon Indicies

Hello,

I'm having some issues with dynamic textures with a 3D engine so I need to be able to set the polygon number for each face. Not the mat ID. I'm talking about the number that gets assigned by max and is displayed as text in the selection rollout in the Edit Poly modifier. So when you select a face/polygon, this text dynamically changes to tell you that you have Polygon 5 Selected or in the case of multiple faces, it says 2 polygons Selected.

I posted this question on Maxforums.org and was told by a helpful 'Garp' that "the polygon indices are not assigned. They are part of the mesh definition. Internally, the polygons are stored in an array and their index is their position in it. So to 'swap' two polys, you'd need a script to access the array and change the definitions locally."

He then mentioned that the script should be fairly simple and that I could ask on scriptspot.

Anyone know a way to do this, and might be interested in giving it a shot?

Thanks in advance,
Lisa

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
preciousSTONE's picture

.

Garp over on Maxforums.org managed to help me out guys!

He wrote a script that swaps the polygon indices and it works like a charm.
When used in conjunction with your script barigazy, it's absolutely perfect!

preciousSTONE's picture

Hi barigazy, thanks so much

Hi barigazy, thanks so much for doing this!

What I need to be able to do is change the indicies however. So for example, I need to be able to change poly 4 to poly 5.

But this script you've written will already be invaluable in showing me where the problem I'm having is. I just need to be able to change the indicies if that's possible.

Thanks so much for your help!

barigazy's picture

...

Thanks Kostadind for the explanation. :)

barigazy

miauu's picture

.

You can't change the indices of the polygons, edges or vertices.
The script can show them, but you can't change them.
You have to rebuild the whole mesh vert by vert to be able to set the index of certain vert/edge/poly as you want it.

preciousSTONE's picture

.

Sad to hear it can't happen but thanks for the swift reply, miauu!

By the way, I bought your Script Pack v2 the other day. Quad Cap Holes and Align Verts to Verts have been invaluable. Thank you!

miauu's picture

.

I have an update to Quad Cap Holes, that will give you new type of cap topology, much more "organic" than the current cap topology. Will be released as soon as possible. :)

preciousSTONE's picture

.

Very exciting! Can't wait to try it out :)

barigazy's picture

...

U can find script HERE

barigazy

barigazy's picture

...

Something like this you want?

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.