Bummer this doesn't work with merged curves. Guess I didn't get as lucky as I thought :)
On Wed, Dec 12, 2012 at 1:53 PM, Gene Crucean <[email protected]>wrote: > Funny timing. I was just about to start making this and figured I would > search the list "just in case". Whammo. > > Thanks for sharing! > > > On Thu, Nov 29, 2012 at 9:06 AM, javier gonzalez > <[email protected]>wrote: > >> Thanks for share!!! >> >> >> 2012/11/29 Dan Yargici <[email protected]> >> >>> I'd like to share a compound I made at >>> Glassworks<http://www.glassworks.co.uk/>(with >>> some great input from Julian >>> Johnson<http://julianjohnsonsblog.blogspot.com/>) >>> while working on the hair for this: >>> >>> https://www.youtube.com/watch?v=jk0pqhyWLgI >>> >>> It will create strands from curves, but crucially, it can also do it >>> from a group of curves. Curves with subcurves are skipped (for now). >>> >>> It has one crucial problem which I have been unable to solve, and I >>> believe is unsolvable with the current toolset, which I'll explain later. >>> I thought it was useful enough in it's current state to share however >>> (with kind permission from Glassworks <http://www.glassworks.co.uk/>) >>> and hopefully someone out there can prove me wrong! >>> >>> It has an optional Frenet >>> Frame<http://demonstrations.wolfram.com/FrenetFrame/>strand orientation >>> setup (Julian's inspired suggestion - oh the days I lost >>> before learning of this!) so there will never be any flipping in the strand >>> orientations should you need that. It was necessary for this project as we >>> used this compound to create guide strands from curves in order to pull out >>> clumps of hair from a surface and it worked like a charm. It would >>> probably be very slow if you tried to use it on thousands of hairs with >>> hundreds of samples but in the attached scene I have 50 curves, each with >>> 400 samples and it's still relatively snappy. It uses a repeat node to >>> iterate over the orientations - this iterating is the essence of the Frenet >>> Frame method, so it can't be avoided. In the scheme of things, an >>> acceptable overhead if you want to guarantee non-flippiness IMO. If you >>> don't care about orientation, just turn it off! >>> >>> Now on to the bad news... >>> >>> Due to the method I came up with to be able to build the strands from a >>> group, I was forced to use Generate Sample Set - I say forced, it's not in >>> itself undesirable, probably preferred in fact, however, when the Emission >>> Type is set to Point, it will return the point's closest position on the >>> curve not the actual position in space, off the curve of the control point. >>> This means I am unable to fit an exact copy for each curve, only an >>> approximation. If you have very dense curves it's barely noticeable, and >>> if you're using it to generate guides for some other purpose as we were, >>> the deviation is less of an issue; except in very extreme shapes. Despite >>> a great deal of exploration of different methods I have been unable to find >>> one that will both return that elusive PointPosition value of the control >>> points *and* work for a group. I would be *very* happy to learn a way if >>> anyone knows of one! >>> >>> OK, so why do it this way then? >>> >>> - A - We needed to convert to strands because we couldn't rely on >>> closest location to sample from the guide curves directly as we'd get all >>> manner of mess when a guide curve is bent over. If we sample the roots (the >>> points in the pointcloud) we can then pull off all the information we need >>> from the point and also the attribute data along the strand that was >>> transferred from the pset/ICE tree combination on the curve. This way we >>> can also influence it all with property maps. >>> >>> - B - The guide curves held custom parameter sets that contain >>> information about the styling, clumping and radius of influence they had on >>> the hair, this was passed to an ICE tree on each curve to apply these >>> attributes along the curve. This way each guide curve can define a >>> completely different style from the next. If I was to do it again, I would >>> think about implementing the style curves as mini rigs, with manipulators >>> rather than psets. It would be a great thing for someone clever to >>> implement using the interactive tool >>> API<http://xsisupport.com/2011/03/02/a-little-more-about-the-interactive-tool-sdk/>so >>> rig elements wouldn't always be cluttering the viewports. >>> >>> - C - It's way more artist friendly to just duplicate and delete curves >>> and not have to manage updating a merged curve object or adding individual >>> branches into an ICE tree for each curve. >>> >>> This only really touched on we did and what's possible. I hope to clean >>> up and expand this method of styling hair, I feel it can offer a really >>> nice balance between control, speed and simplicity. I've taken all the >>> project specific, hair-related stuff out of the node in order to share it, >>> however that part of it is pretty simple to implement, so if you've >>> understood any of what I was just blathering on about you can add it back >>> in pretty easily. >>> >>> In rare instances you may find your strands get scrambled. If you >>> select all your curves and run Model->Modify->Curve->Clean and set the >>> Tolerance to something tiny, say 0.001, it will set everything straight >>> again. Like I say though, it should be quite rare that you need to do this. >>> >>> I've attached a scene file (2013) and the compound which may work in >>> earlier versions (should be fine as far back as 'Build Array from Set' was >>> introduced... can't remember which version that was) >>> >>> DAN >>> >>> >> > > > -- > Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor / iOS-OSX > Developer / Filmmaker / Photographer > ** *Freelance for hire* ** > www.genecrucean.com > > ~~ Please use my website's contact form on www.genecrucean.com for any > personal emails. Thanks. I may not get them at this address. ~~ > > -- Gene Crucean - Emmy winning - Oscar nominated VFX Supervisor / iOS-OSX Developer / Filmmaker / Photographer ** *Freelance for hire* ** www.genecrucean.com ~~ Please use my website's contact form on www.genecrucean.com for any personal emails. Thanks. I may not get them at this address. ~~

