Re: ICE: Get Polygon (or whatever) by ID

2013-05-09 Thread Peter Agg
So if a quad is (0,0),(0,1),(1,1),(1,0) what would a n-gon be?

A triangle would be (0,0),(0,1),(1,1)? What would a polygon with 5 vertexes
have?


On 9 May 2013 14:09, Thomas Volkmann li...@thomasvolkmann.com wrote:

 **
  Hi,
  we found a working solution to a current problem (set UV per Polygon),
 but I'm not fully satisfied with it, because it breaks when we have
 triangles in the mesh (which we can avoid, so it's more a personal problem
 of not being able to do what I want to do in ICE).

  Problem:
  We want to set a vector per node. Depending on the index of that node
 when using a PolygonToNodes it will be at (0,0),(0,1),(1,1) or (1,0) in
 UV-space.

  Solution for Quads only:
  GetNodeID - find in array
  the array:
  Get PolygonToNodes - build array from set
  we modulo the index by 4, and no we know, if this Node is 0,1,2 or 3

  This solution breaks of course when there is a single polygon that has
 more or less than 4 points.

  What I would like to do but can't figure out:
  Get NodeToPolygon  (because we need to be in a perNode context)
  Use the PolygonID that I get this way, and get PolygonToNodes for that
 Poly (how the fxxk do I do that?) THAT IS PROBABLY THE MAIN QUESTION!
  Then I could check which index the Node has that I got in the beginning.

  Unfortunately I have some real work to do, and can't continue on this
 right now, but in the back of my head it's driving me mad.
  So if anyone can offer salvation it'll be much appreciated! Even if it's
 a complete different solution)

  cheers,
  Thomas



Re: ICE: Get Polygon (or whatever) by ID

2013-05-09 Thread Thomas Volkmann
You can probably see how much vertices a polygon has and then interpolate around
the UV-space, but the problem is more the general question, since we have a
working solution for our  needs.

cheers,
Thomas

 Peter Agg peter@googlemail.com hat am 9. Mai 2013 um 15:19 geschrieben:
 
  So if a quad is (0,0),(0,1),(1,1),(1,0) what would a n-gon be?
 
  A triangle would be (0,0),(0,1),(1,1)? What would a polygon with 5 vertexes
 have?
 
 
  On 9 May 2013 14:09, Thomas Volkmann li...@thomasvolkmann.com
 mailto:li...@thomasvolkmann.com  wrote:
 Hi,
 we found a working solution to a current problem (set UV per Polygon),
  but I'm not fully satisfied with it, because it breaks when we have
  triangles in the mesh (which we can avoid, so it's more a personal problem
  of not being able to do what I want to do in ICE).
  
 Problem:
 We want to set a vector per node. Depending on the index of that node
  when using a PolygonToNodes it will be at (0,0),(0,1),(1,1) or (1,0) in
  UV-space.
  
 Solution for Quads only:
 GetNodeID - find in array
 the array:
 Get PolygonToNodes - build array from set
 we modulo the index by 4, and no we know, if this Node is 0,1,2 or 3
  
 This solution breaks of course when there is a single polygon that has
  more or less than 4 points.
  
 What I would like to do but can't figure out:
 Get NodeToPolygon  (because we need to be in a perNode context)
 Use the PolygonID that I get this way, and get PolygonToNodes for that
  Poly (how the fxxk do I do that?) THAT IS PROBABLY THE MAIN QUESTION!
 Then I could check which index the Node has that I got in the beginning.
  
 Unfortunately I have some real work to do, and can't continue on this
  right now, but in the back of my head it's driving me mad.
 So if anyone can offer salvation it'll be much appreciated! Even if it's
  a complete different solution)
  
 cheers,
 Thomas




Re: ICE: Get Polygon (or whatever) by ID

2013-05-09 Thread Thomas Volkmann

 
  
 
 
  
   Thanks Fabricio, I dont have time to test it right now. From the look of it I would think that we are in a perPolygon context and not perNode. But Ill check if that gets me somewhere. It definitely helps to see different approaches!
   
  
   
   
  
   thanks,
   
  
   Thomas
   
  
   Fabricio Chamon xsiml...@gmail.com hat am 9. Mai 2013 um 15:51 geschrieben:
   



 
 Use the PolygonID that I get this way, and get PolygonToNodes for that Poly (how the fxxk do I do that?)
 

 
 responding to the main question only, does this icetree work ? 

 desired node index range should be: 0 to (num vertices for that polygon -1) 
 
  
  
 
  
  
 

   

 

 2013/5/9 Thomas Volkmann 
 li...@thomasvolkmann.com
  
 
   
   


 You can probably see how much vertices a polygon has and then interpolate around the UV-space, but the problem is more the general question, since we have a working solution for our needs.
 

 
 

 cheers,
 

 Thomas
 

   
Peter Agg 
peter@googlemail.com hat am 9. Mai 2013 um 15:19 geschrieben: 
 
 
 
   
  
   So if a quad is (0,0),(0,1),(1,1),(1,0) what would a n-gon be? 

   A triangle would be (0,0),(0,1),(1,1)? What would a polygon with 5 vertexes have?
   
  


   
On 9 May 2013 14:09, Thomas Volkmann 
li...@thomasvolkmann.com wrote: 
 

  
  
  
   Hi,
   
  
   we found a working solution to a current problem (set UV per Polygon), but Im not fully satisfied with it, because it breaks when we have triangles in the mesh (which we can avoid, so its more a personal problem of not being able to do what I want to do in ICE).
   
  
   
   
  
   Problem:
   
  
   We want to set a vector per node. Depending on the index of that node when using a PolygonToNodes it will be at (0,0),(0,1),(1,1) or (1,0) in UV-space.
   
  
   
   
  
   Solution for Quads only:
   
  
   GetNodeID - find in array
   
  
   the array:
   
  
   Get PolygonToNodes - build array from set
   
  
   we modulo the index by 4, and no we know, if this Node is 0,1,2 or 3
   
  
   
   
  
   This solution breaks of course when there is a single polygon that has more or less than 4 points.
   
  
   
   
  
   What I would like to do but cant figure out:
   
  
   Get NodeToPolygon (because we need to be in a perNode context)
   
  
   Use the PolygonID that I get this way, and get PolygonToNodes for that Poly (how the fxxk do I do that?) THAT IS PROBABLY THE MAIN QUESTION!
   
  
   Then I could check which index the Node has that I got in the beginning.
   
  
   
   
  
   Unfortunately I have some real work to do, and cant continue on this right now, but in the back of my head its driving me mad.
   
  
   So if anyone can offer salvation itll be much appreciated! Even if its a complete different solution)
   
  
   
   
  
   cheers,
   
  
   Thomas
   
  
 

   
  
 

   


   
  
 

   
  
   
  
 


Re: ICE: Get Polygon (or whatever) by ID

2013-05-09 Thread Stephen Blair

Hey gray
I don't see any of the images you post. Not even in IE or Chrome when I 
go to the Google group.
I just see a winmail.dat attachment...are you sending in RTF format 
(just a guess as to why this happens) ?


On 09/05/2013 11:28 AM, Grahame Fuller wrote:

Is this what you want?

[cid:image001.jpg@01CE4CA8.5D485040]

gray




RE: ICE: Get Polygon (or whatever) by ID

2013-05-09 Thread Thomas Volkmann
Now that I see it, I feel so embarrassed that I had to ask :/
Thanks a ton Grahame!

cheers,
Thomas

 Grahame Fuller grahame.ful...@autodesk.com hat am 9. Mai 2013 um 17:28
 geschrieben:


 Is this what you want?

 [cid:image001.jpg@01CE4CA8.5D485040]

 gray

 From: softimage-boun...@listproc.autodesk.com
 [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Thomas Volkmann
 Sent: Thursday, May 09, 2013 10:34 AM
 To: softimage@listproc.autodesk.com
 Subject: Re: ICE: Get Polygon (or whatever) by ID

 some pseudocode (maybe that's easiest to describe what i want):

 for node on mesh:
 poly = node.getPolygon()
 nodes = poly.GetNodes()
 index = nodes.index(node)
 node.StoreSomeAttribute(doSomethingWith(index))

 Fabricio Chamon xsiml...@gmail.commailto:xsiml...@gmail.com hat am 9. Mai
 2013 um 15:51 geschrieben:
  Use the PolygonID that I get this way, and get PolygonToNodes for that Poly
 (how the fxxk do I do that?)

 responding to the main question only, does this icetree work ?
 desired node index range should be: 0 to (num vertices for that polygon -1)

 [Imagem inline 1]

 2013/5/9 Thomas Volkmann
 li...@thomasvolkmann.commailto:li...@thomasvolkmann.com
 You can probably see how much vertices a polygon has and then interpolate
 around the UV-space, but the problem is more the general question, since we
 have a working solution for our needs.

 cheers,
 Thomas
 Peter Agg  peter@googlemail.commailto:peter@googlemail.com hat am
 9. Mai 2013 um 15:19 geschrieben:

 So if a quad is (0,0),(0,1),(1,1),(1,0) what would a n-gon be?

 A triangle would be (0,0),(0,1),(1,1)? What would a polygon with 5 vertexes
 have?

 On 9 May 2013 14:09, Thomas Volkmann
 li...@thomasvolkmann.commailto:li...@thomasvolkmann.com wrote:
 Hi,
 we found a working solution to a current problem (set UV per Polygon), but I'm
 not fully satisfied with it, because it breaks when we have triangles in the
 mesh (which we can avoid, so it's more a personal problem of not being able to
 do what I want to do in ICE).

 Problem:
 We want to set a vector per node. Depending on the index of that node when
 using a PolygonToNodes it will be at (0,0),(0,1),(1,1) or (1,0) in UV-space.

 Solution for Quads only:
 GetNodeID - find in array
 the array:
 Get PolygonToNodes - build array from set
 we modulo the index by 4, and no we know, if this Node is 0,1,2 or 3

 This solution breaks of course when there is a single polygon that has more or
 less than 4 points.

 What I would like to do but can't figure out:
 Get NodeToPolygon (because we need to be in a perNode context)
 Use the PolygonID that I get this way, and get PolygonToNodes for that Poly
 (how the fxxk do I do that?) THAT IS PROBABLY THE MAIN QUESTION!
 Then I could check which index the Node has that I got in the beginning.

 Unfortunately I have some real work to do, and can't continue on this right
 now, but in the back of my head it's driving me mad.
 So if anyone can offer salvation it'll be much appreciated! Even if it's a
 complete different solution)

 cheers,
 Thomas