ssatguru / BabylonJS-CharacterController-Samples

A collection of sample projects to show how to use CharacterController from typescript, nodejs , amd or plain non module based applications.
10 stars 5 forks source link

Changing Meshes #1

Open Turing-Tester opened 4 years ago

Turing-Tester commented 4 years ago

You made a really good demo with the CharacterController game for babylon.js. I've been experimenting with my own version here:

http://turingtester.gitlab.io/babylonjs-intro/example-ssatguru/ (Note: Please allow up to 10 seconds for the game to load in your browser)

I tried changing the mesh and it blew up, as you can see in the link above. Could you possibly give me some pointers on changing the mesh of the character?

I created my mesh in four steps. I made a humanoid model in Adobe Fuse, then uploaded to Mixamo and downloaded as .dae, opened in Blender (to scale the mesh down and raise it to where it appears above the ground in the link), finally I exported from blender as ".babylon" and swapped out the mesh you used for mine. After these steps I can get the character rendered into the scene, but the camera is not attached to character, and the character is not animated.

Do you have pointers on how to fabricate the meshes for the character used by your character controller?

ssatguru commented 4 years ago

Something wrong with your character, Test them at https://sandbox.babylonjs.com/. Use the inspector. Also you can find both the blender and babylon version of my character at https://github.com/ssatguru/BabylonJS-CharacterController/tree/master/tst/player

ssatguru commented 4 years ago

also check the babylon forum for animation export workflows example https://www.html5gamedevs.com/topic/31111-solved-correct-workflow-for-animations/?tab=comments#comment-178726

Turing-Tester commented 4 years ago

Thank you very much for the prompt response and for the links to, especially, the Vincent.blend file. It really gave me a lot of insight as I delve into making models with Blender, though I will acknowledge I'm unclear what you did to it after importing the .dae from Mixamo (which I assume you did). I need to ask as well, how did you produce Vincent_texture_image.jpg? I imagine the texture image is linked to the babylon file somehow?

ssatguru commented 4 years ago

@Turing-Tester, I got the Vincent Character, along with the texture, from Mixamo long time back. At that time they had lot more characters than what they have now. Yes, the character was in dae format. I got the skeleton from somewhere else. Imported both of them into blender and then skinned them together.

Turing-Tester commented 4 years ago

Hey, check this out!

turingtester.gitlab.io/babylonjs-intro/example-ssatguru/

I managed to change the character being used in the game and rigged an armature for it.

I'm very excited with how this is progressing and I think I'm almost there. I just need to create animations and the texture image. Am I correct that you created an animation for standing still, for jumping, for turning, and for walking? Did you make them in Blender or were they part of the mesh you downloaded from Mixamo? Further based on what you said, would I be correct to surmise that you didn't create the texture image for Vincent or did I misread?

Thanks very much!

ssatguru commented 4 years ago

Nice. I did not create the animations. I got them from various places and then tweaked them to my liking You might want to upload your character with rig to mixamo and get some animations from there. Yes you are right. I did not create the texture. It came with the mesh from Mixamo.

On Wed, Dec 11, 2019 at 6:32 PM Turing-Tester notifications@github.com wrote:

Hey, check this out!

turingtester.gitlab.io/babylonjs-intro/example-ssatguru/

I managed to change the character being used in the game and rigged an armature for it.

I'm very excited with how this is progressing and I think I'm almost there. I just need to create animations and the texture image. Am I correct that you created an animation for standing still, for jumping, for turning, and for walking? Did you make them in Blender or were they part of the mesh you downloaded from Mixamo? Further based on what you said, would I be correct to surmise that you didn't create the texture image for Vincent or did I misread?

Thanks very much!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ssatguru/BabylonJS-CharacterController-Samples/issues/1?email_source=notifications&email_token=AAVRJDP3V4C7HLOTTFDWMLDQYGBA5A5CNFSM4JSDBB42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGVBRPQ#issuecomment-564795582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVRJDMMKTOBTPHDZ2VMBMTQYGBA5ANCNFSM4JSDBB4Q .

ssatguru commented 4 years ago

@Turing-Tester This might be helpful to you. Check it out https://www.youtube.com/watch?v=utXuYpyBRN4 Mixamo To Blender 2.8 Plugin

Turing-Tester commented 4 years ago

First off, thanks a lot for that link. I will def use it in the future as it will save a lot of time.

I've managed to create a walk cycle in Blender on my own using video tutorials (this was before you send the link to the Godot extension). I'm uncertain how to make it work when the character is exported.

This is what it does when rendered. I know it's not in the correct rest pose, but I figured I'd ask why the basic walk cycle isn't functioning before I do anything else.

http://turingtester.gitlab.io/babylonjs-intro/example-aj/

ajcoloranimate.zip

Turing-Tester commented 4 years ago

@ssatguru I used the link you sent in the above comment for the Mixamo to Blender plugin. It definitely saves a great deal of time. Unfortunately, exporting is an issue still. Is there a special way I should export this besides getting the blender to babylon plugin for exporting (which I have)?

ssatguru commented 4 years ago

see if this helps https://doc.babylonjs.com/resources/mixamo_to_babylon or https://www.youtube.com/watch?v=Syf9ZHRTNxI&feature=emb_logo

On Sat, Jan 25, 2020 at 10:03 PM Turing-Tester notifications@github.com wrote:

@ssatguru https://github.com/ssatguru I used the link you sent in the above comment for the Mixamo to Blender plugin. It definitely saves a great deal of time. Unfortunately, exporting is an issue still. Is there a special way I should export this besides getting the blender to babylon plugin for exporting (which I have)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ssatguru/BabylonJS-CharacterController-Samples/issues/1?email_source=notifications&email_token=AAVRJDMXAM6RGG236C33YBLQ7UDRJA5CNFSM4JSDBB42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5LFTI#issuecomment-578466509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVRJDNG5CVFVSLR4CSPJMTQ7UDRJANCNFSM4JSDBB4Q .

Turing-Tester commented 4 years ago

Hello, thanks for that tutorial. It certainly helped me to apply animations and saves a lot of time! I have to ask though, is that how you exported the character for your original Character Controller demo?

ssatguru commented 4 years ago

Before exporting I make sure the animation is on the last action called z. The z action is the rest pose. I call it z so that it shows up last in the list.

Turing-Tester commented 4 years ago

I first want to thank you very much for your always prompt responses amidst everything else that may occupy your time. It's very much appreciated as I build this.

This is where I've gotten to: http://turingtester.gitlab.io/babylonjs-intro/example-ssatguru/

The Mixamo to Blender to Babylon tutorial was very appreciated and I managed to stitch together numerous different actions newybot2.zip

I have a few more specific questions: First, I was going with the hope that Mixamo might rig the skeleton to the character but would I be correct in assuming that the reason the character does not stay still in the link above is because I need to setup the skeleton on my own?

Second, in the workflow you described here did you mean you have to adjust all the numbers for the actions (turnLeft, jump, run, etc), manually in the code so the program will know which number frames correspond with which actions? If this is the case, how did you figure out what the numbers were?

Lastly, what is the purpose of the "Hemi" light in your Vincent.Blend file?