ozRocker Posted September 20, 2017 Share Posted September 20, 2017 Is it possible to place a t-shirt over a rigged human mesh and transfer skeleton and weights of human to the t-shirt in Babylon.js? So then you can animate the t-shirt with the human I know you can do all this in Blender, but I'm wondering if it could be done in real-time using Babylon.js Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 20, 2017 Share Posted September 20, 2017 Hi OzR. Sorry for slow replies. I would say it is quite possible... especially if the T-shirt is skin-tight (or real near to it), following exact body contours. Then it can be done by copying SOME positionKind data from the body mesh... into a new blank mesh (or a complete cloning of the rig). But with skin-tight cloth, will "painting" the T-shirt onto the body mesh (modified rig texture)... work just as well? *shrug* A nice hanging, swaying, weighted cloth-like physics T-shirt... is much more challenging, I'd say. Also, the likelihood of getting enough impostor-nodes and joints onto the t-shirt to make it react nicely with your intense animations at decent speeds... is low. So so so many physics joints are needed... for "liquid" cloth sims... that it is an out-of-reach feature with JS, yet, I think. Perhaps your best bet is to deep-clone the rigged skeleton including anims, position them side-by-side, and then up-scale the clone a TINY amount. Now create a texture for the clone that is ONLY the t-shirt. Make the rest of the texture.... transparent. (I bet you wish these texturing steps were automated, eh? *nod*) When everything works right, re-overlay the clone position... atop the master... and animate both rigs, as wanted. The clone rig should animate the same as the master, and thus, the t-shirt should be able to follow all the animations on the master... for they are the same animations. In essence, you're just cloning the rig, and changing the paint job on the clone... to a t-shirt only. As for changing the master rig's texture, or mapping a new "piece" of texture atop the original texture... that might be the BEST idea. No rig cloning needed, but some fancy texture work will be necessary. Just some ideas and comments... likely not good ones. Others will surely comment soon. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted September 20, 2017 Author Share Posted September 20, 2017 Thanks @Wingnut I can just try it out to see if its possible. The reason I asked when I did is because I was going into a meeting with this sportswear company that already had clothing created from Marvelous Designer. I anticipated them asking if it was possible to use the existing clothing on top of one of my avatars with minimal manual work required. The meeting is over and they'll be giving me some samples so I can experiment with them. Your idea about the transparent skin texture is the official technique used for clothing within Second Life. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 20, 2017 Share Posted September 20, 2017 It is technically feasible by adding new vertex data to the tshirt model. You need to add matrix indices and matrix weights 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.