0
$\begingroup$

I want to relocate faces of a mesh to the spline's points, which are extracted from hair particles. Face should be placed only at the end of spline, except some strands, where I want to have another face in the middle.

For this I made a loop to apply mask to extracted points:

enter image description here

  • Red outline - specific strands with 2 faces (defined by index)
  • Green outline - compare logic

Problem is that I need to specify more strands (from bigger project), and don't want to replicate outlined parts of nodetree for each strand. Like excluding of 300 strands means 300 inputs. There should be more optimized way to do it

$\endgroup$

2 Answers 2

2
$\begingroup$

You can use a boolean list as an iterator to switch between a list with only the end point and a list with a center point appended:

Node Tree

Of course you can also define the condition by the index of the spline. To do so, you can generate the boolean list as follows:

Node Tree

You start with a boolean list of Trues and turn the elements at the input indices to Falses. The parameter boolean list should be reassigned and used as an output.

$\endgroup$
0
$\begingroup$

Using "Expression node" in Omar's answer helped me a lot (haven't used it before). But ended up with this tree:

enter image description here

Expression node in Left-bottom corner is a list of specific particles (just a line without many inputs). Next Expression nodes compare Initial ID list with Specific and turns every ID to 0 of those particles, which are not present in Specific list.

$\endgroup$
1
  • $\begingroup$ Please accept the answer if it answers your question. $\endgroup$
    – Omar Emara
    Dec 23, 2018 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .