It is currently 25 May 2013, 03:37

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Ice not taking in value from variable
PostPosted: 28 Jun 2012, 12:15 
Offline

Joined: 10 Jun 2009, 13:26
Posts: 50
Hi,

I have a non-simulated icetree creating strands.

Each particle has a variable determing which index in a 3d vector array will be used for its position. I then want to use the indexes (in the same array) before and after to determine the orientation of the particle. But I can't get the variable to read for both the add and subtract node:

Image

Is this one of these weird instances of ICE "not thinking I'm being serious" or ? I tried also use the output from one get data node, with but same result.

_________________
Arnold for the masses!


Top
 Profile  
 
 Post subject: Re: Ice not taking in value from variable
PostPosted: 28 Jun 2012, 13:52 
Offline

Joined: 19 Sep 2010, 11:28
Posts: 348
Is particle position your custom attribute? Isn't that like pointPosition? Could it be that you try to use an already existing attribute as your own? Try it with customIndex or something like that to check whether that can be a problem. Just a guess....


Top
 Profile  
 
 Post subject: Re: Ice not taking in value from variable
PostPosted: 28 Jun 2012, 14:37 
Offline
User avatar

Joined: 19 Mar 2010, 00:38
Posts: 444
Location: St. Thomas, Ontario
Hi ChrB,

I suspect you are doing two different array evaluation, so the bottom self.ParticlePosition is starting at index 0 for each particle evaluation of the top node and not giving you the result you expect!

Try this, take the output from your top node self.ParticlePosition and feed the input of both your substract node as well as the add node.

Another way to do it is to take the output value from your add node and substract 2 then feed the bottom Select in Array node!

Be aware that, for particle index 0, you will have negative value index for your previous particle, you may need to address this case separately!

EDIT: And the last particle, your add will point to index(LAST)+1 so you will have to deal with that case as well.

Dan

_________________
$ifndef "Softimage"
set "Softimage" "true"
$endif


Top
 Profile  
 
 Post subject: Re: Ice not taking in value from variable. Solved
PostPosted: 29 Jun 2012, 10:30 
Offline

Joined: 10 Jun 2009, 13:26
Posts: 50
Thanks for your answers. much appreciated.

Turned out the problem was later down the tree. I basically orient the particle to the position before and after in the array and then mix the two results using a linear interpolate node. If the interpolate node has blend set to 0, the second value (the one reading 0 as a value) is not evaluated, and vice versa, with blend set to 1, the first value is not being evaluated. It makes perfectly sense I guess, just a question of ICE being optimized to not evaluate data that has no use.

@Daniel, thanks for the additional suggestions.

_________________
Arnold for the masses!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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