strandchains avoiding each other?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
forton
Posts: 210
Joined: 25 Nov 2011, 16:57

strandchains avoiding each other?

Post by forton » 01 Nov 2012, 00:07

Hi,

I've made an icetree with some strands flowing on a surface's UV's, now i want to check on each new strandposition for the closest strandpositions in the chain of the previous point, so the new chain can avoid touching the last one.
:-?? Is there a way to read data from other points in the same pointcloud, something like "get data: strandpositions @ self.id-1"?
:-?? Is there a simple way to get "closest points" from an array of 3D vectors (strandposition)?

Maybe the first problem lies in the fact that all points are calculated in parallel, at the same time.
Can anyone confirm this?
Is this why the repeat node is so slow, not parallel?
Tips are welcome!

Cheers, Wim

fabricio.chamon
Posts: 94
Joined: 09 Jun 2009, 21:47

Re: strandchains avoiding each other?

Post by fabricio.chamon » 03 Nov 2012, 04:09

Is there a way to read data from other points in the same pointcloud, something like "get data: strandpositions @ self.id-1"?
"id to location node" (id set to self.ID - 1). Then get whatever you need from this location (point position, normal, etc).
...and yes it will run in parallel. Example: say you want to check for each particle (A) wether its closest point (B) is inside a distance range, and being so you want to delete it. As a result you will be deleting A AND B because the evaluation runs in parallel. So you have to workaround that if you don't want a double effect.
Is there a simple way to get "closest points" from an array of 3D vectors (strandposition)?
afaik, no. you have to build/manipulate arrays and do your maths on them.

forton
Posts: 210
Joined: 25 Nov 2011, 16:57

Re: strandchains avoiding each other?

Post by forton » 03 Nov 2012, 07:50

Thanks for the tip,
ID to location is what i need i guess, didn't notice that one yet.
Parallel computing: lots of boobytraps...

Knowing what you're looking for is 90% of the solution...
Found some good reading after googling "object context":
julian johnson:
http://julianjohnsonsblog.blogspot.be/
guillaume laforge:
http://frenchdog.wordpress.com/category/dev/

I'll report the results soon (I hope)
Cheers,
Wim

fabricio.chamon
Posts: 94
Joined: 09 Jun 2009, 21:47

Re: strandchains avoiding each other?

Post by fabricio.chamon » 05 Nov 2012, 12:53

yes, and this one too:

Stephen Blair:
http://xsisupport.com

lots of good stuff.