Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Vertex + Bone Animation #266964
05/21/09 04:40
05/21/09 04:40
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
I know that you can do this with code, I *have* done it before, a long time ago and it was with WDL anyhow. I need to know how to combine vertex and bone animation for a specific purpose.

My model is animated using vertex animation, I want to add one bone for the character's head and rotate that bone to face the mouse to allow the character to look at the mouse pointer. The problem is that when I do this, the character will not animate using the vertex animations, even though there are no actual bones animations in the model.

I just need to know how to animate it using vertex animations while being able to modify the bone rotation at the same time. Everything else works great, that's the only thing that I need help with.

Re: Vertex + Bone Animation [Re: draculaFactory] #266966
05/21/09 05:19
05/21/09 05:19
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
Hi, you need to animate via script with something like this,

Code:
 if (key_a ==1)&&(key_w-key_s == 0)//Stationary turning
				{
					ent_bonerotate(my,"wheelFL",vector(0,key_a - key_d*  15 * time,0));
					ent_bonerotate(my,"wheelBL",vector(0,key_a - key_d*  15 * time,0));
					ent_bonerotate(my,"wheelFR",vector(0,key_d - key_a*  15 * time,0));
					ent_bonerotate(my,"wheelBR",vector(0,key_d - key_a*  15 * time,0));
				}
				if (key_d ==1)&&(key_w-key_s == 0)
				{
					ent_bonerotate(my,"wheelFL",vector(0,key_a - key_d* 15* time,0));
					ent_bonerotate(my,"wheelBL",vector(0,key_a - key_d* 15* time,0));
					ent_bonerotate(my,"wheelFR",vector(0,key_d - key_a* 15* time,0));
					ent_bonerotate(my,"wheelBR",vector(0,key_d - key_a* 15* time,0));
				}


Where the id file name "wheelFR" is object manipulated.


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: Vertex + Bone Animation [Re: KiwiBoy] #266967
05/21/09 05:38
05/21/09 05:38
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
Thank you, but this solution is not what I was looking for. I thought I explained it good, I don't need code to animate bones, I know how to do it great. What I need is to know how to combine vertex and bone animation through script so that my character can animate using the regular vertex animation while I rotate the bone seperately. The result could be like a character walking forward while the bone controlling the head rotates to face the mouse. I know how to script everything else, I just need to know how to allow vertex animation to play while the bone rotates through code.


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: Vertex + Bone Animation [Re: draculaFactory] #268492
05/29/09 16:27
05/29/09 16:27
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
*bump*


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: Vertex + Bone Animation [Re: draculaFactory] #268570
05/30/09 00:20
05/30/09 00:20
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
This thread is the only information that I remember about this:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=213631

In ancient times of acknex there has been a developer who faked a bones animation to combine it with vertex animation.

Re: Vertex + Bone Animation [Re: Pappenheimer] #268580
05/30/09 03:59
05/30/09 03:59
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
I don't think that is possible, sorry.

First, you have to have the bone weighted to the mesh for the mesh to turn with bone.

Secondly, unless the bone is at the same position during the entire vertex animation, it isn't going to move anywhere with the model's vertex animation.

I just don't see it happening.

Now, for a non-animated model like a spaceship, you could place a bone on top of it, and then place and rotate another seperate model, like a turrent model on that bone. That you can do.

Loco


Professional A8.30
Spoils of War - East Coast Games
Re: Vertex + Bone Animation [Re: Locoweed] #268581
05/30/09 04:02
05/30/09 04:02
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
Thanks for the reply, but I *have* done this before, the manual actually says you can. I just dont remember how I did it a long time ago. The bone is weighted to the mesh and does in fact work, I just wanted to be able to get the head to turn to face the mouse while a vertex animation is running.


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: Vertex + Bone Animation [Re: draculaFactory] #268583
05/30/09 04:10
05/30/09 04:10
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
I can't think of anyway to do it. Wish you luck.


Professional A8.30
Spoils of War - East Coast Games
Re: Vertex + Bone Animation [Re: Locoweed] #268585
05/30/09 04:26
05/30/09 04:26
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
As I indicated earlier, you use bone animate.
In the meantime, vertices animation is still running.
So while player is happily running off to the war, its head with bone animation is loooking around, while it is running!


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: Vertex + Bone Animation [Re: KiwiBoy] #268588
05/30/09 04:37
05/30/09 04:37
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Originally Posted By: KiwiBoy

So while player is happily running off to the war,


Lol.


Professional A8.30
Spoils of War - East Coast Games
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1