Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Rotate Limb - is there any other way?

Author
Message
Crit
17
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 29th May 2006 00:01
Hi all,
I'm making a chess game with Alvarus, which is mostly finished except for AI and 3d animation. The models are about 4000 polygons each. I was trying to animate them on the fly using the rotate limb command, but it slows the framerate too much.
Running the following code on my system, I get these results:
objects_to_rotate = 0: 748 fps
objects_to_rotate = 1: 73 fps
objects_to_rotate = 2: 37 fps
objects_to_rotate = 3: 25 fps

If you look at the code, I'm not even rotating the limbs on every frame. Using the rotate limb once permanently reduces the frame rate.

Obviously I could use smaller objects, but can anyone think of ANY other way to animate the characters while keeping a decent framerate?


Crit
17
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 3rd Jun 2006 00:13
Thanks for the overwhelming response

But seriously, maybe somebody could answer this question:

When you're rigging a character, is there a way to specify which vertices deform vs. which ones simply rotate around the pivot point? The answer doesn't have to be specific to any modeling program, but FYI were using Blender.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Jun 2006 12:55 Edited at: 10th Jun 2006 12:57
Instead of rotate limb, try breaking your models up into individual objects, and rotate them. I do not get much slowdown doing that. Or, if your 3D chess board always faces the same way, you can put the animations onto plains. You could also do that if you just have 4 directions of rotation like Sim City 1/2/3, Rollercoaster Tycoon 1/2.

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Jun 2006 13:09
Why do you need 4,000 polygon chess pieces?

Work it out in the long run, that's 128,000 polygons, with textures, it's gonna be slow. With the screen resolution and how far away you are, I'd suggest limiting your piece polygons to 1000 each, which I've seen run nicely in DBClassic.

Having a rendered plain mode as well as Pincho suggests would let you add to the renders, maybe render the ones you have then reduce the poly counts for the live 3D mode.

Aegrescit medendo
Crit
17
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 10th Jun 2006 16:33
Pincho: The camera pans around in real time, so the pre-rendering option is out. Breaking the models up is a possiblity we've been looking at, but I was hoping I didn't have to write my own limb hierarchy system to do it.

VanB: Thanks for the advice. I'll tell Alvarus to reduce the model size (I think he's already started that, sensing that there wouldn't be any other solution).

Alvarus
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Maryland
Posted: 10th Jun 2006 20:11
@Pincho: You're exactly right. I can rotate a huge number of high poly objects with almost no slowdown. The slowdown occurs when we rotate limbs with higher poly counts.

@Van B: I was hopeful that we'd be able to have close ups of the pieces, e.g. a camera angle from a piece's perspective. But you're right, I'm sure 1000 polys per piece would run just fine.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Jun 2006 22:19 Edited at: 11th Jun 2006 22:20
Couldn't you just animate them from outside DBP?

There are three types of people, those that can count and those that can't.
Alvarus
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Maryland
Posted: 12th Jun 2006 15:44
@Diggsey: Good question. Unfortunately a similar problem occurs. The animation plays well but when it loops all program processes come to a halt for a moment.

Login to post a reply

Server time is: 2024-05-20 16:38:38
Your offset time is: 2024-05-20 16:38:38