PDA

View Full Version : Expression Question



Mike Pauza
10-29-2003, 02:06 PM
"Time loops" & channel self referencing is impossible with expressions aren't they? Do I absolutely have to use LScript to achieve something like the code below?

**********************
For Time = 0 to 1 Step dt
vy = vy - g*dt
y = y + vy*dt
Next Time
**********************



Thanks. -Mike Pauza (3DPhysicist)

fxnut
10-30-2003, 06:40 AM
Hi Mike,
Yep as far as I'm aware it's impossible. I think it's always been a limitation. Probably something to do with the way Lightwave evaluates stuff and doesn't like circular references.

Being a physicist like yourself, I've also wanted to do euler integration on object motion like in your example, but the only way I've found out how to do it (without writing an LScript or plugin) is to use a dummy object (or global channel) to store the intermediate values. This is pretty ungainly though, and personally I'd prefer to just knock up a quick script.

Regards

Andy

Mike Pauza
10-30-2003, 08:10 AM
I tried dummy channels. Hmm, I'll look at it again.

Another fizz huh? What's your background? You ever use the Verlet algorithm instead of Euler?

Yeah, I know LScript can do it. Just wanted something easy.

Thanks man. -Mike

Mike Pauza
10-30-2003, 01:36 PM
For anyone interested, there's a lot more discussion about this going on here:

http://www.cgtalk.com/showthread.php?s=&threadid=99087



-Mike Pauza (3DPhysicist)

fxnut
10-31-2003, 01:53 AM
Originally posted by Mike Pauza
Another fizz huh? What's your background? You ever use the Verlet algorithm instead of Euler?

Funnily enough, yeah, I've only recently just started to use Verlet integration. I've used it to do a particle system, cloth simulation and a ragdoll. I've found it great for resolving fast collisions. Stuff like Motion Designer becomes a snap with Verlet. I also tried using it to do a car simulation, but I needed it to describe a general purpose vehicle class and setting it up to consistently be stable proved to be too tricky, so in the end I went back to the old Euler again. What are you using Verlet for? Working on any cool stuff at the moment?

I did a four year degree course in Physics, and since then I've been doing all sorts in the games industry, doing everything from artist & lead artist (in a small company), to programming physics, tools, and visual effects. Done a fair bit of web design and development too. Keeping the variety in there basically! My new job's gonna expand this on all areas hopefully, but I can't say too much about that at the mo. How did you get into the Physics?

Keep this thread posted on how your integration quest goes :)

Regards

Andy

Mike Pauza
10-31-2003, 09:21 AM
That's awesome Andy! We physics geeks need to stick together.

I got into physics because I'm really interested in dynamics (mechanics) simulation. Especially the stuff that's interesting visually. I have some background in particle simulation and numerical PDE's, but most of my experience has been doing spring linkage simulation similiar to MD (using Verlet of course) :). I worked a couple of years at our National supercomputing center here in Illinois, but got really bored doing science stuff. I started tinkering with LightWave about two years ago, and now I'm working on some LW dynamics training material, and maybe a plug in the near future.

It seems some guys at cgtalk have a couple of idea's how to integrate motion equations via expressions. I'll keep you posted.

Have a great day.

-Mike