View Full Version : Remark on XPresso
H. Ikeda 11-12-2002, 01:23 PM If you open the sample file called TP bounce Repell.c4d in your features folder of R8 (probably demo or EB), you could find an XPresso expression for TP. In the XPresso editor, there is a part where difference of two positions is compared with a constant to detect collision. This might be a usual way of XPresso, but pay careful attention to their types of ports. As (a) in the illustration below, you'll find that Vector value is input into Real value port. This might be a mess in a normal programming sense, but it's all right for XPresso. This is confirmed by checking compare node as in (b). XPresso has some kind of such robustness.:eek:
|
|
H. Ikeda
11-12-2002, 01:25 PM
Here the illustration.
Hi,
thats the power of auto conversion :)
If you put a vector in a real port the length of the vector will be evaluated.
If you put a real into a vector port (lets say 2.341) you will get a vector (2.341;2.341;2.341).
You can achive the same by using the Type node but autoconversion saves screen real estate.
Regards
Srek
H. Ikeda
11-13-2002, 12:08 PM
Sure, indeed. This is other type of auto-conversion than input fields of C4D, such as 10*PI and 50/2. Probably people who have experience of programming may waste editor area ironically, because usually types of variables are strictly distinguished on programming.
BTW, can't find Type node in demo(8.012) I'm now tweaking. Universal node may be a counterpart. Which is the latest?:eek:
Hi,
you are right the correct name is universal, my memory slipped on that one.
8.012 is the current version.
Regards
Srek
H. Ikeda
11-15-2002, 12:06 PM
Ok, so powerful the XPresso is.
Now another aspect of expression, priority.
In R7, priority of expression is decided by Down Hierarchy(1,2) and Up Hierarchy(1,2) of COFFEE editor's options. Priority is just Down1->Up1->Down2->Up2. For built-in target expression, it behaves like a COFFEE expression with Down Hierarchy1.5. Something like that.
In R8, priority of expressions including XPresso, COFFEE and built-in expressions has been organized in priority property in the Attribute manager. This is decided by where it's in the drawing pipeline (maybe) and priority number as an integer. For example, priority of built-in target expression is the expression stage with number 10 by default, while XPresso expression has priority of the same expression stage with number 0. It's bothering but thoroughgoing.
Well...but, XPresso might be able to control priority of itself?...hmm...confused.:shrug:
Hi,
you need control over the priority. Sometimes you will need your expression to be evaluated before a target, or another expression, sometimes after. No automatic process is able to interprete what you intended to do.
Regards
Srek
H. Ikeda
11-16-2002, 12:14 PM
(Sorry, R7 priority was wrong, 'cause I didn't think priority means drawing order. I've corrected.)
Well, we can select degrees of priority from "before initial" (it seems meaningless as an expression, IMHO) to "after generator" in the drawing pipeline (I assume, e.g. a typical generator has priority of "generator" with number 0; maybe true). I can't imagine situations of being after generator!
And we can control priority of current XPresso using itself, as below. So switching priority can be freely done. For some situations "after" target expression, other "before.";)
CGTalk Moderation
01-13-2006, 10:00 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.