Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Animation Speed  (Read 279 times)
Fox1980
Customers
Community Member
*****
Posts: 239


« on: September 05, 2008, 06:52:49 PM »

Ok i'm not sure if this is a bug or not, but it's driving me crazy.

I have a simple project with a tvactor where i do .setanimationspeed(2).
Everything was fine until i added the built in glow, with glow on the animation plays like 2 times faster.
I didn't do anything else beside creating the rendersurface and drawing the glow on the render loop. Anyone has any idea about this ?

Here's a video link so you can see what i'm talking about :
http://www.youtube.com/watch?v=8G2hX4cvUNM
Logged

"Programmers don't die. They just GO SUB without RETURN."
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #1 on: September 05, 2008, 07:25:20 PM »

Yep. In order to make something glow, you have to render it twice. When you render it twice, you tell it to update twice, and that makes it animate twice as fast. If you check the TVActor->Render() method it has a parameter called bUpdate, which should be set to True for one call to render, and False for the other.
Logged
Fox1980
Customers
Community Member
*****
Posts: 239


« Reply #2 on: September 05, 2008, 08:05:41 PM »

Ah yes it makes perfect sense now. I never realised the bUpdate parameter since i use scene.renderall instead of rendering the meshes one by one. Thank you so much
Logged

"Programmers don't die. They just GO SUB without RETURN."
ZaPPZion
Community Member
*
Posts: 341


« Reply #3 on: September 06, 2008, 02:42:34 AM »

just some comment of my side: that looks like a pretty awesome project you got there, the aircraft seems to have a good flying feel.
Logged
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #4 on: September 06, 2008, 03:40:36 AM »

Yes, it looks very nice.
I'm somehow curious how you made it following the cursor so smoothly Smiley
Tom
Logged
AriusEso
Customers
Community Member
*****
Posts: 377

Esoteric


« Reply #5 on: September 06, 2008, 04:06:46 AM »

Yea, that does look really nice. Smiley

Just as an additional to what Sybixsus said. The update bool argument is also present in the RenderAll function. You could also of set the speed to "1" instead of "2", then the second render would've levelled it out - though ofc, more expensive.
Logged

Raine
Customers
Community Member
*****
Posts: 1189


« Reply #6 on: September 06, 2008, 06:08:11 AM »

Oh, I remember seeing this project before, could it be? It's very smooth indeed.
Logged

Fox1980
Customers
Community Member
*****
Posts: 239


« Reply #7 on: September 06, 2008, 03:06:43 PM »

Yeah this project dates back to 2006. I was making a demo, but then some messy stuff happened in life and i didn't have much time to continue it. I'm getting back on it and yes the cursor movement is what i'm really proud of, but tough it works just the way i want it to the code is really messy and full of dirty tricks, i'm sure there is a better/more elegant way of doing it but why fix something that isn't broken ?
I'm planning on releasing the full demo with source code if i ever manage to finish it, though i would have to change some models for free one's.
Logged

"Programmers don't die. They just GO SUB without RETURN."
ZaPPZion
Community Member
*
Posts: 341


« Reply #8 on: September 07, 2008, 05:52:31 AM »

That would certainly be awesome Cheesy
Logged
aspurgeon
Customers
Community Member
*****
Posts: 161


« Reply #9 on: September 07, 2008, 09:48:29 AM »

Fox,

Great video.  That cursor movement is schmooove!!

Also, that AI pathfinding and drawing video you have on YouTube is really cool, too!  I never saw a post on that in the forums...  I don't know about anyone else, but AI scares the crap out of me, and if you were game, I'd love to see some details on how that works!!

-Andy
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks