Create Strands from a group of seperate nurbs curves
-
theKos
- Posts: 7
- Joined: 02 Jul 2010, 17:59
Create Strands from a group of seperate nurbs curves
I'm trying to create strands from a group of nurbs curves. I have a hair setup styled in another package and I just want to use ice to animated the strands. The create strands from curve compound only works with one curve per input not a group of curves. That compound uses the get location from uv and doesn't support grouped geometry. So then I'd have to make a script to connect each curve into the node. Which is pretty tedious when dealing with 100s of curves. I've got a compound that uses a repeat node that can go through the groups and creates a strand from each curve. However when I get the point position of each nurbs curve they're not position correctly in the ice tree and really I'd like to sample the curve and create as many segments as I see fit. What I'd really like to do is to be able to loop through a geometry group like an array and use the shipped create strands from curve compound. Does anyone know how to loop through a group like an array in ice and retain a geometry source context? Or has anyone successfully been able to create strands from a group of nurbs curves in another manner.
-
Mathaeus
- Posts: 1778
- Joined: 08 Jun 2009, 19:11
- Location: Zagreb, Croatia
Re: Create Strands from a group of seperate nurbs curves
So curve list (merged curves) isn't allowed.... If so, I think you can get point positions from group of curves, and isolate the ones at zero U. Let's say, get PointPosition and pointU from group, use FindInArray to take zero PointU, "index array' from FindInArray to SelectInArray of point positions, plug this in AddPoint node.
Once you have points on zero U of each curve, you can get U of curves by Get Closest Location or something, and spread the strand position array along curves.
I think this should work. Could be faster than loop.
P.S. or you can't....
, now I have no idea how to get entire U for strand array in this way... Maybe by re-creating curves. Not easy to "cheat" the UV to location 
Once you have points on zero U of each curve, you can get U of curves by Get Closest Location or something, and spread the strand position array along curves.
I think this should work. Could be faster than loop.
P.S. or you can't....
-
theKos
- Posts: 7
- Joined: 02 Jul 2010, 17:59
Re: Create Strands from a group of seperate nurbs curves
Yeah that's my problem I can't get a u location on the curve because I can't access the individual curves I can get the first point of each curve and point position. However they don't seem to to match up and I can never get a point at the end of the curve. I thought maybe I could linear interpolate like your suggest but I can't find and attribute that will give me access to the end location. I attach the current compound and what I'm getting. Thanks for the help.
You do not have the required permissions to view the files attached to this post.
-
Mathaeus
- Posts: 1778
- Joined: 08 Jun 2009, 19:11
- Location: Zagreb, Croatia
Re: Create Strands from a group of seperate nurbs curves
I know you know that... using just one curve with many sub-curves, gives a much easier life. I think Melena already has one emitter from curve list.
Maybe there is some another way to spread strands from group of curves. Anyway, if there is a plan to build some complex structure on this, I'd checkout how this works when you have a repeat node so early in evaluation chain. May be a good surprise, may not. Somehow I've learned to avoid the repeat node.
Maybe there is some another way to spread strands from group of curves. Anyway, if there is a plan to build some complex structure on this, I'd checkout how this works when you have a repeat node so early in evaluation chain. May be a good surprise, may not. Somehow I've learned to avoid the repeat node.
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Create Strands from a group of seperate nurbs curves
Did you succeed with transforming the curves? Need to do the same thing and wonder about your solution.
Cheers
Thomas
Cheers
Thomas
-
theKos
- Posts: 7
- Joined: 02 Jul 2010, 17:59
Re: Create Strands from a group of seperate nurbs curves
If you use a script to merge your curves into one curve list you could maybe do it. I decided to use syflex curve op in ice to animate the hair so I stopped trying to get it to work. Syflex in ice has a better curve dynamic than the built in verlet framerwork. Once the separate splines were merged into one curve-list they were easier to manage.
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Create Strands from a group of seperate nurbs curves
So, I used the script and end up with a merged curvelist. In Melena there is a compound to generate strands from curvelists. Task done!!!
-
theKos
- Posts: 7
- Joined: 02 Jul 2010, 17:59
Re: Create Strands from a group of seperate nurbs curves
Awesome, I've been looking for Melenda do you know where to download it.? Also thanks Mathaeus for the helping me get on track with this.
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Create Strands from a group of seperate nurbs curves
rray.de
You need to scroll down, so that the page loads further plug ins and compounds. Than with "find" you'll get lucky.
You need to scroll down, so that the page loads further plug ins and compounds. Than with "find" you'll get lucky.