julian johnson Posted October 14, 2016 Share Posted October 14, 2016 (edited) I noticed a couple of clever tricks in recent sample scenes/tutorials both of which involved calling vex functions with either @P or @primnum in the 'wrong' mode e.g. In Primitive Mode: addpoint(0,@P); In Point Mode: removeprim(0,@primnum,1); In the first case it looks like the primitive calls the average of all the point positions associated with the primitive whilst in the second case the function successfully identifies the primitive connected to the point and deletes it although, I imagine, only because the primitives have been uniqued. I couldn't find any documentation on this behaviour or on what would happen if say, in the second case, the primitives were not unique i.e what primitive number would get returned on a point calling @primnum that had multiple polygons attached? Just wondering if it's safe to 'rely' on these methods or if they're likely to change i.e. might it be just as valid for addpoint(0,@P) to return the position of the first point on the primitive rather than the average? Edited October 14, 2016 by julian johnson Quote Link to comment Share on other sites More sharing options...
Atom Posted October 14, 2016 Share Posted October 14, 2016 For the point mode case you could always just assign @primnum to an attribute so you could observe the result of making them unique in the Geometry Spreadsheet. When I did this it does look like @primnum is reliably set to the current associated point for that primitive. @view_primnum = @primnum; Quote Link to comment Share on other sites More sharing options...
julian johnson Posted October 17, 2016 Author Share Posted October 17, 2016 Thanks Atom. Makes sense.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.