PDA

View Full Version : Priority System in SI?

 geoath10-06-2009, 09:08 AMHi! A friend has told me that Maya, C4D have a priority system which is very useful for character setup.. Does SI has a priority system in solving expressions, constraints, ect, as Maya, C4D have? an example: i have 3 objects (A,B,C) B rotates on y when A translates on x (with an expression) C scales on x when B rotates on y (again with an expression) as you see C depends on B and B depends on A.. so to avoid lag, solving priority should be like: A has the lowest priority(as it moves first), B higher than A, and C the highest of all.. how does SI handles this? does it solve all them at once? is there a way to manually adjust the priority? thanks in advance geo
ThE_JacO
10-06-2009, 01:40 PM
In your example there is no need for "priority" as the chain of evaluation is clear.
XSI is based on a pull only, lazily evaluated DAG which in the case of your example will pull through the scene graph B and C and evaluate them correctly the moment they are flagged dirty by the movement of A.

geoath
10-07-2009, 07:45 AM
thanks a lot for your quick response!
could you please explain me what DAG means?

in a more complex situation, not something so clear/simple as my example, could this be
controlled in SI?
sorry for this hypothetical question, but i'm trying to understand why Maya has this custom workaround..there must be a reason for that i guess..

ThE_JacO
10-07-2009, 08:13 AM
A DAG is a Directed Acyclic Graph, basically the set of logical elements and connections that describe your scene (it falls under the process model category the way it's used in 3D scene graphing).
It's the same model maya is based on and pretty much any 3D app of a certain magnitude out there that I know something about the internals of.

Most of the time the graph will do just fine, and priority is a non-issue (as it's determined by the graph pull, not arbitrarily). Occasionally dependency cycles can be created, and a DAG by design can't solve them, so to break them interrupts and additional directors need to be added to break them, which can be user interaction and so on.

Priority in a straight A -> B -> A cycle with two elements, the most common cycle that's useful but tough to break, will simply not work.
It's usually better to address those cycles differently, since the cases where you might want a cycle like that to be evaluated (say bidirectional constraints), simple priority simply breaks it makes it an A -> B or a B -> A eval all the time anyway, which you could do yourself in a cleaner fashion by simply removing one of the two constraints.

In some rarer cases explicit priority however can help, and for that you only have some involved technical workarounds in XSI (forcing something to always evaluate and/or placing a key to always force a pull and so on), but again, it's a patch on something that ideally the underlying graph management should be good at by default.
Still, the subset of cases is pretty limited, and most of the times if you can't fix it with an expression or a key in the right place, chances are priority won't help either.

And probably more important, what evaluation issues preoccupy you so much that you'd like priority control to fix them?

geoath
10-08-2009, 07:37 AM
And probably more important, what evaluation issues preoccupy you so much that you'd like priority control to fix them?

The truth is a couple days before, I've never heard of priority control in evaluating expressions, constraints etc, and haven't faced a situation i might need it..

the whole thing came from a friend, (C4D and Maya user), who said that such a system is useful in character setup, and i thought i miss something very essential in SI..

the only thing i knew in SI was that scripted ops are solved before expressions, expressions before constraints etc, but i guess this wasn't the same..

so i searched the user manual for some info, but didn't find anything so i decided to ask here.

i have to admit your replies were solid and very useful, everything is clear to me now and I'd like to thank you for your time effort to explain such technical things!!

best regards
geo

CGTalk Moderation
10-08-2009, 07:37 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.