It is currently 24 May 2013, 21:57

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Strand control basics
PostPosted: 06 Jul 2011, 19:24 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
Hello everybody, this is my first post:)
I hope this is an appropriate place to ask some advice, although i see this forum is mainly populated with great solutions.

I was hoping i could find some more clues about the basics of manipulating strands, sadly i didn't find much on the level that i can actually understand.

What i would like to learn is how to simultaneously:
1) Keep strands' origins updated to the position of the emitter
2) Constrain strands' ends to desired locations
3) Apply turbulence / forces to the segments between, and make the strands behave like strings strung between the origin and the end.
4) Preferably use as little simulation as possible, like artists at Polynoid do, to retain the ability to animate by hand / effectors

I have found bits and pieces of other people's work that do parts of what i would like to achieve but, as i have said before, it's hard to "reverse engineer" them without knowing what to look for. I think some answers i seek are buried here, but it's a monster of an ICEtree:

http://area.autodesk.com/forum/autodesk-softimage/ice---interactive-creative-environment/ice-workshop-cobwebs/

Sorry if i am asking for help with trivial things, but i have spent a lot of time trying to figure it out by myself (and google) with little success.
I am not looking for a ready-to-use solution, but i would really appreciate if someone pointed me in the right direction in terms of planning and methods to look into.

Moderator edit - I changed the "community.softimage" link, that doesn't seem to work anymore into the Area link that was probably intended - HB


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 06 Jul 2011, 20:08 
Offline

Joined: 23 Jun 2009, 21:01
Posts: 242
Strands are basically per-particle arrays of positions. The strands get drawn from each particle to the first position in its array, then the second, etc. You can create strands manually by putting the positions you want in an array and saving it as the StrandPosition attribute.

So:

1. This will not be an issue if you are not using simulation. If you are using simulation, you can reset the particles' positions to the emit location every frame.

2. Set the last element in the StrandPosition array to the desired position.

3. Update the positions in the StrandPosition array based on any inputs you want.

4. You can e.g. jitter positions without simulation by using a turbulence field to modify point positions.

Hope that gives you a good starting point. Good luck!


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 02:09 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
Thanks grahamef! I started looking into arrays, and now i can generate a strand and set / transform positions of individual points, rotate them, change the number of segments, add turbulence to the strand, grow it and such.

However, I have no idea how to apply effects only to a selected range of segments in the array (other than one by one via SetInArray), or weight the influence across the strand.

Should I:
A) Filter the turbulence somehow before setting StrandPositions (maybe by PopFromArray?)
B) Multiply the Array by another one containing weights (based on ID?)
B) Apply turbulence to the whole strand and linearly interpolate the new StrandPositions with the original ones (would still require distributing the weight of the blend)
C) Apply turbulence to the whole strand and then set selected points back using SetInArray (doesn't seem to work, maybe i should have done it on another tree, and it would still require some blending)
D) Or is there some compound that allows to spread values (like turbulence amount) across a strand (array)? Calculate Strand Ratios (+Fcurve?)

Sorry if I'm not making much sense, math isn't my strong side.
Basically i would like to know if i should try to filter StrandPosition changes before setting them (and how), or hammer them back in later in another iteration (ICEtree?)


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 06:17 
Offline

Joined: 09 Jun 2009, 23:47
Posts: 88
I'd go for the fcurve approach. Easy to control and no fancy array manipulations...
not in front of soft now, but should be like:

get strandposition > get array sub indices > normalize it (by dividing or rescaling) > fcurve input

then multiply any effect you want by the fcurve output


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 09:04 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
Thanks Fabricio, this actually worked the way i wanted it to ;] Still, i would like to know more about the array manipulation approach, seams more flexible for more complex things, like the spider web.

I got halfway there with arrays - I managed to filter out the first segment with Get Array Minimum and Find In Array fed into Set in Array and an if statement, but i couldn't get it to work with Get Array Maximum at the same time. No idea how to stack "If's". I doubt it should be done this way though. I'll keep digging.


Attachments:
Strands progress 001.JPG
Strands progress 001.JPG [ 71.73 KiB | Viewed 1041 times ]
Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 11:24 
Offline
User avatar

Joined: 08 Jun 2009, 21:11
Posts: 688
Location: Zagreb, Croatia
jamnique wrote:
Thanks Fabricio, this actually worked the way i wanted it to ;] Still, i would like to know more about the array manipulation approach, seams more flexible for more complex things, like the spider web.

I got halfway there with arrays - I managed to filter out the first segment with Get Array Minimum and Find In Array fed into Set in Array and an if statement, but i couldn't get it to work with Get Array Maximum at the same time. No idea how to stack "If's". I doubt it should be done this way though. I'll keep digging.


Hi there,

The 'array maximum' and 'array minimum' is value, not ID. In case of 3d vectors, if you draw a line from minimum to maximum, it's a some kind of diagonal line in world space. I'm not sure is this exactly what you want. If you want IDs, probably you want 'select in array' using zero and 'get array size' - 1, for first and last ID.

For complex 'If's', there are 'logic' nodes, 'and', 'or', so on. So, one way to isolate the effect of turbulence would be: get strand position> get array sub-indices, if ID is not zero, *and", ID is not array size -1 > add turbulence to strands.

Anyway, I would go in way suggested by Fabricio, even more for complex stuff. A small problem is, that array 're-constructions' , as you did in pictures, in most cases, needs to go to any other strand-related array: strand size, strand velocity, strand color, strand up vector, whatever you have of these.
On another side, 're-mapping' can go just where you want it to appear, and that's all. btw, what I suggested, it's also 're-mapping', not 're-construction'.

Cheers


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 20:47 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
Thanks Mathaeus :) I'm really happy i came here to ask, now i can at least begin to understand some compounds i have been using and learn from them.
Next thing i would like to crack is setting pins on strand segments that can be turned on and off based on constrained strand length or choice, and add some kind of string dynamics.

Two quick questions come to mind now:
1) can i use a gradient instead of an f-curve? Seems more intuitive from the user''s perspective.
2) For scenes that need dynamic approach (string-like behavior) would i be better of using syflex/ lagoa or verlet? I need quite a few "tentacles"

Here's another baby step i have made with your help (and polynoid compounds, which i can finally understand).
The bigger the length between origin and end, the more stretched out the strand is.


Attachments:
strand progress 002.JPG
strand progress 002.JPG [ 77.12 KiB | Viewed 986 times ]
Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 21:36 
Offline
User avatar

Joined: 08 Jun 2009, 21:11
Posts: 688
Location: Zagreb, Croatia
jamnique wrote:
Two quick questions come to mind now:
1) can i use a gradient instead of an f-curve? Seems more intuitive from the user''s perspective.
2) For scenes that need dynamic approach (string-like behavior) would i be better of using syflex/ lagoa or verlet? I need quite a few "tentacles"



1: believe me or not, I've tried the same in my first compounds. It worked, but It was slower than function curve, I guessing because of conversions, 'strand ratio' to color, color back to scalar..... In picture, there is 'smooth step' interpolation, so frequently used in CG - it's not for everything, but it's fast, and you can put everything into sliders.
2. you're owner. Verlet has some nice wavy look, it's easy to control with ICE, also it is a good source for improving the ICE knowledge.

Image


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 07 Jul 2011, 23:16 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
Thanks, i'll look into it tonight. Finally some progress! Thanks guys ;]


Top
 Profile  
 
 Post subject: Re: Strand control basics
PostPosted: 08 Jul 2011, 20:43 
Offline

Joined: 05 Jul 2011, 09:36
Posts: 14
I am thinking about building some kind of spider-legs behavior for my tentacles. The tasks i see ahead:
1) Raycast from the "spider"'s body to get initial legs' positions, filter out points by a radius to delete the ones beneath the body and set initial legs' length (or emit particles with a certain direction only)
2) Store point positions in a custom variable (originalPointPositions), constrain length of the legs
3) Raycast again every Nth frame to find new positions if the body has moved, OR Raycast every frame and make the point positions update every Nth frame
4) Linear Interpolate between original point (and / or strand ?) positions saved N frames ago and new ones to create a transition path for the legs' ends, modified by an Fcurve in y to make the legs go up instead of sliding on the surface

If you don't mind, please let me know what you think.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group