Laggy Animations

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Laggy Animations

Postby andylegate » Mon Aug 04, 2008 10:32 am

Built a gate yesterday. Nothing fancy:

3 cubes (6 faces)
2 cylinders (16 faces)
2 toruss (350 faces each)

Now the total comes up to 744 faces. Not much really considering how many faces the windmill in Er'cana has (over 300 per blade).

However, when I click the button to open the gate, OMG, the lag is so bad, the game just freezes until the animation is over.

Yes, each object in the gate is an actor. Each object is parented to one object that has the animation. No shadowbuf is on.

I'm at a loss as to what would be causing this lag. I only have one sound file playing during the animation, and I've changed it to different ones, then took it out all together. Still the same result.

Has anyone else noticed lagging when you start parenting objects together for animations?
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby andylegate » Mon Aug 04, 2008 11:51 am

I can confirm this now: When ever I parent one object to an animated object (so it animates too) the animation becomes very, VERY laggy. Which is very strange. I instead animated the 3 objects seperately, and there was no lag at all.

What up wid dis????
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby Paradox » Mon Aug 04, 2008 11:54 am

When you parent objects, you cause the children to be reliant on the CoordinateInterface of the parent. When animating, you change the matrix, which must then transform all of the children based on the parent matrix. Essentially, it's a lot of math to transform each child using the parent matrix, rather than just transforming each matrix separately.
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Laggy Animations

Postby andylegate » Mon Aug 04, 2008 12:04 pm

So basically I have to animate each object? That's insane.....especially when I go to do the scripting for it......
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby Nadnerb » Mon Aug 04, 2008 12:24 pm

This doesn't sound right. My door (from animatedoor.age) had parented objects, (actually, 4 animated objects parented to 2 other animated objects) and I didn't notice game-stopping lag...
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Laggy Animations

Postby andylegate » Mon Aug 04, 2008 12:32 pm

I'll go look at you file Nadnerb and see if I'm doing something wrong. I had it down to where there were only 3 objects, 3 boards for goodness sakes, nothing complex parented, 2 of them to the one, and it still gave an incredible lag. All my other animations work fine, but this is the first time I've tried to animate more than one object. The tutorial says that the animation info is copied over when you parent the object to the animated object.

I find it hard to believe that Cyan animated each and every single object, like the windmill in Er'cana and then all that scripting. That's just too inefficient, and too much room for mistakes that would take forever to fix.

right now I've gone back to a large board to act as a gate...... :roll:
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby andylegate » Mon Aug 04, 2008 12:52 pm

Okay, unfortunately your Age doesn't help, in that what you have parented, each object has it's own animation that it's doing. In my case, all the objects are simply moving N amount of Blender units to the right. Now, I can sit here, animate the one board, then do the same with each object giving each object it's own IPO, then parent the other objects to the first board, so that in the alcscript it's only the one board that starts it all, like you did in that Age.

I'll give that a try and see what happens.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby Jojon » Mon Aug 04, 2008 1:48 pm

Nadnerb wrote:(from animatedoor.age)


Oooo, what a feeling, to be dancing on the ceiling.

Groovy man! :D


@Andy: You're doing something like a segmented elevator door?
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Laggy Animations

Postby andylegate » Mon Aug 04, 2008 1:50 pm

No, it was just a simple gate that slide open is all. But it was made up of 7 objects:

3 boards, 2 posts, and two "tires". The whole thing just slid to the right is all.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Laggy Animations

Postby Nadnerb » Mon Aug 04, 2008 2:20 pm

wait.. what? is there only one moving element in your gate? (the whole thing) Why don't you just join all the objects together?
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 9 guests

cron