Test Strand inside Geometry

Discussions about SOFTIMAGEs© Interactive Creative Environment©
caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Test Strand inside Geometry

Post by caledonian_tartan » 18 Jun 2013, 12:07

hi all
i try to make this compound: Test Strand inside Geometry (and then deleting this point if he has at least one strandposition outside the geometry)

so i took the point in volume and replaced the get pointposition with get strandposition.


how can i get the point ID of a corresponding Strandposition?

is there a way to find out which strandpositions belong to which point id?
SI 2015 @ WIN7-64

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

Re: Test Strand inside Geometry

Post by Mathaeus » 18 Jun 2013, 12:53

'strand point id' , you get this by 'get array subindices'.
Now if there is a 'clean cut' at some point, all strand above this point are on one side, all bellow are on another, you can just convert the Boolean result of 'point in volume', to integer, get array summary - and that's all what you need for "resize array'.
By the way there are two ( I think) compounds in Kristinka Hair, doing a hair cut by geometry in this way, one is by Jonah Friedman of Psyop, second, a bit older, by me. 'kH3 Cut By Geo Volume' or something like. Jonah's compound creates an array of raycasting along tangents, so it has much better precision than mine.

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Re: Test Strand inside Geometry

Post by caledonian_tartan » 18 Jun 2013, 13:25

hey mathaeus
thank you very much. this is great! and working.

i also tried "KH3 Find Cut Point JF" which outputs a scalar. i guess it's the strand ratio where it gets cut.
i just plugged into "multiply" and "kh3 hair length". nice!

btw.: i meant to get the point ID of the point the strands sits on from any of its strandpositions.
the "get array subindices" leads to "strand point id" which won't lead me to it's actual point id.

i this possible, or am i trapped in a brainloop (again)?

again, thanks!
SI 2015 @ WIN7-64

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

Re: Test Strand inside Geometry

Post by Mathaeus » 18 Jun 2013, 13:40

caledonian_tartan wrote:hey mathaeus

btw.: i meant to get the point ID of the point the strands sits on from any of its strandpositions.
the "get array subindices" leads to "strand point id" which won't lead me to it's actual point id.
if I understand correctly (forget me if I missing the point), mentioned "array summary" is already in per point context, so, if value is anything more than zero, there is intersection for some point position. So you can create/set some custom attribute as Boolean (*if* array summary is more than zero...), then use this as criteria after some geo query (get closest points or so).


Regarding scalar output of Jonah's compound, yes I think it's ratio. Both compounds actually rescales strands, keeping the original size of strand array, instead of 'real' cut. It's cleaner way for possible interpolation later, also makes easier life for some renderers.

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Re: Test Strand inside Geometry

Post by caledonian_tartan » 18 Jun 2013, 16:11

cool!

i understand now.

thanks for the tips regarding rendering!
SI 2015 @ WIN7-64