adam Posted September 24, 2015 Share Posted September 24, 2015 Can someone please tell me how to scale a bone? Thanks Quote Link to comment Share on other sites More sharing options...
Jaskar Posted September 24, 2015 Share Posted September 24, 2015 I don't understand; why do you want to scale a bone ?I think you can't because it's not a physical object. PS: Maybe it can be a good idea to write a playground about bones and skeleton ? Quote Link to comment Share on other sites More sharing options...
adam Posted September 24, 2015 Author Share Posted September 24, 2015 I got this dude's head to scale: http://www.babylonjs-playground.com/#11BH6Z#25 I can't seem to get it to work while he is walking though. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 If the mesh is animated then every bone will receive a new matrix on every frame so you cannot change it manually Quote Link to comment Share on other sites More sharing options...
adam Posted September 24, 2015 Author Share Posted September 24, 2015 Why doesn't scaling the new matrix every frame work? http://www.babylonjs-playground.com/#11BH6Z#26 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 because the animation will generate a new one after your update on every frame Quote Link to comment Share on other sites More sharing options...
adam Posted September 24, 2015 Author Share Posted September 24, 2015 I hacked Scene.render and placed the call to animate before beforeRender gets called. I also check to make sure that the matrix is new before scaling it. http://www.babylonjs-playground.com/#11BH6Z#27 It almost gets through the animation cycle without messing up. I'm thinking that a few of the frames toward the end don't reset the scale of the head, so I end up scaling it when I'm not supposed to. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 Hey this is great I think I can move the beforeRender a bit for sure I do not see any issue with that Quote Link to comment Share on other sites More sharing options...
adam Posted September 24, 2015 Author Share Posted September 24, 2015 Thanks! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 24, 2015 Share Posted September 24, 2015 Ouch! I actually designed & coded a bone interpolator in a before render. I do not have it running yet, though. My MORPH extension is to now handle vertex deformations for the face, and skeletal interpolation of different poses: walking, sitting, etc. Both integrated with POV movement / rotation, & timeline control. Was counting on the BeforeRender being processed before the the send to the gpu, since the before render sets the bones. Is there some way to make when the dirty skeletons are pushed up adjustable, or callable by the application code as well? If it is earlier, I do not care, no BABYLON.Animation is running against them, so long as I can request it in the beforeRender. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 25, 2015 Share Posted September 25, 2015 never mind. You are only moving the making of skeletons dirty forward, not the transmission. How else would what he is doing get to the gpu. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 25, 2015 Share Posted September 25, 2015 Yep this is still before sending bones to the GPU Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.