piotr.karkocha Posted June 19, 2019 Posted June 19, 2019 (edited) Hi! I am looking for a way to create an object which can be deformed by the user. The object is simple and the idea is to change its width, but scaling is not the way to go, as i only need to move a part of the vertices. I was wondering if there is a way to control morphing with user input, lets say a slider, with one mesh as the minimum value and another one as max value - is it possible to do so, or is the animation between morphing targets always based on the time component? How could i then set the target parameters? Or maybe it would be possible to change the position of a selected set of vertices of a dynamic mesh, causing the deformation? I could select triangle vertices based on vertex color, but dont know how to select the corresponding coordinate vertices... So many questions. Would be great if you could point me in the right direction. Thanks Edited June 19, 2019 by piotr.karkocha
morbid Posted June 20, 2019 Posted June 20, 2019 Hello Piotr, Can you show us an example of desired behavior? A video would be good. Thanks How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
piotr.karkocha Posted June 20, 2019 Author Posted June 20, 2019 Hi Morbid, I can´t upload a movie, upload fails, so there are two states of the object (see pictures), or 2 morph targets: the user should be able to play with object's witdh via slider, interpolating between this two meshes. If he is happy with the size, then the mesh should stay in the set width. These objects are actually building blocks, but the user should be able to adjust their width after loading them into the scene, so that they fit best in his configuration. Note that the vertices of the round opening in the middle don't change their position; only the outer vertices are affected. Hope this clears the things a bit:)
morbid Posted June 20, 2019 Posted June 20, 2019 Okay, thanks, now I see. Have you saw this article on Morph Targets: https://developer.unigine.com/en/docs/2.8/content/tutorials/morph/ We also have a sample, check Samples -> UnigineScript -> skinned_07 This should be enough, How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts