Kristinka Hair 2.0

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 24 Aug 2010, 23:48

izze wrote:Thanks a ton!
Also, I assume this will not break anything by doing this. I have 55 curves attached so far and it still seems fine.
Thanks.
Well this will not break anything, but can make things slower, much slower than 55 times. To find which curve belong to point (hair root), compound compares the UV distance between point itself and first point on curve - and 'plain' 'Sort Array With Key' node is used here. In case compound is used with guides, and allowed 8 curves, this is about 300-500 guides * 8 - not that much. But, if higher numbers are used, number of calculations is multiplied. At some point (especially with huge number of hairs), I'm afraid the calculation may take forever.

If you're using multiple compounds, one after another, calculations are split to nodes - a bit better, but not enough.

So I think the best way for such number of curves, is to merge all curves into the one, and create a separate, simple point cloud that contains only points, on first points on curves (that's allow using of much faster 'Get Closest Location' node, which uses a lot of ICE magic, and will stop with searching when target is found, calculation is almost 1*1). I had a compound that works in this way (actually, 'Emit Hair' is something like that), but didn't want to bother people with yet another point cloud, used only for searching.

Also, if only curves are used, creating vectors for later deformations (curls,bend) is a risky business, in some cases everything is nice, in some other cases, deformations become weird.

Anyway, I hope I'll post a working example tomorrow (here's late evening, now).

For merging multiple curves into one, I'm using a good old script by.... Ciaran Moloney - probably you can find this script, or something similar, somewhere on internet.

Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 25 Aug 2010, 00:11

Thanks for the info. I will work on that.

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 25 Aug 2010, 01:36

Model with compounds is here. You can just export compounds. When changing a merged curve with another one, possibly good idea is to first disconnect both compounds from main ICE node (node on 'target' point cloud, and 'follow curvelist' node). 'Follow CurveList' is a modification of 'Follow Curve'. There is about 80 subcurves, merged into one.

Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 25 Aug 2010, 19:18

Hey Mathaeus, I was working with follow nurbs m, and was wondering if it would be easy to have the strands that follow the nurb become a different color then the ones that are not? I sure you don't want to keep updating these compounds, so feel free to say no. :)

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 25 Aug 2010, 22:53

well If you're already in inside-compound-business :) - you can add a few nodes, like in screen shot. That will give a different, fully saturated color, per each NURBS - or a bit more pleasant color, by using gradient node, instead of 'HSVA to Color'. If you want just a color-per-node, plug 'is active' into the 'if' node, then 'set data' with Self.Color into 'true'.

Screen shot

Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 25 Aug 2010, 23:11

I'm going to see if I can get that working now. Thanks again!

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 26 Aug 2010, 16:17

That worked great. This will really help when layering a lot of nurbs surfaces. I can upload the compound if it would help anyone else. (I was not sure if I could do that since this is Anto's project really)

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 26 Aug 2010, 21:59

Nice that you got it to work !

Modifications and additions are always welcome. Anyway, for a whole set of nodes, I trying to keep the system as much consistent. Probably this can be done with a separate node for everything in ICE tree - I'll check out this.

Cheers

User avatar
steven07
Posts: 89
Joined: 03 Jun 2010, 07:30
Skype: stevenpalomino
Location: Kansas City

kristinka Hair

Post by steven07 » 17 Sep 2010, 13:15

Hey all..

I just did a few tests with the kristinka hair system and I think I'm totally missing something.. this is with about 100,000 hairs.. it took somewhere from 10-15 minutes with the hairFromFur compound..

Is it even possible to emit hair from a polygon? it kept telling me I needed a nurbs surface.. I tried to follow along with the tuts but I think I'm just missing something.. a step-by-step would be awesome.. looks like this system has definite advantages over the default XSI one. Thanks again!
Attachments
testPPGz.jpg
testPPGz.jpg (232.28 KiB) Viewed 2080 times
hairTest01.jpg
hairTest01.jpg (199.51 KiB) Viewed 2081 times

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

Re: kristinka Hair

Post by Mathaeus » 17 Sep 2010, 15:30

Hi there,

the compound in screen shot, looks like the one from older versions - and ICE tree doesn't seem to have everything to work properly.
It would be nice to use the last pack, and take look at fur samples. Only for latest version I wrote documentation.

With kH nodes, only fur or short hair can be emitted from polygons. It isn't possible to use styling nodes for long hair. Also, mesh need to be specially prepared for emission - this is mainly for keeping the correct behavior with deformations on mesh, and allowing at least 'faked' functionality of NURBS surfaces.

Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 21 Sep 2010, 02:35

I don't remember if you have explained this already, but why is it that guides cannot be emitted from a polygon mesh? Obviously the kH Init MeshUV Emitter only prepares it for fur and not guides. But I guess I don't understand why that is exactly. Is it a limitation of strands? Thanks.
Last edited by izze on 21 Sep 2010, 14:35, edited 1 time in total.

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 21 Sep 2010, 10:09

izze wrote:I don't remember if you have explained this already, but why is it that guides cannot be emitted from a polygon mesh? Obviously the kH Init MeshUV Emitter only prepares it for fur and nhttp://www.si-community.com/community/posting.php?mode=quote&f=19&p=6485ot guides. But I guess I don't understand why that is exactly. Is it a limitation of strands? Thanks.
Actually, what is called 'emit fur' is a equivalent of 'emit guides' - so if you try to use kH Follow NURBS in ICE tree that starts with kH Emit Fur, it might work - even I'm not sure I've provided that compatibility for everything (but I'll check out this).

What definitively won't work with the latest release, is a filler point cloud (Kh emit Hair and that stuff), after Point Cloud that starts with kH Emit Fur.

About limitations.... it's always a compromise, what someone wants and what is a price...
Current configurations for geometry emitters, should provide a stable emission, even with deformed emitters in non-simulated ICE tree. Next task is a unique emitter's UV space inside 0-1 unit (that allows using of function curves instead of weight maps, and some other nice features). And another task is a well defined orientation (instead of using tangent maps). - All that in single ICE tree and just one emitting geometry, using only the factory ICE nodes.


Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 21 Sep 2010, 14:48

Thanks for the reply Anto. I thought of using follow nurbs with emit fur last night but it did not work. There is a problem with the kH_StartFromRoot not being initialized on the pointcloud. Sorry I can only report errors and not fix them. I will try what I can though. :)

I think the community would use more of Kristinka if it was possible to use more polygon meshes. But I understand why it requires nurbs. And really, its not that hard to use nurbs with how Kh is currently setup. You have made it very easy.

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 21 Sep 2010, 16:49

izze wrote:Thanks for the reply Anto. I thought of using follow nurbs with emit fur last night but it did not work. There is a problem with the kH_StartFromRoot not being initialized on the pointcloud. Sorry I can only report errors and not fix them. I will try what I can though. :)

I think the community would use more of Kristinka if it was possible to use more polygon meshes. But I understand why it requires nurbs. And really, its not that hard to use nurbs with how Kh is currently setup. You have made it very easy.

Well if I'll care what community is thinking, I won't be XSI user :)

Let's go back to topic - for that single attribute, it just need to be set to 'false' somewhere before kH Follow NURBS - but for anything serious, I really need to check out a whole set of nodes - and even that won't be enough for full compatibility. Just personally, I would like to avoid meshes at all - but maybe it's just me...

It shouldn't take a more than one evening to check out all, put a few of new nodes that are already posted in this thread. I hope I'll find the time for that in near future.

Cheers

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: Kristinka Hair 2.0

Post by izze » 21 Sep 2010, 21:05

That seems to work. But now of course other problems present them self. I'm going to see how bad I can break these nodes :P

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

Re: Kristinka Hair 2.0

Post by Mathaeus » 25 Sep 2010, 01:36

Hi all,

here is download for Kristinka Hair 2.1

What's new:

Fixes and improvements:
- now it's possible to use all modifiers, also 'form' nodes, in ICE tree that starts with kH Emit Fur node.
- simplified interface for using the alternative strand arrays on kH Follow NURBS nodes (inputs for kH Offset Curves)
- simplified interface for using strand arrays on kH Emit Fur and kH Fur From NURBS: if nothing is plugged, node will emit 'default' strands along emitter's normals

New nodes:

kH2 Emit Simple Hair:
Simplified emitter node that emits points and strands from mesh. Mesh need to have only the non-overlapping UV projection. There are limitations too: deformations on mesh will cause unstable emission, points will 'jumping' through polygons. Only SRT on emitter have a sense in animation. Also, it's not possible to use hair filler after Point Cloud that starts with this node (kH Emit Hair and that stuff).
There is a new sample model with setup, called 'Simple-Hair'.

kH2 Display Hair Splitting:
Old utility node, but now node can set colors, using IDs created by form nodes.

kH2 Follow NURBS 2:
Version of Follow NURBS that interpolates strands in between two NURBS surfaces, instead of distribution along normals of second NURBS surface. Node is already posted in this thread.

KH2 Cut By Geometry:
Cuts the strand that are outside of volume of control mesh. Node is already posted here.


There is a lot of changes inside compounds, mainly to allow compatibility between modifiers and kH Emit Fur, so for using this pack, don't forget to copy all new nodes in folder where kH nodes already are.


Cheers

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests