PDA

View Full Version : Relativity issues



Anti-Distinctly
04-17-2009, 07:10 PM
Hi all. I'm trying to apply some point-by-point displacement to an object using Relativity, but as far as I can tell it just simply doesn't work.
The manual states:
"Evaluate Expression Point-by-Point: If this option is on, then the variables x, y, and z are replaced with the value of each point in the original object, as they are moved"
As a test I've put this expression into the Y channel
Y: (CHAN(piechart.position.y,t)

So each point's y position should just be replaced with the same position and nothing should change. But that doesn't happen and all y positions just go to 0 and nothing I can do changes it.

Anyone have any ideas?

Anti-Distinctly
10-05-2009, 10:22 AM
I decided to post a new problem with relativity here in order to keep them together. It's another case of a function just simply not working.
I'm trying to use the XCYCLE function, but it just doesn't do a damn thing, even with the most basic expression.
I've applied it to an object, this object has an animation over the first 25 frames (scene is set to 25fps). The expression
XCYCLE(SELF, t, 0.0, 1.0)
should repeat the same animation, but it does bugger all.

It seems that every tie I try to do anything in relativity it just doesn't work.

Anti-Distinctly
10-09-2009, 05:17 AM
Just tried to use the GAP function in Relativity. Also does bugger all.
Does anything in Relativity actually work?

Phil
10-09-2009, 06:09 AM
Mike and I played with the issue in your first post. It turns out that you have to take the documentation literally - it's an inconsistency. Normally, I'd have expected to need to use #x, #y and #z as Relativity variables. However, the documentation states it plainly - you need to use x, y, z :

e.g.

X: x
Y: y
Z: z

or to illustrate better :

X: x*t
Y: y*t
Z: z*t

As I say, it's an inconsistency, but it works as documented. Thanks to Mike for his help with this.

Phil
10-09-2009, 06:16 AM
Just tried to use the GAP function in Relativity. Also does bugger all.
Does anything in Relativity actually work?

GAP works just fine here. What doesn't work for you?

Anti-Distinctly
10-09-2009, 07:14 AM
Hi Phil. I'm not sure precisely what the issue is, as I created a scene which I was intending to use to file a bug report, but the GAP function seemed to work fine.
I'm trying to use GAP to find the world displacement of an object that is driven by IK. That may be something to do with it, I'm not sure. In the end I tried it using a normal LW expression motion modifier, but that didn't work either...until it just randomly started working. Very confusing.

Thanks for the help, I'll take a look at the point by point evaluation situation later on too. I get confused with all the different expression languages. What I'd love is to just be able to right click on a variable and open an expression editor to write in a nice big lscript window :)

Phil
10-09-2009, 10:56 AM
If you are using channel modifiers only, in the case of GAP with IK, you'll have a problem. There's a bug in the LW animation system that prevents Relativity seeing post IK data from the channel modifiers. From memory, a workaround is to apply the motion modifier to something in the scene and then the 'after IK' button in Relativity should work as expected.

I'll try and dig up an example later today if you're still fighting a losing battle :)

Phil
10-09-2009, 11:53 AM
Here's the original Relativity 1 and 2 HTML documentation set. It's likely to be much better than the PDF documentation that ships with LW and I've always found it to be more usable as well.

Note that it does make explicit mention of the x, y, z and t variables as distinct from the usual #frm style of variable.

Phil
10-09-2009, 12:02 PM
IK is very awkward with expressions. The native LW expression system also cannot handle post IK data due to the bug. An ancient posting on the Relativity user list supports my fuzzy recollection about how this is supposed to work :


> Message: 2
> Date: Fri, 03 Jan 2003 17:31:11 -0500
> From: Prem Subrahmanyam <[email protected]>
> Subject: Re: Link Morph
>
> At 08:00 AM 1/3/2003 -0800, you wrote:
> >Hi! A beginer question to Start: is there a way to
> >link morphs to bones driven by IK, and get the
> update
> >in real time, without Keyframing?
> >Thank you!
>
> Yes, it is possible...it's a slight bit tricky, but
> here's the
> idea:
>
> 1. for whatever IK driven bones you need, apply a
> Relativity motion
> plug-in instance. Click on the "After IK" button,
> but don't put
> anything in the channel slots on the interface--this
> is just a dummy
> plug-in to force any dependency on this motion to
> evaluate after IK.
>
> 2. apply Relativity morph to whatever object you
> want driven by it.
> Start with using the Dr. Morph-o professor and set
> the controller to
> be the item you want...of course, you'll need to
> change this anyway.
>
> 3. highlight the X(whateverbone,t) in the morph
> expression and
> hit Ctrl-X (or Apple-X on the Mac) to cut out the
> text. Type "#a"
> (without the quotes) in its place.
>
> 4. bring up the variables panel and put the cursor
> in the first
> (A) variable slot. Paste the text into that slot
> using Ctrl-V
> (or Apple-V on the Mac).
>
> 5. Finally, change the expression in the A slot to
> look like this:
>
> TBLEND(0,<minimum angle>,1,<maximum
> angle>,H(whateverbone,t))
>
> if you're wanting the heading to be the controlling
> angle, or
>
> TBLEND(0,<minimum angle>,1,<maximum
> angle>,P(whateverbone,t))
>
> if you're wanting pitch to be the controlling angle.
>
> Hope that makes things clear.
>
> ---Prem
> www.premdesign.com
>

Anti-Distinctly
10-09-2009, 04:36 PM
Thanks for the help Phil. Unfortunately it's still not working for me. All I'm trying to do is to get a morph driven by the after IK Y value of an object (not using bones, just a bunch of Ik controlled objects), which is very similar to the example workaround above. But it doesn't work for me.
I've attached Relativity to the motion modifiers and activated 'After IK'. Then my morph object has the Rel Morph Expression Module attached to the displacement modifiers, the expression in which is this:
&MORPH(ENDO:compressed,#a)
A: TBLEND(0,0,1,0.01,WY(valve_spring_retainer.lwo (16),t))

I've also tried to use the Relativity channel modifier on the Morph Mixer envelope which also fails. Trying to use this expression:
GAP(valve_spring_retainer.lwo (16), t, valve_spring_retainer.lwo (16), 0.0)
I get an error message saying:
"crank_v004.lwo
Error, unknown object - valve_spring_retainer.lwo (16)"
Now, I don't know if that means if the crank or the valve_spring_retainer is the unknown object. If it's the crank, that's not even involved in the expression so I don't know why it's complaining about it. I'm equally clueless as to why it wouldn't recognise the other object either.

I really feel like I'm fighting Lightwave on this one. And losing.

EDIT: Correction, the object is actually the driver for an IK chain, so the after Ik stuff shouldn't matter. It is being driven by Cyclist though. And I can't use the channel version of Cyclist to control the morph because it doesn't have an 'End Behaviour' option like the motion modifier does. Genius.

Phil
10-10-2009, 01:55 AM
It means that the expression cannot find valve_spring_retainer.lwo (16). Why that should be, I cannot say.

Anti-Distinctly
10-10-2009, 04:47 AM
That's really odd. I've no idea why it's even mentioning the crank object then as it's nothing to do with it at all.
Also, when I try to select 'After IK' in the morph expression module, it's always turned off when I open the panel back up again.

I've also just tried to use a constant value in the morph:
&MORPH(ENDO:compressed,0.5)
But nothing happens at all. Does the morph module actually work?

Edit: I've just tried using the morph module in a new scene with only that single object present. Nothing happens at all, so I can only assume that the morph module is broken.

Edit: The relativity morph must have been interfering or something. I cleaned out all the modifiers and started over and now the GAP function seems to work as expected and I can drive the morph using the relativity channeler.