ozRocker Posted August 9, 2018 Share Posted August 9, 2018 Does anyone know if its possible to morph part of a mesh to its target? For example, if you start clicking on areas of a mesh those areas will start to morph to the target I could code this via CPU but I'm just wondering if its possible to do this via GPU. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 9, 2018 Share Posted August 9, 2018 Would Morph Targets not work in this case ? https://doc.babylonjs.com/how_to/how_to_use_morphtargets Nabroski 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted August 9, 2018 Author Share Posted August 9, 2018 1 hour ago, Sebavan said: Would Morph Targets not work in this case ? https://doc.babylonjs.com/how_to/how_to_use_morphtargets But how can I use that to morph part of the mesh? As far as I know, morph target will morph the whole mesh only Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 9, 2018 Share Posted August 9, 2018 Either you could split the mesh (less than ideal) Or you could leave some of the mesh information unchanged and only touch the other vertex. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted August 9, 2018 Author Share Posted August 9, 2018 1 minute ago, Sebavan said: Either you could split the mesh (less than ideal) Or you could leave some of the mesh information unchanged and only touch the other vertex. Yeh, that's the one. I want to leave some of the mesh unchanged. Like if I had a paintbrush I want only the vertices under the paintbrush to morph towards the target. The Morph Target Manager can do this? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 9, 2018 Share Posted August 9, 2018 yup, in the morph target manager you can define manually the vertex data for start and end as you can see here: https://www.babylonjs-playground.com/#HPV2TZ#15 You could adapt only half of the mesh. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted August 9, 2018 Author Share Posted August 9, 2018 6 minutes ago, Sebavan said: yup, in the morph target manager you can define manually the vertex data for start and end as you can see here: https://www.babylonjs-playground.com/#HPV2TZ#15 You could adapt only half of the mesh. I'm not sure how that would work in my case. It looks like you are still doing a complete morph. Here's an example: I have a skinny girl as base and a really fat girl (fat everywhere) as the target. I want to just morph maybe the hips, or the breasts, or the neck. I don't want to create a morph target for each possible bodypart because there might be 20 or more. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 9, 2018 Share Posted August 9, 2018 Yup this might get tricky, but as long as you morph from A to A it feels like it is not morphing but you would need to identify every single vertex you need to morph and left the other untouched. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted August 10, 2018 Author Share Posted August 10, 2018 15 hours ago, Sebavan said: Yup this might get tricky, but as long as you morph from A to A it feels like it is not morphing but you would need to identify every single vertex you need to morph and left the other untouched. Do you know if this is possible with Morph Manager? To be able to morph different areas with different influence amounts? NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 Nope you can not control this aside of manually creating the corresponding vertex data as on the sample provided. 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.