Can i get index of oposite vertex?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
wesserbro
Posts: 177
Joined: 27 Oct 2012, 16:05

Can i get index of oposite vertex?

Post by wesserbro » 30 Jun 2015, 17:25

Hi! I'm trying to get the index of the opposite vertex on the same mesh and have no luck so far.
Left side (-X) is original, right (+X) is opposite:
si_comm1.gif
- First I take vertex position of a -X side of a mesh only (filtering: keep if pos.x < 0)
- invert this position (Multiply pos.x by -1)
- feed it to "Get Closest Point" to get opposite point
-"Get Closest Point" returns positive side location values
-but "Get Element Index" returns indexes of the original -X side, not the opposite +X.

I can't figure out whats the problem, why it returns original indices... Any suggestions?
You do not have the required permissions to view the files attached to this post.

User avatar
rray
Moderator
Posts: 1810
Joined: 26 Sep 2009, 13:51
Location: Bonn, Germany

Re: Can i get index of oposite vertex?

Post by rray » 30 Jun 2015, 18:44

Hi, you're almost there! Just explode the get vertex index compound that you already have, and then plug the location coming out of get closest location into its source input

I was wondering if it's possible to use ICE to write to a symmetry map.

-rr
softimage resources section updated Sep 26th 2026

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Can i get index of oposite vertex?

Post by Mathaeus » 30 Jun 2015, 19:01

If Rray's suggestion doesn't help, I'd try to avoid 'in advance' filtering. I'd believe ICE in this case, wants to have both sides 'exposed' for getting the data. In 'ICE mind', should be enough to apply filter later, in final. Sometimes, 'filter' or 'if' have habit to disable something you don't want - while 'linear interpolate', even with full or zero weight, keeps the all processed data.

Here's screenshot of something similar, this is 'fix symmetry' operator. It aligns positions from one side to another, following indices of SI Symmetry Map property. Structure is a bit old school, in XSI 7.1 fashion, but I think it could be example of 'always working' solution.

wesserbro
Posts: 177
Joined: 27 Oct 2012, 16:05

Re: Can i get index of oposite vertex?

Post by wesserbro » 01 Jul 2015, 01:03

Yeah, rray, it works! ) Thanks!
Mathaeus, i was going to recreate blender's X-mirror option, i think its the same as your "fix symmetry" :)
I wanted to store pairs of correspondent indexes to array in first ICE tree under modeling, and then in second ICE tree maybe under secondary shape i was going to use it as you use symmetry map. Or maybe it could work in one ice tree just catching small changes in shape (small enough to determine its still the opposite vertex), depending on how frequent ice tree is evaluating.

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 15:59

Re: Can i get index of oposite vertex?

Post by mattmos » 01 Jul 2015, 08:48

There's a nice example here, can't remember if its an open compound or not to learn from, but its saved my ass a few times when symmetrical modelling has gone astray.

https://vimeo.com/69204747

wesserbro
Posts: 177
Joined: 27 Oct 2012, 16:05

Re: Can i get index of oposite vertex?

Post by wesserbro » 01 Jul 2015, 11:14

mattmos, very useful tool, thanks!
------------------
I still wonder if its possible to write point position to model itself?
si_comm2.gif
Mathaeus method with symmetry map is good, but if we can write to actual model, but not only in top of a stack it could be also possible to create some sculpting compound and other interesting things.
You do not have the required permissions to view the files attached to this post.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Can i get index of oposite vertex?

Post by Mathaeus » 01 Jul 2015, 12:04

wesserbro wrote:, but if we can write to actual model, but not only in top of a stack it could be also possible to create some sculpting compound and other interesting things.
Forget me in advance if I missed the point. Anyway: as long as you're using non-simulated ICE tree, it behaves as any other modeling operator. You can have it bellow your topology editing - in this case, value of attribute created by ICE tree, is interpolated by topology change - however, I think it's always 'safer' to write to some SI property, like weight map.
This small symmetry fixer is supposed to be used above manual tweaking in stack, let's say in animation region, as an ''post process'' - because SI symmetry does not cover the all non-topology changes (like smooth operator, or so). In similar way, it's possible to use the standard SI Shrink Wrap operator to get the basic re - topo functionality.

wesserbro
Posts: 177
Joined: 27 Oct 2012, 16:05

Re: Can i get index of oposite vertex?

Post by wesserbro » 01 Jul 2015, 13:02

Mathaeus wrote:In similar way, it's possible to use the standard SI Shrink Wrap operator to get the basic re - topo functionality.
Yep, i know about ShrinkWrap, and some symmetry scripts out there, but...
I mostly ask all this to get more clear understanding of how ICE works, not that i need more advanced retopo or sculpting in SI so much. My modelling app is blender and it has pretty much all i need for modelling and character animation (but its amatorish GUI makes me cry :) ). I just like the idea, that you can build your own tools with ease, and i like SI, although i dont know it well and never used it for my professional work.
------------------------------
back to my x-mirror compound... Yeah, now i understand that if my ICE tree is on top of the stack i should write to custom properties, or maybe to shape keys to get interactive feedback.
Imagine, we have original fully symmetrical model,
Then you drag right side vertex. In one evaluation frame (not animation frame) it moves 0,1 unit. ICE tree with epsilon > 0.1 still can identify correspondence between left and right vertices. So it catches this move, modify position of a left vertex, store it to the bottom of the stack so on the next iteration (while you are still dragging right vertex) it could catch correspondence with the same epsilon 0.1. If we do not store changes which ICE tree did to the bottom of the stack, on each iteration delta between left and right side become greater than epsilon, and we can not identify two vertices as symmetrical no more.

P.S. Damn, i should get some camtasia and a mic ))

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Can i get index of oposite vertex?

Post by Mathaeus » 01 Jul 2015, 13:27

wesserbro wrote: Imagine, we have original fully symmetrical model,
Then you drag right side vertex. In one evaluation frame (not animation frame) it moves 0,1 unit. ICE tree with epsilon > 0.1 still can identify correspondence between left and right vertices. So it catches this move, modify position of a left vertex, store it to the bottom of the stack so on the next iteration (while you are still dragging right vertex) it could catch correspondence with the same epsilon 0.1. If we do not store changes which ICE tree did to the bottom of the stack, on each iteration delta between left and right side become greater than epsilon, and we can not identify two vertices as symmetrical no more.
I think this is called simulation in SI - where result of actual frame is based on previous one. But, yeah, it's based on, what you said, animation frame, not evaluation one. Don't believe there's feasible way to get the custom implementation - even it exist on some levels, like in IK solvers, for example.

wesserbro
Posts: 177
Joined: 27 Oct 2012, 16:05

Re: Can i get index of oposite vertex?

Post by wesserbro » 01 Jul 2015, 13:37

Mathaeus, i like how you are able to get the point from that mishmash i write ))