ICE: Clone Point or Add Point

90 views
Skip to first unread message

Chris Marshall

unread,
Nov 25, 2009, 9:07:30 AM11/25/09
to soft...@listproc.autodesk.com
Hi Again,
Sorry for asking yet another ICE question.
I want to test a particles state and if it's a state zero, add another point to the cloud. But I'm getting  a context mismatch error if I use Add Point in the If Equals setup, but it works fine with Clone Point. I was hoping not to use Clone Point for various reasons and I was just wondering why there's a problem with using Add Point, which I assumed was the most basic of nodes to use for, well, adding points?
Thanks
Chris

Vladimir Jankijevic

unread,
Nov 25, 2009, 9:14:18 AM11/25/09
to soft...@listproc.autodesk.com
which reasons are stopping you from using it? I'm just asking because
I am doing something right now with the clone point node and maybe
there are things I should be aware of...

thanks

and sorry I did't answer your initial question
Vladimir

--
---------------------------------------
Vladimir Jankijevic
3D VFX Artist

Elefant Studios AG
Lessingstrasse 15
CH-8002 Zürich

+41 79 390 83 48 Mobile
+41 44 500 48 24 Tel

www.elefantstudios.ch
---------------------------------------

Chris Marshall

unread,
Nov 25, 2009, 9:19:57 AM11/25/09
to soft...@listproc.autodesk.com
Well it's just that I want to create some completely new points that only use the original points positions. I could clone them then modify all their attributes, but I thought using Add Point would be the easiest alternative. As it gives a Context Mismatch error, I was curious as to why, as I thought that node would be even more low level than Clone Point and would work in pretty much all situations.

Sebastian Kowalski

unread,
Nov 25, 2009, 9:25:51 AM11/25/09
to soft...@listproc.autodesk.com
maybe its because you feeding the add point with per point data.?

Chris Marshall

unread,
Nov 25, 2009, 9:31:56 AM11/25/09
to soft...@listproc.autodesk.com
well it is, because I'm saying that if a point is a state zero, add a new point to the cloud. Why is that a problem and clone point isn't?

Sebastian Kowalski

unread,
Nov 25, 2009, 9:42:22 AM11/25/09
to soft...@listproc.autodesk.com
sorry was to quick with the send button..
i will try to explain with my moderat knowledge:

the add point eats a set of vector data, an array per object. 
clone point needs the data of the point you want to clone..

what if you plug a "switch context" node inbetween ?

best
sebastian

Chris Marshall

unread,
Nov 25, 2009, 10:21:05 AM11/25/09
to soft...@listproc.autodesk.com
I've tried that but it won't allow it. Maybe I'll just stick with Clone Point.

Julian Johnson

unread,
Nov 25, 2009, 11:02:28 AM11/25/09
to soft...@listproc.autodesk.com
Hi Chris,

Does this do what you're after? Here it Adds specific points based on
state id...without using clone point, but I'm not sure if it's exactly
what you need...

http://www.exch.demon.co.uk/xsi/files/chris_m.gif

Julian

Chris Marshall

unread,
Nov 25, 2009, 11:09:54 AM11/25/09
to soft...@listproc.autodesk.com
Thanks Julian,
That looks like it could do it! The daft thing is the logic is more or less the same as my original that didn't work, so technically, what's the difference between that and saying 'If my state is zero, add a point'?

Ilija Brunck

unread,
Nov 25, 2009, 11:36:06 AM11/25/09
to soft...@listproc.autodesk.com
this is really cool!!
--
Ilija Brunck

+49-177-3402874
il...@polynoid.org
www.polynoid.org

Julian Johnson

unread,
Nov 25, 2009, 11:41:48 AM11/25/09
to soft...@listproc.autodesk.com
Chris Marshall wrote:
> Thanks Julian,
> That looks like it could do it! The daft thing is the logic is more or
> less the same as my original that didn't work, so technically, what's
> the difference between that and saying 'If my state is zero, add a point'?
Chris - that's a great question and probably one that someone like Gray
would be much better placed to answer. I know that placing execute
statements behind IF clauses can sometimes lead to contextual issues -
maybe because you're trying to execute something on (or at) a single
point when the context dictates that anything you do must be executed on
all points (even if they get given a 'null' value) i.e. ICE has no idea
what to execute on the other 'members' of the per point set. Filter
seems to be a mechanism to create subsets (even subsets of 1) of your
data within a given context where ICE permits you to explicitly ignore
the other members of the set without breaking context rules...

Chris Marshall

unread,
Nov 25, 2009, 12:18:00 PM11/25/09
to soft...@listproc.autodesk.com
Thanks Julian,
That explains it pretty well! Now I know there's a solution, I can experiment with this type of setup and see what works and what doesn't!
Thanks again,
Chris

Alan Fregtman

unread,
Nov 25, 2009, 12:18:49 PM11/25/09
to soft...@listproc.autodesk.com
I'm not Julian but my understanding from using Filter in other effects
is that it does not return a single value but instead filters a set
and the "kept" items in the set stay intact but the rest get given a
null value.

So, it would appear that Add Points wants a set, even if they have
only a couple usable values in it, instead of a single value like you
were giving it with your method.

Grahame Fuller

unread,
Nov 30, 2009, 12:14:26 PM11/30/09
to soft...@listproc.autodesk.com
This is indeed something I've bumped my own head against a few times and asked the developers about.

In ICE, the general rule is that the context going into a node is the context going out. However, Add Point is an exception and it's output is always per-object no matter what its input context. This avoids certain ambiguities, for example, if you plug self.PointPosition into Add Point and its output is per-point, does that mean you want to add NbPoint points per existing point or you're just trying to make one copy of certain points (like Chris is trying to do)?

Thus, you can't plug Add Point into an If node whose condition input is per-point. The workaround, as already stated, is to use a Filter node upstream instead an an If node downstream.

gray

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Chris Marshall
Sent: Wednesday, November 25, 2009 12:18 PM
To: soft...@listproc.autodesk.com
Subject: Re: Clone Point or Add Point

Thanks Julian,
That explains it pretty well! Now I know there's a solution, I can experiment with this type of setup and see what works and what doesn't!
Thanks again,
Chris

winmail.dat
Reply all
Reply to author
Forward
0 new messages