tjheldna Posted August 25, 2016 Share Posted August 25, 2016 Hi I'm trying to work out how to have separate parts of a character so they can be shown/hidden for clothing changes. In Modo I can: 1) Create a rig assign a mesh to the rig. (Main body) 2) Assign another mesh to the same rig. (Deform able Armour) This in theory would allow me to show/hide the armour mesh. When I export the setup out to fbx and is imported into Leadwerks with both meshes export but, they have been collapsed to a single mesh when viewed in the model editor and when added to the scene. So now I loose that show/hide functionality. Is it possible to export multiple mesh entities with the same skeleton? or in fact know of a better way to handle a modular character? 1 Quote Link to comment Share on other sites More sharing options...
martyj Posted August 25, 2016 Share Posted August 25, 2016 The way I do this, and it might be a terrible way, is to separate the clothes into their own models. Then just attach the model as a child entity when you want to wear it. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted August 25, 2016 Share Posted August 25, 2016 It's one mesh but it should have children which I think you should be able to hide individually. Something like: entity->FindChild("armour1")->Hide(); Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted August 25, 2016 Share Posted August 25, 2016 I would import them on their own and then parent them to the character when needed. Sort of like a weapon to hand. Of course these cloths need to be specifically modeled for that one body type. I used to do it a little different a while ago. You can create vertex groups and parent them. Just like you do with bones. So I would model different torso. And parent the vertex group of the head to each different torso. Each vertex group for the heads and torsos need to be the same size,scale,and vertex amount. And of course you can do this for legs,hands,feet. Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted August 25, 2016 Share Posted August 25, 2016 These instructions are are from a while ago but, it gives you the basic idea and principles. http://developer.reallusion.com/whitepaper/Maya_Template/index.html Quote Link to comment Share on other sites More sharing options...
Phodex Games Posted August 27, 2016 Share Posted August 27, 2016 I faced the same kind of problem with my project. So far I didnt found a perfect solution, but its fair enough. 1. After you rigged and modeled your character, export it without any clothing. 2. Now if depends on what type of clothing you have. I will cover both types: 2.1 Full/Half Body Clothing: Models covering a larger area of your character (trousers, pullovers, tshirts, armors) need to have an own rig. Now export the affiliated cloth model and attach the nessecary skeleton parts to it (for a t-shirt just the bones for the Arms/Hands/Shoulders for instance). In Leadwerks I prefer to add a body and legs slot to my character(s) in form of a pivot. Then I parent the cloth parts to the affiliated pivots. My script plays animations for every model parented to the leg and body pivots as well as for the character body. The cool thing first: You dont need to extra export animations for your clothing, because you can use the "Load Animations" function in Leadwerk's model editor, so if you add new animations you dont have to export all the clothing again. The bad thing is if you want to change your rig than you have to do the same for every clothing part by manual, BUT you normally have finished your skeleton before creating serious armor/clothing asset so its a good deal. 2.2 Thats the cooler thing. If you have just clothing parts like arm protection, leg protection, gloves, weapons etc you can simply parent them to the affiliated body rig bone. So if you have an arm protection like this (http://www.andracor.com/out/pictures/z1/sol_armschienen-warlord-braun_1_z1.jpg) then you can attach it to your arm bone and the clothing will follow this bone and 100% works with any animation played by its parent. So no rigging, no animation loading. I really like it 3. Dont forget to tell you script to play the animations for each cloth part. Note: I tried to add the bodies skeleton scriptwise to equipped clothings, but leadwerks struggles when accessing bones in the editor or with coding. I hope this helped 2 Quote Link to comment Share on other sites More sharing options...
tjheldna Posted August 27, 2016 Author Share Posted August 27, 2016 Thanks for all the info guys appreciate it. @Phoenix88 your solution sounds like what I'm after, thank you! 1 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.